Bookings Endpoint

For full field documentation, see the Booking entity.

Endpoints

List Bookings

GET /api/f1/sync/bookings

Returns a paginated list of external bookings (those with an external_id) with filtering options. Pass include_all=true to also list bookings without an external_id - for example those created in the FreeFallFilms website.

Query Parameters

Parameter Type Description
page integer Page number (default: 1)
per_page integer Number of items per page (default: 200, max: 200)
include_all boolean true to include bookings without an external_id (default: false)
q[name_cont] string Filter by name (contains)
q[email_cont] string Filter by email (contains)
q[jump_on_gteq] date Filter by jump date greater than or equal (format: YYYY-MM-DD)
q[jump_on_lteq] date Filter by jump date less than or equal (format: YYYY-MM-DD)
q[jump_on_lt] date Filter by jump date less than (format: YYYY-MM-DD)
q[jump_on_gt] date Filter by jump date greater than (format: YYYY-MM-DD)

Response

{
  "bookings": [
    {
      "id": 57,
      "uuid": "93f62b49-f654-4ea1-ad34-c44e475fb2c7",
      "link": "vkdhhrjkkdh",
      "external_id": "EXT123",
      "name": "John Smith",
      "email": "john@example.com",
      "jump_on": "2024-02-15",
      "show_publicly": true
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 200,
    "total_pages": 1,
    "total_count": 1,
    "next_page": null,
    "prev_page": null
  }
}

(some fields omitted for brevity)

Example Requests

Get all external bookings (paginated): http GET /api/f1/sync/bookings

Get second page with 50 items per page: http GET /api/f1/sync/bookings?page=2&per_page=50

Get all bookings, including those without an external ID: http GET /api/f1/sync/bookings?include_all=true

Filter bookings by name: http GET /api/f1/sync/bookings?q[name_cont]=Smith

Filter bookings by date range: http GET /api/f1/sync/bookings?q[jump_on_gteq]=2024-01-01&q[jump_on_lteq]=2024-01-31

Get Booking

GET /api/f1/sync/bookings/:external_id

Retrieves a specific booking by their external ID. Includes nested jump and finance_events data.

Response

{
  "id": 57,
  "uuid": "93f62b49-f654-4ea1-ad34-c44e475fb2c7",
  "link": "vkdhhrjkkdh",
  "external_id": "EXT123",
  "name": "John Smith",
  "email": "john@example.com",
  "jump_on": "2024-02-15",
  "album_status_raw": "delivered_paid",
  "jump": {
    "id": 123,
    "camera": "videographer"
  },
  "finance_events": [
    {
      "id": 456,
      "event_type": "initial_product"
    }
  ]
}

(some fields omitted for brevity - see Booking entity for full field list)

Create Booking

POST /api/f1/sync/bookings

Creates a new booking. External ID is required.

Request Format

{
  "external_id": "EXT123",
  "external_service": "Skydive Bookomax",
  "name": "John Smith",
  "email": "john@example.com",
  "mobile": "1234567890",
  "jump_on": "2024-02-15",
  "language": "en",
  "reference": "First time jumper, excited!",
  "camera_package": "video and photos",
  "show_publicly": true
}

See Booking entity for full field descriptions.

Note - external_service will be enforced as mandatory in a future version of the API.

Success Response

{
  "id": 57,
  "external_id": "EXT123",
  "name": "John Smith",
  "status": "created"
}

(some fields omitted for brevity)

Error Responses

{
  "error": "requires external id",
  "status": "unprocessable_content"
}
{
  "error": "booking is too old",
  "status": "not_acceptable"
}

Update Booking

POST /api/f1/sync/bookings

To update - simply call create again with the same external_id.

The only difference is that you'll get a status ok rather than status created. For partial updates where some changes were ignored due to locked attributes, you'll get status partial_update.

Parameters

Same as Create, but you only need to send fields that you want to change.

Success Response

{
  "external_id": "EXT123",
  "name": "John Smith",
  "status": "ok"
}

Partial Update Response

{
  "external_id": "EXT123",
  "status": "partial_update",
  "warning": "product locked, some changes ignored"
}

Delete Booking

DELETE /api/f1/sync/bookings/:external_id

Permanently deletes a booking.

Response

Returns 204 No Content on success.

Notes

  • Only bookings with external IDs can be fetched, created, updated or deleted through this API. include_all=true lists the others, but they can't be addressed individually
  • Ancient bookings (>14 days old) cannot be created/updated [specifically where jump_on would be too old after update]
  • External ids cannot be reused: an update whose external_id belongs to a booking that was already delivered for a jump more than 60 days ago is rejected with 409 conflict. Issue a new external_id for each jump rather than recycling one
  • Some attributes may be locked if the booking has a product, or the user has manually changed them in the web interface
  • Validation errors will return appropriate error messages and status codes
  • Create/Update operations return the complete booking object with a status field
  • Products in the FFF system need to be manually configured so that they match with the camera_package names provided by the external system