Create owned event passes
Create pass records owned by a reader for an existing event ticket. Ownership is separate from assignment, purchase, reader membership and admission. This operation does not take an assignee, payment or activation setting as an input.
| Task | Operation | Normal response |
|---|---|---|
| Create owned pass records | POST /api/v1/admin/ti-event/ticket/{ticket_id}/passes | HTTP 201 with the ticket's base pass inventory under items |
Before you call
Use an existing token authorized for the selected publication with an admin or partner role; root is also permitted. The caller must be active and authorized for that publication. Service-account credentials are not supported. Keep privileged calls in trusted server code.
Have an existing ticket in this publication and a reader already registered with the publication. Registration here means an existing reader/publication relationship; a paid membership is not required by this operation. Find the ticket through event and ticket discovery, and choose an existing reader through reader discovery.
| Input | Location / type | Requirement and meaning |
|---|---|---|
resource | Required header, string | Publication public key, supplied as RESOURCE_KEY. |
token | Required header, string | Existing eligible staff token, supplied as ADMIN_TOKEN. |
Content-Type | Request header | Use application/json. |
ticket_id | Required path, decimal ticket-definition ID | Existing ticket in the selected publication, such as 5101. It is not an event, pass or reader ID. |
owner_id | Required JSON field, integer reader ID | Reader with an existing registration in the ticket's publication. The owner need not be the caller. |
quantity | JSON integer | Send an explicit positive integer count for this workflow. |
Capacity compares the ticket's configured quantity with all existing passes, including inactive and unassigned records. Keep the requested count within the available configured capacity. Available capacity can change. This check does not reserve passes or guarantee that order limits are enforced.
Send only the supported creation fields. This request does not set an assigned person, active, extra configuration or an authorization token. Inspect returned/stored settings rather than assuming defaults for fields the request does not set.
Examples use cURL, Node.js 18+ built-in fetch in an ES module (.mjs), and Python 3 urllib. Set WALLKIT_API_BASE to scheme and host only, plus RESOURCE_KEY and ADMIN_TOKEN. See example conventions. All examples are synthetic and unexecuted.
Example: Request two passes for owner 9301
Fictional ticket 5101 belongs to event 5001 in the selected publication. Reader 9301 is already registered there, and this fixture assumes sufficient capacity. An existing pass 9001 is owned by reader 9101 and assigned to reader 9201; it can still appear in the returned ticket inventory.
curl -X POST "${WALLKIT_API_BASE}/api/v1/admin/ti-event/ticket/5101/passes" \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}" \
-H "Content-Type: application/json" \
--data '{"owner_id":9301,"quantity":2}'
const response = await fetch(`${process.env.WALLKIT_API_BASE}/api/v1/admin/ti-event/ticket/5101/passes`, {
method: "POST",
headers: {resource: process.env.RESOURCE_KEY, token: process.env.ADMIN_TOKEN, "Content-Type": "application/json"},
body: JSON.stringify({owner_id: 9301, quantity: 2})
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError
request = Request(os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/ti-event/ticket/5101/passes",
data=json.dumps({"owner_id": 9301, "quantity": 2}).encode("utf-8"),
headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"], "Content-Type": "application/json"},
method="POST")
try:
with urlopen(request) as response:
print(response.status, json.load(response))
except HTTPError as error:
print(error.code, json.load(error))
Synthetic HTTP 201 excerpt: this illustration assumes both requested records were saved and included in the inventory. Only ID/ownership fields are shown; other fields and existing records are omitted.
{
"items": [
{"id": 9001, "owner_id": 9101, "assign_id": 9201},
{"id": 9004, "owner_id": 9301, "assign_id": null},
{"id": 9005, "owner_id": 9301, "assign_id": null}
]
}
The returned items can include passes that already existed and belong to other owners. HTTP 201 does not confirm that all requested passes were saved or that this list reflects the latest state. Other changes can also make a before-and-after comparison uncertain. Check saved state before issuing more passes. Null assignments in the excerpt are illustrative; do not assume new passes always receive that value.
Response fields
The normal response is the ticket's base pass inventory, including records owned by other readers. Each pass selects exactly these five fields; ticket context comes from the path. Ordering is unspecified, and there is no pagination or data wrapper.
| Field | Type / presence | Meaning |
|---|---|---|
items | Array | Base pass records for the ticket, not only records created by this request. |
items[].id | Stored numeric identifier | Pass ID, distinct from ticket-definition ID. |
items[].owner_id | Stored numeric reference / nullable value | Pass owner; ownership does not imply assignment. |
items[].assign_id | Stored numeric reference / null | Assigned person, or no stored assignment. |
items[].extra | Decoded JSON or stored value / null | Additional stored pass data with variable shape and sensitivity; see base-pass JSON handling. |
items[].active | Stored flag / nullable value | Stored active setting, not an admission result. The creation request does not set it. |
No profile, authentication-link, token, timestamp or nested ticket/event expansion is added. Stored scalar representations are not uniformly normalized, and no active/default value is assumed in this example.
Capacity failure and recovery
A caught capacity validation failure returns HTTP 409. Synthetic error excerpt:
{"error": "invalid_quantity", "error_description": "Not enough tickets"}
| HTTP status | API code / shape | Cause | Next action |
|---|---|---|---|
| 409 | invalid_ticket, description | Ticket or its parent event could not be validated in the selected publication. | Confirm the publication and ticket ID through discovery/detail. |
| 406 | incorrect_data; Body must be json format | Missing or unusable JSON body. | Send the JSON object and content type shown above. |
| 409 | invalid_quantity; Not enough tickets | Capacity validation did not accept the requested count. | Review configured quantity and existing passes; inactive/unassigned records also count. |
| 409 | invalid_owner_id, description | Required owner or their publication registration could not be validated. | Confirm the intended registered reader; a paid membership is a separate concept. |
| 412 | error; Unknown error | Pass creation could not complete normally. | Inspect ticket inventory before retrying; some records may already have been saved. |
| Varies / no complete response | Failed or incomplete response | Creation or the later inventory response could not be completed normally. | Retain any request reference and inspect stored state; do not treat an incomplete response as confirmation that the requested count was saved. |
See shared credential errors, applying this page's write roles. After a failed or ambiguous write, check the ticket's base pass inventory before deciding on another request. If the outcome remains unclear, ask the integration operator; idempotency and automatic rollback are not promised.
Next, use that inventory to confirm ownership and stored settings. Creating owned passes does not assign an attendee, prove a payment, create a reader membership or decide admission.