openapi: 3.0.3 info: title: Siren by Jsonpage API version: 0.1.0-preview description: Preview specification. The public service is not yet available. servers: - url: https://siren.jsonpage.com description: Planned production endpoint security: - ApiKey: [] paths: /v1/companies/{siren}: get: summary: Look up a company by SIREN operationId: getCompany parameters: - name: siren in: path required: true schema: type: string pattern: '^[0-9]{9}$' responses: '200': description: Company found content: application/json: schema: $ref: '#/components/schemas/Company' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/DataUnavailable' '503': $ref: '#/components/responses/Unavailable' /v1/establishments/{siret}: get: summary: Look up an establishment by SIRET operationId: getEstablishment parameters: - name: siret in: path required: true schema: type: string pattern: '^[0-9]{14}$' responses: '200': description: Establishment found content: application/json: schema: $ref: '#/components/schemas/Establishment' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/DataUnavailable' '503': $ref: '#/components/responses/Unavailable' /v1/metadata: get: summary: Read stock metadata operationId: getMetadata responses: '200': description: Stock metadata content: application/json: schema: type: object additionalProperties: type: string '401': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/DataUnavailable' '503': $ref: '#/components/responses/Unavailable' components: securitySchemes: ApiKey: type: apiKey in: header name: X-API-Key schemas: Company: type: object required: [siren, diffusion_status, name, created_at, administrative_status, activity_code, legal_category, last_processed_at] properties: siren: type: string diffusion_status: type: string name: type: string nullable: true created_at: type: string nullable: true administrative_status: type: string nullable: true activity_code: type: string nullable: true legal_category: type: string nullable: true last_processed_at: type: string nullable: true Establishment: type: object required: [siret, siren, diffusion_status, name, address, created_at, administrative_status, activity_code, head_office, last_processed_at] properties: siret: type: string siren: type: string diffusion_status: type: string name: type: string nullable: true address: type: string nullable: true created_at: type: string nullable: true administrative_status: type: string nullable: true activity_code: type: string nullable: true head_office: type: boolean last_processed_at: type: string nullable: true Error: type: object required: [error] properties: error: type: string responses: BadRequest: description: Invalid SIREN or SIRET content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid API key content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: No matching record content: application/json: schema: $ref: '#/components/schemas/Error' TooManyRequests: description: Plan request rate exceeded headers: Retry-After: schema: type: string content: application/json: schema: $ref: '#/components/schemas/Error' Unavailable: description: Service temporarily busy or unavailable content: application/json: schema: $ref: '#/components/schemas/Error' DataUnavailable: description: Stock data could not be read content: application/json: schema: $ref: '#/components/schemas/Error'