Assign an orphan legacy wallet pass to an org
curl -X POST "https://api.spkey.co/admin/wallet-passes/example_string/assign-org" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"orgId": "example_string",
"walletType": "APPLE"
}'
import requests
import json
url = "https://api.spkey.co/admin/wallet-passes/example_string/assign-org"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"orgId": "example_string",
"walletType": "APPLE"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.spkey.co/admin/wallet-passes/example_string/assign-org", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"orgId": "example_string",
"walletType": "APPLE"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"orgId": "example_string",
"walletType": "APPLE"
}`)
req, err := http.NewRequest("POST", "https://api.spkey.co/admin/wallet-passes/example_string/assign-org", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.spkey.co/admin/wallet-passes/example_string/assign-org')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"orgId": "example_string",
"walletType": "APPLE"
}'
response = http.request(request)
puts response.body
{}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Conflict",
"message": "The request conflicts with the current state of the resource",
"code": 409,
"details": "Resource already exists"
}
{
"error": "Service Unavailable",
"message": "The service is temporarily unavailable. Please try again later",
"code": 503
}
POST
/admin/wallet-passes/{keyUuid}/assign-orgPOST
Base URLstring
Target server for requests. Edit to use your own host.
⚠️Authentication configuration error - security schemes not found
path
keyUuidstring
RequiredMin length: 1 • Max length: 64
Content-Typestring
RequiredThe media type of the request body
Options: application/json
orgIdstring
RequiredMin length: 1
walletTypestring
RequiredOptions: APPLE, GOOGLE
Request Preview
Response
Response will appear here after sending the request
Path Parameters
Responses
Assigned
Was this page helpful?