# ๐Ÿ”Œ OpenAPI Integration Guide This guide will help you integrate our OpenAPI-based API and generate a client SDK in the technology of your choice. ## ๐Ÿ“„ 1. Get the OpenAPI Specification Download or access the OpenAPI 3.0.3 spec for the Bookings VenueAPI: - **JSON format**: [OpenAPI JSON](https://bookable.redocly.app/_spec/apis/BookingApi.json?download) - **YAML format** (preferred): [OpenAPI YAML](https://bookable.redocly.app/_spec/apis/BookingApi.yaml?download) You can use this spec with a variety of tools to generate clients or documentation. ## โš™๏ธ 2. Generate Client SDKs Use the OpenAPI Generator or Swagger Codegen to generate client libraries in your preferred language: ### ๐Ÿ”ง OpenAPI Generator (Recommended) Install it via [npm](https://www.npmjs.com/package/@openapitools/openapi-generator-cli): ```bash npm install @openapitools/openapi-generator-cli -g ``` ### Generate a client (example in TypeScript): ```bash openapi-generator-cli generate \ -i https://api.bookabletech.com/openapi.json \ -g typescript-fetch \ -o ./venue-api-client ``` Supported languages include: * typescript-fetch * javascript * java * python * ruby * csharp * go * [Full list of generators](https://openapi-generator.tech/docs/generators) ๐Ÿ‘‰ [OpenAPI Generator Documentation](https://openapi-generator.tech/docs/usage) ### ๐Ÿงช Swagger Codegen (Alternative) If you prefer Swagger Codegen: ```bash brew install swagger-codegen Generate a client (example in Java): ``` ```bash swagger-codegen generate \ -i https://api.bookabletech.com/openapi.json \ -l java \ -o ./venue-api-client-java ``` ๐Ÿ‘‰ [Swagger Codegen GitHub](https://github.com/swagger-api/swagger-codegen) ### ๐Ÿ” 3. Authentication Setup Our API uses OAuth2 Client Credentials. You can obtain an access token by calling the Auth0 endpoint: ```bash curl -X POST https://bookabletech.uk.auth0.com/oauth/token \ -H "Content-Type: application/json" \ -d '{ "grant_type": "client_credentials", "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET", "audience": "api.bookabletech.com" }' ``` Use the returned access token in the Authorization header of your API calls: ```http Authorization: Bearer YOUR_ACCESS_TOKEN ``` ## ๐Ÿ“˜ Additional Resources [OpenAPI Specification](https://swagger.io/specification/v3/#version-3.0.3) Postman Import Guide Auth0 Client Credentials Grant