openapi: "3.0.2" info: title: LPA UID Service version: "1.0" license: name: MIT url: https://opensource.org/licenses/MIT servers: - url: https://lpa-uid.api.opg.service.justice.gov.uk description: Production - url: https://preproduction.lpa-uid.api.opg.service.justice.gov.uk description: Preproduction - url: https://development.lpa-uid.api.opg.service.justice.gov.uk description: Development security: - {} paths: /cases: post: operationId: createCase summary: Generate a case UID requestBody: content: application/json: schema: type: object required: - type - source - donor properties: type: type: string enum: - "property-and-affairs" - "personal-welfare" source: type: string enum: - "APPLICANT" - "PHONE" donor: type: object required: - name - dob - postcode properties: name: type: string example: Jacalyn Petralba dob: type: string format: date postcode: type: string maxLength: 7 example: EC1A1BB additionalProperties: false responses: "201": description: Case created content: application/json: schema: type: object properties: uid: type: string pattern: "M-([346789QWERTYUPADFGHJKLXCVBNM]{4})-([346789QWERTYUPADFGHJKLXCVBNM]{4})-([346789QWERTYUPADFGHJKLXCVBNM]{4})" example: M-789Q-P4DF-4UX3 additionalProperties: false "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/BadRequestError" x-amazon-apigateway-auth: type: "AWS_IAM" x-amazon-apigateway-integration: uri: ${create_case_lambda_invoke_arn} httpMethod: "POST" type: "aws_proxy" contentHandling: "CONVERT_TO_TEXT" /health: get: operationId: healthCheck summary: Health check endpoint for external services to consume responses: 200: description: Healthy content: application/json: schema: type: object properties: status: type: string example: OK additionalProperties: false 503: description: Service unavailable content: application/json: schema: type: object properties: status: type: string example: Unhealthy additionalProperties: false x-amazon-apigateway-auth: type: "AWS_IAM" x-amazon-apigateway-integration: type: "mock" responses: default: statusCode: 200 responseTemplates: application/json: "{\"status\":\"ok\", \"statusCode\":200}" requestTemplates: application/json: "{\"statusCode\": 200}" passthroughBehavior: "when_no_templates" components: schemas: AbstractError: type: object required: - code - detail properties: code: type: string detail: type: string BadRequestError: allOf: - $ref: "#/components/schemas/AbstractError" - type: object properties: code: enum: ["INVALID_REQUEST"] errors: type: array items: type: object required: - source - detail properties: source: type: string format: jsonpointer detail: type: string example: - source: "/donor/dob" detail: "must match format YYYY-MM-DD"