openapi: 3.2.0 info: title: CoworkingView Rankings API version: 1.0.0 description: 'Read API for the CoworkingView catalogue plus the lead write path. Within a major version this contract is APPEND-ONLY: fields are added, never removed or retyped, because clients include mobile builds that cannot be recalled. A breaking change means /v2, with /v1 kept alive for at least two app releases.' servers: - url: https://api.coworkingview.com description: Production - url: http://localhost:4000 description: Local development tags: - name: Rankings paths: /v1/rankings: get: operationId: rankings summary: '"Best of {city}" ranking; score is relative within the city only, never…' description: Best-of ranking for one city. The score is an ordering key within that city only — never compare scores across cities or print the number as a rating. No API key. tags: - Rankings parameters: - name: locale in: query required: true schema: type: string enum: - en - de - es - name: city in: query required: true schema: type: string minLength: 1 maxLength: 200 pattern: ^[a-z0-9-]+$ - name: limit in: query required: false schema: default: 10 type: integer exclusiveMinimum: 0 maximum: 25 responses: '200': description: Success content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: data: type: object properties: city: type: object properties: slug: type: string minLength: 1 maxLength: 200 pattern: ^[a-z0-9-]+$ name: type: string required: - slug - name additionalProperties: false currency: type: string enum: - EUR - GBP - USD - CHF - VES - AED sampleSize: type: integer minimum: 0 maximum: 9007199254740991 description: How many properties in this city were eligible for ranking. hasReviewData: type: boolean description: False when no third-party ratings were available for this city; ranked[].rating will be absent for every entry in that case. ranked: type: array items: type: object properties: slug: type: string minLength: 1 maxLength: 200 pattern: ^[a-z0-9-]+$ title: type: string score: type: number description: Composite ranking score, relative to other properties in THIS city only (see RankingSchema.city). Not comparable across cities — a score of 80 in Berlin and 80 in Madrid do not mean the same thing. entryPrice: type: object properties: amount: type: number minimum: 0 currency: type: string enum: - EUR - GBP - USD - CHF - VES - AED required: - amount - currency additionalProperties: false rating: type: object properties: score: type: number minimum: 0 maximum: 5 count: type: integer minimum: 0 maximum: 9007199254740991 required: - score - count additionalProperties: false amenityCount: type: integer minimum: 0 maximum: 9007199254740991 required: - slug - title - score - amenityCount additionalProperties: false asOf: type: string format: date-time pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$ required: - city - currency - sampleSize - hasReviewData - ranked - asOf additionalProperties: false meta: type: object properties: contractVersion: type: string pagination: type: object properties: page: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 pageSize: type: integer exclusiveMinimum: 0 maximum: 9007199254740991 total: type: integer minimum: 0 maximum: 9007199254740991 pageCount: type: integer minimum: 0 maximum: 9007199254740991 required: - page - pageSize - total - pageCount additionalProperties: false truncated: type: boolean seed: type: integer minimum: -9007199254740991 maximum: 9007199254740991 required: - contractVersion additionalProperties: false required: - data - meta additionalProperties: false '400': description: VALIDATION_FAILED content: application/problem+json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: type: type: string title: type: string status: type: integer minimum: 400 maximum: 599 detail: type: string code: type: string enum: - VALIDATION_FAILED - NOT_FOUND - RATE_LIMITED - CHALLENGE_FAILED - UPSTREAM_UNAVAILABLE - INTERNAL_ERROR - CLIENT_TOO_OLD - IDEMPOTENCY_KEY_CONFLICT errors: type: array items: type: object properties: path: type: string message: type: string required: - path - message additionalProperties: false traceId: type: string required: - type - title - status - code additionalProperties: false '429': description: RATE_LIMITED content: application/problem+json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: type: type: string title: type: string status: type: integer minimum: 400 maximum: 599 detail: type: string code: type: string enum: - VALIDATION_FAILED - NOT_FOUND - RATE_LIMITED - CHALLENGE_FAILED - UPSTREAM_UNAVAILABLE - INTERNAL_ERROR - CLIENT_TOO_OLD - IDEMPOTENCY_KEY_CONFLICT errors: type: array items: type: object properties: path: type: string message: type: string required: - path - message additionalProperties: false traceId: type: string required: - type - title - status - code additionalProperties: false '500': description: INTERNAL_ERROR content: application/problem+json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: type: type: string title: type: string status: type: integer minimum: 400 maximum: 599 detail: type: string code: type: string enum: - VALIDATION_FAILED - NOT_FOUND - RATE_LIMITED - CHALLENGE_FAILED - UPSTREAM_UNAVAILABLE - INTERNAL_ERROR - CLIENT_TOO_OLD - IDEMPOTENCY_KEY_CONFLICT errors: type: array items: type: object properties: path: type: string message: type: string required: - path - message additionalProperties: false traceId: type: string required: - type - title - status - code additionalProperties: false '502': description: UPSTREAM_UNAVAILABLE content: application/problem+json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: type: type: string title: type: string status: type: integer minimum: 400 maximum: 599 detail: type: string code: type: string enum: - VALIDATION_FAILED - NOT_FOUND - RATE_LIMITED - CHALLENGE_FAILED - UPSTREAM_UNAVAILABLE - INTERNAL_ERROR - CLIENT_TOO_OLD - IDEMPOTENCY_KEY_CONFLICT errors: type: array items: type: object properties: path: type: string message: type: string required: - path - message additionalProperties: false traceId: type: string required: - type - title - status - code additionalProperties: false x-cache: maxAge: 600 staleWhileRevalidate: 3600