# List Coworking Reservations GET https://api.trebellar.app/api/v2/coworking/reservations Retrieve a list of coworking space reservations with optional filtering by date range and geographic location. Returns all reservations accessible to the authenticated user that match the specified criteria. Reference: https://docs.trebellar.app/api-reference/api-resources/coworking/list-coworking-reservations ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: API version: 1.0.0 paths: /api/v2/coworking/reservations: get: operationId: list-coworking-reservations summary: List Coworking Reservations description: >- Retrieve a list of coworking space reservations with optional filtering by date range and geographic location. Returns all reservations accessible to the authenticated user that match the specified criteria. tags: - subpackage_coworking parameters: - name: startDate in: query required: false schema: type: string - name: endDate in: query required: false schema: type: string - name: lat in: query required: false schema: type: string - name: lon in: query required: false schema: type: string - name: radius in: query required: false schema: type: string - name: raw in: query required: false schema: type: string - name: X-Trebellar-Api-Key in: header required: true schema: type: string responses: '200': description: Coworking reservations retrieved successfully content: application/json: schema: $ref: '#/components/schemas/ListCoworkingReservationsResponse' '400': description: Invalid query parameters provided content: application/json: schema: $ref: '#/components/schemas/ErrorSchema' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchema' servers: - url: https://api.trebellar.app components: schemas: CoWorkReservationCost: type: object properties: amount: type: number format: double currency: type: string required: - amount - currency title: CoWorkReservationCost CoworkingReservationType: oneOf: - type: string enum: - ANY - type: string enum: - SPECIFIC_TIME_PERIOD - type: string enum: - DAY_PASS - type: string enum: - PERIOD - type: string enum: - ON_DEMAND title: CoworkingReservationType CoworkingReservationStatus: oneOf: - type: string enum: - DELETED - type: string enum: - COMPLETED - type: string enum: - CANCELLATION_POLICY - type: string enum: - FUTURE - type: string enum: - ACTIVE title: CoworkingReservationStatus CoworkingSpaceType: oneOf: - type: string enum: - MEETING - type: string enum: - OFFICE - type: string enum: - DESK - type: string enum: - TRAINING - type: string enum: - TEAM_SPACE - type: string enum: - PRIVATE_OFFICE - type: string enum: - EVENT_SPACE - type: string enum: - OPEN_DESK - type: string enum: - DEDICATED_DESK - type: string enum: - MEMBERSHIP - type: string enum: - ANY title: CoworkingSpaceType CoWorkReservation: type: object properties: id: type: string startDate: type: string endDate: type: string memberId: type: string teamId: type: string teamName: type: string locationId: type: string locationName: type: string workspaceId: type: string capacity: type: number format: double durationHours: type: number format: double invitedCount: type: number format: double providerId: type: string cost: $ref: '#/components/schemas/CoWorkReservationCost' reservationType: $ref: '#/components/schemas/CoworkingReservationType' status: $ref: '#/components/schemas/CoworkingReservationStatus' spaceType: $ref: '#/components/schemas/CoworkingSpaceType' raw: description: Any type required: - id - startDate - locationId - cost - reservationType - status - spaceType title: CoWorkReservation ListCoworkingReservationsResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/CoWorkReservation' required: - data title: ListCoworkingReservationsResponse ErrorSchema: type: object properties: code: type: number format: double message: type: string error: type: string details: type: object additionalProperties: description: Any type required: - code - message description: Common Error Schema title: ErrorSchema securitySchemes: apiKey: type: apiKey in: header name: X-Trebellar-Api-Key bearerAuth: type: http scheme: bearer ``` ## SDK Code Examples ```typescript import { TrebellarApiClient } from "@trebellar/api-sdk"; async function main() { const client = new TrebellarApiClient({ apiKey: "YOUR_API_KEY_HERE", }); await client.coworking.listCoworkingReservations({}); } main(); ``` ```python from trebellar import TrebellarApi client = TrebellarApi( api_key="YOUR_API_KEY_HERE", ) client.coworking.list_coworking_reservations() ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.trebellar.app/api/v2/coworking/reservations" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-Trebellar-Api-Key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.trebellar.app/api/v2/coworking/reservations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-Trebellar-Api-Key"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.trebellar.app/api/v2/coworking/reservations") .header("X-Trebellar-Api-Key", "") .asString(); ``` ```php request('GET', 'https://api.trebellar.app/api/v2/coworking/reservations', [ 'headers' => [ 'X-Trebellar-Api-Key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.trebellar.app/api/v2/coworking/reservations"); var request = new RestRequest(Method.GET); request.AddHeader("X-Trebellar-Api-Key", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["X-Trebellar-Api-Key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.trebellar.app/api/v2/coworking/reservations")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```