Skip to main content

List Resources by Venue

Retrieve all active resources for a specific venue.
curl -X GET "https://api.hub.example/api/venues/{venueId}/resources" \
  -H "Content-Type: application/json"

Path Parameters

venueId
string (UUID)
required
The unique identifier of the venue

Response

id
string (UUID)
required
Unique identifier for the resource
venueId
string (UUID)
required
ID of the parent venue
name
string
required
Resource name (e.g., “Court 1”)
description
string
Resource description
type
string
required
Resource type (e.g., PADEL_COURT, TENNIS_COURT)
slotDurationMinutes
integer
required
Duration of each booking slot in minutes
status
string
required
Resource status (ACTIVE, SUSPENDED, PENDING_APPROVAL, REJECTED)
rejectReason
string
Reason for rejection if status is REJECTED
schedules
array
Weekly schedule defining opening hours
dayOfWeek
string
Day of week (MONDAY, TUESDAY, etc.)
openingTime
string (HH:mm:ss)
Opening time
closingTime
string (HH:mm:ss)
Closing time
priceRules
array
Pricing rules for different time periods
id
string (UUID)
Price rule identifier
dayType
string
WEEKDAY, WEEKEND, or HOLIDAY
startTime
string (HH:mm:ss)
Start time for this pricing rule
endTime
string (HH:mm:ss)
End time for this pricing rule
price
number
Price per slot
currency
string
Currency code (e.g., EUR, USD)
images
array
Array of resource images
id
string (UUID)
Image identifier
url
string
Image URL
publicId
string
Public ID for CDN reference
createdAt
string (ISO 8601)
required
Creation timestamp
updatedAt
string (ISO 8601)
required
Last update timestamp

Get Resource Availability

Get available time slots for a specific resource on a given date.
curl -X GET "https://api.hub.example/api/resources/{id}/slots?date=2026-03-15" \
  -H "Content-Type: application/json"

Path Parameters

id
string (UUID)
required
The unique identifier of the resource

Query Parameters

date
string (ISO 8601 date)
required
The date to check availability (format: YYYY-MM-DD)

Response

startTime
string (HH:mm:ss)
required
Slot start time
endTime
string (HH:mm:ss)
required
Slot end time
available
boolean
required
Whether this slot is available for booking
price
number
required
Price for this slot
currency
string
required
Currency code (e.g., EUR, USD)
The availability endpoint returns all slots for the specified date according to the resource’s schedule. Unavailable slots have available: false.

Create Resource (Owner)

Create a new resource within a venue. Requires owner authentication.
curl -X POST "https://api.hub.example/api/owner/venues/{venueId}/resources" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Court 1",
    "description": "Main padel court with professional surface",
    "type": "PADEL_COURT",
    "slotDurationMinutes": 90
  }'

Path Parameters

venueId
string (UUID)
required
The unique identifier of the venue

Request Body

name
string
required
Resource name (must not be blank)
description
string
Detailed description of the resource
type
string
required
Resource type (e.g., PADEL_COURT, TENNIS_COURT)
slotDurationMinutes
integer
required
Duration of each booking slot in minutes (e.g., 60, 90)

Response

Returns the created resource object (201 Created).

Set Resource Schedule (Owner)

Set the operating hours for a specific day of the week.
curl -X PUT "https://api.hub.example/api/owner/resources/{id}/schedules" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "dayOfWeek": "MONDAY",
    "openingTime": "08:00:00",
    "closingTime": "22:00:00"
  }'

Path Parameters

id
string (UUID)
required
The unique identifier of the resource

Request Body

dayOfWeek
string
required
Day of week (MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY)
openingTime
string (HH:mm:ss)
required
Opening time in 24-hour format
closingTime
string (HH:mm:ss)
required
Closing time in 24-hour format

Response

Returns the updated resource object with the new schedule.

Add Price Rule (Owner)

Add a pricing rule to a resource for specific time periods.
curl -X POST "https://api.hub.example/api/owner/resources/{id}/price-rules" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "dayType": "WEEKDAY",
    "startTime": "09:00:00",
    "endTime": "17:00:00",
    "price": 35.00,
    "currency": "EUR"
  }'

Path Parameters

id
string (UUID)
required
The unique identifier of the resource

Request Body

dayType
string
required
Day type: WEEKDAY, WEEKEND, or HOLIDAY
startTime
string (HH:mm:ss)
required
Start time for this pricing rule
endTime
string (HH:mm:ss)
required
End time for this pricing rule
price
number
required
Price per slot
currency
string
required
Currency code (e.g., EUR, USD, GBP)

Response

Returns the updated resource object with the new price rule included.

Remove Price Rule (Owner)

Remove a pricing rule from a resource.
curl -X DELETE "https://api.hub.example/api/owner/resources/{id}/price-rules/{ruleId}" \
  -H "Authorization: Bearer YOUR_TOKEN"

Path Parameters

id
string (UUID)
required
The unique identifier of the resource
ruleId
string (UUID)
required
The unique identifier of the price rule to remove

Response

Returns 204 No Content on success.

Suspend Resource (Owner)

Temporarily suspend a resource, making it unavailable for bookings.
curl -X PATCH "https://api.hub.example/api/owner/resources/{id}/suspend" \
  -H "Authorization: Bearer YOUR_TOKEN"

Path Parameters

id
string (UUID)
required
The unique identifier of the resource to suspend

Response

Returns 204 No Content on success.

Reactivate Resource (Owner)

Reactivate a previously suspended resource.
curl -X PATCH "https://api.hub.example/api/owner/resources/{id}/reactivate" \
  -H "Authorization: Bearer YOUR_TOKEN"

Path Parameters

id
string (UUID)
required
The unique identifier of the resource to reactivate

Response

Returns 204 No Content on success.

Get My Resources (Owner)

Retrieve all resources across all venues owned by the authenticated user.
curl -X GET "https://api.hub.example/api/owner/resources" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

Returns an array of resource objects across all venues owned by the authenticated user.

Add Resource Image (Owner)

Add an image to a resource.
Images should be uploaded to your CDN (e.g., Cloudinary) first, then the URL and public ID should be submitted to this endpoint.
curl -X POST "https://api.hub.example/api/owner/resources/{id}/images" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "url": "https://cdn.example.com/images/court-1.jpg",
    "publicId": "resources/court_xyz789"
  }'

Path Parameters

id
string (UUID)
required
The unique identifier of the resource

Request Body

url
string
required
Full URL to the image (must not be blank)
publicId
string
required
Public identifier from your CDN (must not be blank)

Response

Returns the updated resource object with the new image included.

Delete Resource Image (Owner)

Remove an image from a resource.
curl -X DELETE "https://api.hub.example/api/owner/resources/{id}/images/{imageId}" \
  -H "Authorization: Bearer YOUR_TOKEN"

Path Parameters

id
string (UUID)
required
The unique identifier of the resource
imageId
string (UUID)
required
The unique identifier of the image to remove

Response

Returns 200 OK on success.

Build docs developers (and LLMs) love