|
| 1 | +openapi: 3.0.3 |
| 2 | +info: |
| 3 | + title: Interoperability APIs - Locations |
| 4 | + x-logo: |
| 5 | + url: 'https://spdci.github.io/api-documentation/draft/dci-logo.png' |
| 6 | + backgroundColor: '#FFFFFF' |
| 7 | + altText: Digital Convergence Initiative |
| 8 | + description: Provide the location structure tree of the CRVS system |
| 9 | + version: 1.0.0 |
| 10 | + contact: |
| 11 | + name: DCI Social Protection |
| 12 | + |
| 13 | + license: |
| 14 | + name: DCI Social Protection License |
| 15 | + url: 'https://github.com/spdci/standards/blob/draft/LICENSE.md' |
| 16 | +servers: |
| 17 | + - url: 'https://sandbox.spdci.org/namespace/v1.0.0' |
| 18 | + description: Sandbox Server |
| 19 | +paths: |
| 20 | + /.well-known/locations.json: |
| 21 | + get: |
| 22 | + summary: 'Locations : /.well-known/locations.json' |
| 23 | + description: This endpoint can be used to build a location tree of the CRVS system or to find a specific location details |
| 24 | + operationId: get_locations_json |
| 25 | + responses: |
| 26 | + '200': |
| 27 | + description: Locations response |
| 28 | + content: |
| 29 | + application/json: |
| 30 | + schema: |
| 31 | + description: LocationHierarchy |
| 32 | + type: object |
| 33 | + properties: |
| 34 | + '@context': |
| 35 | + type: object |
| 36 | + description: JSON-LD Schema Context |
| 37 | + properties: |
| 38 | + '@context': |
| 39 | + type: string |
| 40 | + const: 'http://spdci.org/' |
| 41 | + xsd: |
| 42 | + type: string |
| 43 | + const: 'http://www.w3.org/2001/XMLSchema#' |
| 44 | + schema: |
| 45 | + type: string |
| 46 | + const: 'http://schema.org/' |
| 47 | + required: |
| 48 | + - '@context' |
| 49 | + - xsd |
| 50 | + - schema |
| 51 | + '@type': |
| 52 | + type: string |
| 53 | + const: LocationHierarchy |
| 54 | + lastUpdated: |
| 55 | + example: '2023-10-17T11:26:02.512+00:00' |
| 56 | + description: | |
| 57 | + 1. All dates and timestamps are represented in [ISO 8601](https://www.iso.org/standard/40874.html) format including timezone - e.g 2022-12-04T17:20:07-04:00. |
| 58 | + type: string |
| 59 | + format: date-time |
| 60 | + locations: |
| 61 | + type: array |
| 62 | + description: An array of all Places in the system with names and parent id's |
| 63 | + items: |
| 64 | + description: Place |
| 65 | + type: object |
| 66 | + properties: |
| 67 | + '@type': |
| 68 | + type: string |
| 69 | + const: Place |
| 70 | + identifier: |
| 71 | + type: array |
| 72 | + items: |
| 73 | + description: PropertyValue |
| 74 | + type: object |
| 75 | + properties: |
| 76 | + '@type': |
| 77 | + type: string |
| 78 | + const: PropertyValue |
| 79 | + name: |
| 80 | + type: string |
| 81 | + description: The identifier name |
| 82 | + example: crvs-location |
| 83 | + identifier: |
| 84 | + type: string |
| 85 | + description: The identifier itself |
| 86 | + example: 12345678-1234-1234-1234-123456789abc |
| 87 | + description: The identifiers of the place |
| 88 | + name: |
| 89 | + type: string |
| 90 | + description: The human-readable name of the place |
| 91 | + example: Karnataka |
| 92 | + additionalType: |
| 93 | + type: string |
| 94 | + description: Additional type of the place |
| 95 | + example: 'crvs:HEALTH_FACILITY' |
| 96 | + containedInPlace: |
| 97 | + description: 'Identifier of the parent location, set it to null if it is the root location' |
| 98 | + type: |
| 99 | + - 'null' |
| 100 | + - string |
| 101 | + required: |
| 102 | + - id |
| 103 | + - name |
| 104 | + - containedInPlace |
| 105 | + required: |
| 106 | + - '@context' |
| 107 | + - '@type' |
| 108 | + '404': |
| 109 | + $ref: '#/components/responses/HttpErrorResponse' |
| 110 | + '500': |
| 111 | + $ref: '#/components/responses/HttpErrorResponse' |
| 112 | + deprecated: false |
| 113 | +components: |
| 114 | + responses: |
| 115 | + HttpErrorResponse: |
| 116 | + description: HTTP layer error details |
| 117 | + content: |
| 118 | + application/json: |
| 119 | + schema: |
| 120 | + type: object |
| 121 | + description: 'HTTP transport layer error codes. Used by components like gateways, LB responding with HTTP status codes 1xx, 2xx, 3xx, 4xx and 5xx' |
| 122 | + properties: |
| 123 | + errors: |
| 124 | + items: |
| 125 | + type: object |
| 126 | + properties: |
| 127 | + code: |
| 128 | + type: string |
| 129 | + description: error code |
| 130 | + message: |
| 131 | + type: string |
| 132 | + description: error message |
0 commit comments