Reservations API

The Reservations API allows you to reserve content on multiple map features at once, creating exhibitor content in catalogs and marking features as booked. This is particularly useful for event management scenarios where you need to track which exhibitors or vendors have reserved specific booth spaces or areas on your map.

When you reserve content on map features, the API performs several operations for each feature:

  1. Validates that the feature exists and is available for booking
  2. Finds all placements associated with the feature
  3. Creates reservation content in a catalog (defaults to 'reservations' if not specified)
  4. Creates attachments linking the feature to the reservation content
  5. Updates the feature's booking status to 'booked'

On this page, we'll explore the Reservations API that lets you programmatically manage reservations on your maps.

ENDPOINTS

POST /reservations/v1/{map_id}/{map_view_id}

POST/reservations/v1/{map_id}/{map_view_id}

Reserve content on map

This endpoint allows you to reserve content on multiple map features at once. It validates availability for each feature, creates reservation content in a catalog, and updates each feature's booking status.

Required attributes

  • Name
    feature_ids
    Type
    array
    Description

    List of feature IDs to reserve on the map.

  • Name
    data
    Type
    object
    Description

    Reservation metadata containing information about who is making the reservation and any relevant details.

Optional attributes

  • Name
    child_catalog_id
    Type
    string
    Description

    Optional catalog ID for storing reservations. Defaults to 'reservations' if not specified.

Response properties

  • Name
    reservations
    Type
    array
    Description

    List of reservation results for each feature that was processed.

Reservation item properties

  • Name
    feature_id
    Type
    string
    Description

    The ID of the reserved feature.

  • Name
    content_id
    Type
    string
    Description

    The ID of the created reservation content.

  • Name
    catalog_id
    Type
    string
    Description

    The ID of the catalog used for the reservation.

  • Name
    attachment_ids
    Type
    array
    Description

    List of attachment IDs created to link the feature to the reservation content.

  • Name
    booking_status
    Type
    string
    Description

    The updated booking status of the feature (will be 'booked').

  • Name
    leaf_placements_count
    Type
    integer
    Description

    Number of leaf placements found and processed for the feature.

POST /reservations/v1/{map_id}/{map_view_id}

API KEY SCOPE
map_view:write
curl https://api.waygomaps.com/reservations/v1/exhibition-2024/attendee-map \
    -X POST \
    -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
    -H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9" \
    -H "Content-Type: application/json" \
    -d '{
      "feature_ids": ["booth-a-101", "booth-a-102"],
      "child_catalog_id": "exhibitor-reservations",
      "data": {
        "company_name": "TechCorp Solutions",
        "contact_email": "contact@techcorp.com",
        "contact_phone": "+1 (555) 123-4567",
        "booth_size": "10x10",
        "reservation_date": "2024-03-15T10:00:00Z",
        "special_requirements": "Electrical outlet required"
      }
    }'

Response

{
  "reservations": [
    {
      "feature_id": "booth-a-101",
      "content_id": "cntnt_8fh93h4f983h4f93",
      "catalog_id": "exhibitor-reservations",
      "attachment_ids": [
        "attch_93hf93h49f3h49f3",
        "attch_84hf93h49f3h49f4"
      ],
      "booking_status": "booked",
      "leaf_placements_count": 2
    },
    {
      "feature_id": "booth-a-102",
      "content_id": "cntnt_9fh93h4f983h4f94",
      "catalog_id": "exhibitor-reservations",
      "attachment_ids": [
        "attch_95hf93h49f3h49f5",
        "attch_86hf93h49f3h49f6"
      ],
      "booking_status": "booked",
      "leaf_placements_count": 1
    }
  ]
}

Error responses

The Reservations API returns standard HTTP status codes and error responses:

404 Not Found

Returned when one or more specified features are not found on the map.

404 Error Response

{
  "error": "Feature Not Found",
  "message": "One or more features from the list ['booth-a-101', 'booth-a-102'] were not found on the specified map view.",
  "code": "FEATURE_NOT_FOUND"
}

409 Conflict

Returned when one or more features are already booked and cannot be reserved.

409 Error Response

{
  "error": "Feature Already Booked",
  "message": "One or more features from the list ['booth-a-101', 'booth-a-102'] are already reserved and cannot be booked again.",
  "code": "FEATURE_ALREADY_BOOKED"
}

422 Unprocessable Entity

Returned when the request data is invalid or cannot be processed.

422 Error Response

{
  "error": "Unprocessable Entity",
  "message": "The reservation data provided is invalid. Please check your request format.",
  "code": "INVALID_REQUEST_DATA"
}

Example use cases

Event booth reservation

Reserve multiple booth spaces for an exhibitor at a trade show:

Multiple Booth Reservation

curl https://api.waygomaps.com/reservations/v1/trade-show-2024/main-hall \
    -X POST \
    -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
    -H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9" \
    -H "Content-Type: application/json" \
    -d '{
      "feature_ids": ["booth-c-205", "booth-c-206"],
      "data": {
        "company_name": "Innovation Labs",
        "contact_email": "sales@innovationlabs.com",
        "booth_size": "20x20",
        "reservation_date": "2024-06-15T09:00:00Z"
      }
    }'

Meeting room booking

Reserve multiple meeting rooms for a conference:

Multiple Meeting Room Booking

curl https://api.waygomaps.com/reservations/v1/office-building/conference-floor \
    -X POST \
    -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
    -H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9" \
    -H "Content-Type: application/json" \
    -d '{
      "feature_ids": ["conference-room-a", "conference-room-b"],
      "child_catalog_id": "room-bookings",
      "data": {
        "meeting_title": "Q4 Planning Session",
        "organizer": "john.doe@company.com",
        "attendees": ["jane.smith@company.com", "bob.wilson@company.com"],
        "start_time": "2024-03-20T14:00:00Z",
        "end_time": "2024-03-20T16:00:00Z",
        "equipment_needed": ["projector", "whiteboard"]
      }
    }'

Parking space reservation

Reserve multiple parking spaces for an event:

Multiple Parking Space Reservation

curl https://api.waygomaps.com/reservations/v1/event-center/parking-lot \
    -X POST \
    -H "Waygo-API-Key: eyJhbGciOiJIU...sXSJE_1AJgMEnI_g-WTerk" \
    -H "Waygo-Account: n33f9h0fh9324hf9h439fh9h2f9h93h9" \
    -H "Content-Type: application/json" \
    -d '{
      "feature_ids": ["parking-space-42", "parking-space-43"],
      "data": {
        "license_plate": "ABC-1234",
        "vehicle_type": "sedan",
        "reservation_date": "2024-04-10T18:00:00Z",
        "duration_hours": 4,
        "contact_phone": "+1 (555) 987-6543"
      }
    }'