Skip to main content

Pitches

Pitches are the physical, numbered units on the park. Each pitch belongs to an accommodation type and carries the electricity meter used for invoicing. Use pitches when the operation is about a place ("pitch 101's meter reading") rather than a product type.

The pitch object​

{
"id": "pitch-101",
"object": "pitch",
"number": "101",
"accommodation": "0F7p9sGHx",
"accommodation_type_name": "Super Pitch",
"status": "active",
"created": 1793061121,
"metadata": {}
}

status: active | maintenance | deleted.

Endpoints​

MethodPathDescription
GET/v1/pitchesList (filters: status, accommodation)
POST/v1/pitchesCreate
GET/v1/pitches/{id}Retrieve
PATCH/v1/pitches/{id}Update
DELETE/v1/pitches/{id}Soft delete

Create​

accommodation_type accepts the accommodation id or its display name. Pitch numbers are unique per site — creating a duplicate returns already_exists.

curl -s $API/v1/pitches -H "Authorization: Bearer $KEY" \
-H "Idempotency-Key: add-101" -H "Content-Type: application/json" \
-d '{"number":"101","accommodation_type":"Super Pitch"}'