Delete an event or replace its photos
Remove event configuration, or replace the photos on an event you keep. These are separate tasks with different results and recovery steps.
| Task | Operation | Result |
|---|---|---|
| Remove event configuration | DELETE /api/v1/admin/ti-event/{id} | HTTP 200 with a boolean result |
| Replace event photos | POST /api/v1/admin/ti-event/{id}/photo | HTTP 200 with base event fields and photo |
Before you start
Use an existing token authorized for the intended publication with an admin or partner role; root is also permitted. Readonly, manager and support discovery roles do not permit these writes. Service-account credentials are not supported. Keep privileged calls in trusted server code; the caller must be active and authorized for the selected publication.
| Input | Location / type | Requirement and meaning |
|---|---|---|
resource | Required header, string | Publication public key, supplied as RESOURCE_KEY. |
token | Required header, string | Existing eligible token, supplied as ADMIN_TOKEN. |
id | Required path, decimal event ID | Existing event in the selected publication. Obtain it through event discovery, not from a ticket or purchased pass. |
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. Photo examples also use PHOTO_PATH, the path to an ordinary local PNG image you retain. See example conventions. All examples are synthetic and unexecuted.
The deletion example uses fictional event 7001, which has no user passes on its ticket definitions. The photo example uses a separate existing event 5001; it does not upload to the deleted event. Review the intended event and its related settings before either write.
Delete event configuration
DELETE /api/v1/admin/ti-event/{id}
Remove an event's configuration and attempt to remove its ticket definitions. Any user pass on a ticket blocks that ticket's deletion, including an inactive pass. Remaining ticket definitions can also block deletion of the event. This is not a purchased-pass cancellation procedure.
Review access rules that reference the event or its tickets before deletion. Associated ticket discounts, event classification links, photo records and other configuration references can be removed. Shared Plans, promotions and classification records are not thereby deleted.
Deletion does not provide a refund or guaranteed admission/access-revocation workflow. Event photo records and stored image files are separate: deleting the event is not media-storage cleanup and does not guarantee withdrawal of old image URLs.
Request
Send the shared headers and an existing event ID. No request body is needed.
Example: Remove event 7001
In this fictional case, ticket definition 7101 belongs to event 7001 and has no user passes. The request reports whether the event deletion succeeded; HTTP 200 alone is not enough.
curl -X DELETE "${WALLKIT_API_BASE}/api/v1/admin/ti-event/7001" \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}"
const response = await fetch(`${process.env.WALLKIT_API_BASE}/api/v1/admin/ti-event/7001`, {
method: "DELETE",
headers: {resource: process.env.RESOURCE_KEY, token: process.env.ADMIN_TOKEN}
});
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/7001",
headers={"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"]},
method="DELETE")
try:
with urlopen(request) as response:
print(response.status, json.load(response))
except HTTPError as error:
print(error.code, json.load(error))
Synthetic HTTP 200 success excerpt:
{"result": true}
| Field | Type / presence | Meaning |
|---|---|---|
result | Boolean, returned on the normal HTTP 200 response | true reports event-deletion success. false does not report successful deletion. There is no event, items or data wrapper. |
False result and blocked deletion
A normal HTTP 200 response can instead report:
{"result": false}
Deletion did not succeed. Earlier configuration changes may remain; inspect the event and tickets before deciding what to do next.
If a linked ticket has user passes, the caught guard returns HTTP 500, not 409. Synthetic error excerpt:
{"error": "exception", "error_description": "Cannot be deleted while it has user passes"}
| HTTP status | API code / shape | Cause | Next action |
|---|---|---|---|
| 200 | result: false | Event deletion did not report success. | Inspect the event and ticket state; contact the integration operator if unclear. |
| 500 | exception; Cannot be deleted while it has user passes | A ticket has at least one user pass. | Stop this deletion workflow and review the event with the publication administrator. |
| 500 | exception; Cannot be deleted while it has tickets | Ticket definitions remain linked to the event. | Inspect the event's ticket configuration and ask the integration operator to review the outcome. |
| Varies | invalid_ti_event, description and request reference | Event lookup could not be completed. | Confirm the publication and an existing event ID. A missing event is not promised a uniform 404 response here. |
| 500 or no complete response | exception or failed/incomplete response | Deletion or its response could not complete normally. | Inspect stored state before another write; keep any request reference for the integration operator. |
See shared credential errors, applying this page's write roles. Next, check the publication's events and any remaining event/ticket configuration. A successful deletion response does not prove a refund, notification delivery or complete removal of every access reference.
Replace event photos
POST /api/v1/admin/ti-event/{id}/photo
Send one image to replace an existing event's photos. Old photos are removed before the replacement is complete. A failed request can leave missing or partial photos. Keep the original image available and check saved state before any retry; automatic restoration is not promised.
Request
Use an existing event ID, the shared headers and one multipart file. This replaces photos rather than adding an independent gallery item.
| Input | Location / type | Requirement and meaning |
|---|---|---|
photos | Multipart file part | Send one ordinary local image. Supported detected formats are PNG, JPEG, GIF and BMP. |
Content-Type | Multipart request header with boundary | cURL and Node FormData generate this header. The Python example constructs the boundary and matching body explicitly. |
Send one file per request. No numeric byte-size or dimension limit is specified here; use a supported image your integration can process. The result can contain resized variants; use the returned array rather than expecting a square crop, fixed dimensions or exactly three usable URLs.
Example: Replace photos on event 5001
Use a retained local PNG image at PHOTO_PATH. The multipart part is photos, with a synthetic filename event-photo.png. Do not put the image in the event's JSON create/update body.
curl -X POST "${WALLKIT_API_BASE}/api/v1/admin/ti-event/5001/photo" \
-H "resource: ${RESOURCE_KEY}" \
-H "token: ${ADMIN_TOKEN}" \
-F "photos=@${PHOTO_PATH};type=image/png;filename=event-photo.png"
import {readFile} from "node:fs/promises";
const form = new FormData();
const image = new Blob([await readFile(process.env.PHOTO_PATH)], {type: "image/png"});
form.append("photos", image, "event-photo.png");
const response = await fetch(`${process.env.WALLKIT_API_BASE}/api/v1/admin/ti-event/5001/photo`, {
method: "POST",
headers: {resource: process.env.RESOURCE_KEY, token: process.env.ADMIN_TOKEN},
body: form
});
console.log(response.status, await response.json());
import os, json, uuid
from pathlib import Path
from urllib.request import Request, urlopen
from urllib.error import HTTPError
boundary = "wallkit-" + uuid.uuid4().hex
part_header = (
f"--{boundary}\r\n"
'Content-Disposition: form-data; name="photos"; filename="event-photo.png"\r\n'
"Content-Type: image/png\r\n\r\n"
).encode("utf-8")
body = part_header + Path(os.environ["PHOTO_PATH"]).read_bytes()
body += f"\r\n--{boundary}--\r\n".encode("utf-8")
request = Request(os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/ti-event/5001/photo",
data=body,
headers={
"resource": os.environ["RESOURCE_KEY"],
"token": os.environ["ADMIN_TOKEN"],
"Content-Type": "multipart/form-data; boundary=" + boundary
},
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 200 excerpt; one returned photo item is shown:
{
"id": 5001,
"title": "Example Evening Session",
"photo": [
{"slug": "image_300", "url": "https://images.example.com/event-5001/photo.png"}
]
}
Response fields
HTTP 200 returns the base event fields and photo only. Use the scalar and photo rows in the shared event field definition, using only these fields for this response:
| Returned fields | Type / presence | Meaning |
|---|---|---|
| Event scalars | The 14 shared scalar fields | Event ID, text/contact/location settings, status, dates and flags. |
photo | Always an array; can be empty | Stored photo records. Inspect the actual array after a replacement or failed attempt. |
photo[].slug | Stored text / nullable value | Identifies a returned image variant. Do not depend on array order. |
photo[].url | Stored text / nullable value | Stored image URL. Check the result before use; every URL is not guaranteed present or usable after a partial outcome. |
This response omits tickets, taxonomies and content_types, even though other event operations return them. It has no items/data wrapper, upload-job ID or bare single-URL response. HTTP success is not a promise that every expected variant is available.
Missing image and recovery
For an existing event, a request without a selected image returns the caught upload error as HTTP 500. Synthetic error excerpt:
{"error": "exception", "error_description": "No image selected!"}
| HTTP status | API code / shape | Cause | Next action |
|---|---|---|---|
| 500 | exception; No image selected! | No uploaded image was selected. | Select one local image and send it in the photos multipart part. |
| 500 | exception; Wrong image format. To upload a photo, use png, jpg, gif or bmp image types. | The selected image did not meet the supported format checks. | Choose a PNG, JPEG, GIF or BMP image; keep the original and inspect saved photo state before another request. |
| 500 | exception; Failed to upload image or another description | Replacement could not complete normally. | Inspect saved photos first. Old photos may be gone and only part of the replacement may remain. |
| 404 | invalid_ti_event, description and request reference | A caught event lookup failed. | Verify the publication key and existing event ID. This is not a universal missing-event response. |
| Varies / no complete response | Failed or incomplete response | The event/photo request could not be completed normally. | Keep the original image and inspect stored state before retrying; contact the integration operator if unclear. |
See shared credential errors, applying this page's write roles. Next, read event 5001's configuration to check its saved photo array. The separate event-detail response can also show tickets and targeting; their omission from the upload response is expected.
Check the outcome before another write
After a failed, incomplete or false deletion result, inspect the event and ticket configuration. After a failed photo replacement, inspect the current photo array and retain your original file. Neither operation promises an unchanged prior state, automatic restoration, idempotency or unconditional rollback.
If the stored state or outcome is unclear, retain the request reference and ask the integration operator before submitting another write. Configured follow-up processing can occur after deletion; a response does not guarantee delivery or a broader business outcome.