Create Or Update Image Of Pass Template Of Type And Resolution
curl --request POST \
--url https://api.loyalty.dog/v2/templates/{templateId}/images/{type}/{resolution} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form image='@example-file'const form = new FormData();
form.append('image', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.loyalty.dog/v2/templates/{templateId}/images/{type}/{resolution}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/templates/{templateId}/images/{type}/{resolution}"
files = { "image": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Pass Templates > Images
Create Or Update Image Of Pass Template Of Type And Resolution
Create or Update Image of Pass Template of Type and Resolution
Creates or updates an image of a specific type and resolution for a pass template.
Parameters:
type(PassImageType): The type of the image.resolution(PassImageResolution): The resolution of the image.image(UploadFile): The image file to upload.template(Template): The pass template.user(User): The currently authenticated user.
Returns:
dict: The serialized image data.
POST
/
v2
/
templates
/
{templateId}
/
images
/
{type}
/
{resolution}
Create Or Update Image Of Pass Template Of Type And Resolution
curl --request POST \
--url https://api.loyalty.dog/v2/templates/{templateId}/images/{type}/{resolution} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form image='@example-file'const form = new FormData();
form.append('image', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.loyalty.dog/v2/templates/{templateId}/images/{type}/{resolution}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.loyalty.dog/v2/templates/{templateId}/images/{type}/{resolution}"
files = { "image": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
JWT access token obtained from POST /v2/token.
Headers
Path Parameters
Supported images Boarding pass: logo, icon, footer Coupon: logo, icon, strip Event ticket: logo, icon, strip, background, thumbnail If you specify a strip image, do not specify a background image or a thumbnail. Generic: logo, icon, thumbnail Store card: logo, icon, strip
Args: StrEnum (type): description
Available options:
logo, icon, strip, footer, background, thumbnail Available options:
normal, high, ultra Required string length:
24Pattern:
^[0-9a-f]{24}$Example:
"5eb7cf5a86d9755df3a6c593"
Body
multipart/form-data
Response
Successful Response
