Passes
Update pass
PATCH
/
api
/
v1
/
passes
/
{id}
Update pass
curl --request PATCH \
--url https://api.passentry.com/api/v1/passes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pass": {
"nfc": {
"enabled": false
},
"fullName": {
"value": "Jane Roberts"
}
},
"message": "Your pass details have been updated. Click to show pass",
"locations": [
{
"name": "Venue",
"latitude": 51.54321132456805,
"longitude": -0.022901231803803924,
"radius": 100,
"message": "Welcome to the venue"
}
]
}
'import requests
url = "https://api.passentry.com/api/v1/passes/{id}"
payload = {
"pass": {
"nfc": { "enabled": False },
"fullName": { "value": "Jane Roberts" }
},
"message": "Your pass details have been updated. Click to show pass",
"locations": [
{
"name": "Venue",
"latitude": 51.54321132456805,
"longitude": -0.022901231803803924,
"radius": 100,
"message": "Welcome to the venue"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pass: {nfc: {enabled: false}, fullName: {value: 'Jane Roberts'}},
message: 'Your pass details have been updated. Click to show pass',
locations: [
{
name: 'Venue',
latitude: 51.54321132456805,
longitude: -0.022901231803803924,
radius: 100,
message: 'Welcome to the venue'
}
]
})
};
fetch('https://api.passentry.com/api/v1/passes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.passentry.com/api/v1/passes/{id}",
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([
'pass' => [
'nfc' => [
'enabled' => false
],
'fullName' => [
'value' => 'Jane Roberts'
]
],
'message' => 'Your pass details have been updated. Click to show pass',
'locations' => [
[
'name' => 'Venue',
'latitude' => 51.54321132456805,
'longitude' => -0.022901231803803924,
'radius' => 100,
'message' => 'Welcome to the venue'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.passentry.com/api/v1/passes/{id}"
payload := strings.NewReader("{\n \"pass\": {\n \"nfc\": {\n \"enabled\": false\n },\n \"fullName\": {\n \"value\": \"Jane Roberts\"\n }\n },\n \"message\": \"Your pass details have been updated. Click to show pass\",\n \"locations\": [\n {\n \"name\": \"Venue\",\n \"latitude\": 51.54321132456805,\n \"longitude\": -0.022901231803803924,\n \"radius\": 100,\n \"message\": \"Welcome to the venue\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.passentry.com/api/v1/passes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pass\": {\n \"nfc\": {\n \"enabled\": false\n },\n \"fullName\": {\n \"value\": \"Jane Roberts\"\n }\n },\n \"message\": \"Your pass details have been updated. Click to show pass\",\n \"locations\": [\n {\n \"name\": \"Venue\",\n \"latitude\": 51.54321132456805,\n \"longitude\": -0.022901231803803924,\n \"radius\": 100,\n \"message\": \"Welcome to the venue\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.passentry.com/api/v1/passes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pass\": {\n \"nfc\": {\n \"enabled\": false\n },\n \"fullName\": {\n \"value\": \"Jane Roberts\"\n }\n },\n \"message\": \"Your pass details have been updated. Click to show pass\",\n \"locations\": [\n {\n \"name\": \"Venue\",\n \"latitude\": 51.54321132456805,\n \"longitude\": -0.022901231803803924,\n \"radius\": 100,\n \"message\": \"Welcome to the venue\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "d2ac8d95-6914-4cac-957c-2a5ccf534390",
"type": "pass",
"attributes": {
"downloadUrl": "https://www.example.com?pass=d2ac8d95-6914-4cac-957c-2a5ccf534390",
"passType": "generic",
"createdAt": "2022-01-01T00:00:00Z",
"status": "issued",
"extId": "b1985e420025dd92ccf2",
"passTemplateUuid": "2e2d7ee8c306e8f0223dbdc1",
"passTemplateName": "PassEntry Ticketing",
"nfc": null,
"barcode": {},
"latestMessage": "Your pass details have been updated. Click to show pass",
"passContent": {
"fullName": {
"value": "Jane Roberts"
},
"nfc": {
"enabled": false
}
}
}
},
"meta": {
"notifications": {
"status": "notDelivered",
"message": "Pass has not been added to the wallet"
}
}
}{
"errors": [
"<string>"
]
}{
"errors": [
"Access denied"
]
}{
"errors": [
"Pass with provided id not found"
]
}Authorizations
Query Parameters
Body
application/json
Only available when updating the pass.
- deactivate: Deactivates the pass, setting it to 'expired' in the wallet. When in this state, pass can receive updates but does not receive Apple notifications.
- reactivate: Reactivates the pass, setting it to 'active' in the wallet. In the case of Apple passes, the pass will remain in the 'expired' passes section of the wallet, user will need to manually select 'unhide' to move passes to the main passes view.
Available options:
deactivate, reactivate Was this page helpful?
⌘I
Update pass
curl --request PATCH \
--url https://api.passentry.com/api/v1/passes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pass": {
"nfc": {
"enabled": false
},
"fullName": {
"value": "Jane Roberts"
}
},
"message": "Your pass details have been updated. Click to show pass",
"locations": [
{
"name": "Venue",
"latitude": 51.54321132456805,
"longitude": -0.022901231803803924,
"radius": 100,
"message": "Welcome to the venue"
}
]
}
'import requests
url = "https://api.passentry.com/api/v1/passes/{id}"
payload = {
"pass": {
"nfc": { "enabled": False },
"fullName": { "value": "Jane Roberts" }
},
"message": "Your pass details have been updated. Click to show pass",
"locations": [
{
"name": "Venue",
"latitude": 51.54321132456805,
"longitude": -0.022901231803803924,
"radius": 100,
"message": "Welcome to the venue"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pass: {nfc: {enabled: false}, fullName: {value: 'Jane Roberts'}},
message: 'Your pass details have been updated. Click to show pass',
locations: [
{
name: 'Venue',
latitude: 51.54321132456805,
longitude: -0.022901231803803924,
radius: 100,
message: 'Welcome to the venue'
}
]
})
};
fetch('https://api.passentry.com/api/v1/passes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.passentry.com/api/v1/passes/{id}",
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([
'pass' => [
'nfc' => [
'enabled' => false
],
'fullName' => [
'value' => 'Jane Roberts'
]
],
'message' => 'Your pass details have been updated. Click to show pass',
'locations' => [
[
'name' => 'Venue',
'latitude' => 51.54321132456805,
'longitude' => -0.022901231803803924,
'radius' => 100,
'message' => 'Welcome to the venue'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.passentry.com/api/v1/passes/{id}"
payload := strings.NewReader("{\n \"pass\": {\n \"nfc\": {\n \"enabled\": false\n },\n \"fullName\": {\n \"value\": \"Jane Roberts\"\n }\n },\n \"message\": \"Your pass details have been updated. Click to show pass\",\n \"locations\": [\n {\n \"name\": \"Venue\",\n \"latitude\": 51.54321132456805,\n \"longitude\": -0.022901231803803924,\n \"radius\": 100,\n \"message\": \"Welcome to the venue\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.passentry.com/api/v1/passes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pass\": {\n \"nfc\": {\n \"enabled\": false\n },\n \"fullName\": {\n \"value\": \"Jane Roberts\"\n }\n },\n \"message\": \"Your pass details have been updated. Click to show pass\",\n \"locations\": [\n {\n \"name\": \"Venue\",\n \"latitude\": 51.54321132456805,\n \"longitude\": -0.022901231803803924,\n \"radius\": 100,\n \"message\": \"Welcome to the venue\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.passentry.com/api/v1/passes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pass\": {\n \"nfc\": {\n \"enabled\": false\n },\n \"fullName\": {\n \"value\": \"Jane Roberts\"\n }\n },\n \"message\": \"Your pass details have been updated. Click to show pass\",\n \"locations\": [\n {\n \"name\": \"Venue\",\n \"latitude\": 51.54321132456805,\n \"longitude\": -0.022901231803803924,\n \"radius\": 100,\n \"message\": \"Welcome to the venue\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "d2ac8d95-6914-4cac-957c-2a5ccf534390",
"type": "pass",
"attributes": {
"downloadUrl": "https://www.example.com?pass=d2ac8d95-6914-4cac-957c-2a5ccf534390",
"passType": "generic",
"createdAt": "2022-01-01T00:00:00Z",
"status": "issued",
"extId": "b1985e420025dd92ccf2",
"passTemplateUuid": "2e2d7ee8c306e8f0223dbdc1",
"passTemplateName": "PassEntry Ticketing",
"nfc": null,
"barcode": {},
"latestMessage": "Your pass details have been updated. Click to show pass",
"passContent": {
"fullName": {
"value": "Jane Roberts"
},
"nfc": {
"enabled": false
}
}
}
},
"meta": {
"notifications": {
"status": "notDelivered",
"message": "Pass has not been added to the wallet"
}
}
}{
"errors": [
"<string>"
]
}{
"errors": [
"Access denied"
]
}{
"errors": [
"Pass with provided id not found"
]
}