OpenAPI Specification
The Basker Partner API provides an OpenAPI specification that describes all available endpoints, request/response schemas, and authentication requirements.
Accessing the Specification
Section titled “Accessing the Specification”The OpenAPI specification is available at the following endpoint:
GET https://api.basker.app/partners/2025-07/openapi
Available Formats
Section titled “Available Formats”You can request the specification in different formats using the format
query parameter:
OpenAPI 3.1 (default)
Section titled “OpenAPI 3.1 (default)”curl https://api.basker.app/partners/2025-07/openapi
OpenAPI 3.0
Section titled “OpenAPI 3.0”curl https://api.basker.app/partners/2025-07/openapi?format=openapi3.0
Swagger 2.0
Section titled “Swagger 2.0”curl https://api.basker.app/partners/2025-07/openapi?format=swagger2.0
Using the Specification
Section titled “Using the Specification”API Documentation Tools
Section titled “API Documentation Tools”The specification can be imported into various API documentation and testing tools:
- Postman: Import directly via URL or download and import the JSON file
- Insomnia: Use the import feature with the specification URL
- Swagger UI: Point Swagger UI to the specification endpoint
- OpenAPI Generator: Generate client SDKs in various languages
Example: Generate a TypeScript Client
Section titled “Example: Generate a TypeScript Client”# Install OpenAPI Generatornpm install -g @openapitools/openapi-generator-cli
# Generate TypeScript clientopenapi-generator-cli generate \ -i https://api.basker.app/partners/2025-07/openapi \ -g typescript-axios \ -o ./basker-api-client
Example: Import to Postman
Section titled “Example: Import to Postman”- Open Postman
- Click “Import” → “Link”
- Enter:
https://api.basker.app/partners/2025-07/openapi
- Click “Continue” → “Import”
Specification Updates
Section titled “Specification Updates”The OpenAPI specification is automatically generated from the API implementation, ensuring it stays up-to-date with the latest changes. When new endpoints or fields are added, they will be reflected in the specification immediately.
CORS Support
Section titled “CORS Support”The OpenAPI endpoint includes CORS headers, allowing it to be accessed directly from browser-based tools and documentation viewers.