/
birth-registration-api-spec.yaml
237 lines (236 loc) · 8.77 KB
/
birth-registration-api-spec.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
swagger: '2.0'
info:
version: 1.0.0
title: Birth Registration Service.
description: |
This service provides APIs to register new births in the system.
contact:
name: eGovernments Foundation
email: contacts@egovernments.org
schemes:
- https
basePath: /birth-services
x-api-id: org.egov.birth.services
x-common-path: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml
paths:
/v1/registration/_search:
post:
summary: Get the list of Birth registration applications
description: 1. Search and get birth registration applications(s) based on defined search criteria. 2. In case multiple parameters are passed voter registration applications will be searched as an AND combination of all the parameters.
parameters:
- $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/parameters/requestInfo
- $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/parameters/tenantId
- name: status
in: query
description: Search based on status.
type: string
allowEmptyValue: true
- name: ids
type: array
items:
type: integer
format: int64
in: query
maxItems: 50
description: unique identifier of birth registration
- name: applicationNumber
in: query
description: Unique application number for the Birth Registration Application
type: string
minLength: 2
maxLength: 64
responses:
'200':
description: Birth registration applications(s) Retrived Successfully
schema:
$ref: '#/definitions/BirthRegistrationRequest'
'400':
description: Invalid input
schema:
$ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes
tags:
- Birth Registration Application
/v1/registration/_create:
post:
summary: Create new Birth Registration Application
description: |
To create new birth registration applications in the system. API supports bulk creation with max limit as defined in the Birth Registration Request. Please note that either whole batch succeeds or fails, there's no partial batch success.
parameters:
- name: BirthRegistrationRequest
in: body
description: Details for the new Birth Registration Application(s) + RequestInfo meta data.
required: true
schema:
$ref: '#/definitions/BirthRegistrationRequest'
responses:
'201':
description: ReponseInfo with Birth Registration Application(s) created successfully
schema:
$ref: '#/definitions/BirthRegistrationResponse'
'400':
description: Birth Registration Application(s) creation failed
schema:
$ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes
tags:
- Birth Registration Application
/v1/registration/_update:
post:
summary: update existing Birth Registration Applications.
description: |
To update existing birth registration applications in the system. API supports bulk updation with max limit as defined in the birth registration Request. Please note that either whole batch succeeds or fails, there's no partial batch success.
parameters:
- name: BirthRegistrationRequest
in: body
description: Details for the new (s) + RequestInfo meta data.
required: true
schema:
$ref: '#/definitions/BirthRegistrationRequest'
responses:
'201':
description: ReponseInfo with Birth Registration Application(s) updated sudcessfully
schema:
$ref: '#/definitions/BirthRegistrationResponse'
'400':
description: (s) updation failed
schema:
$ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ErrorRes
tags:
- Birth Registration Application
definitions:
Applicant:
description: Details of the user applying for birth registration
allOf:
- $ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/egov-user/contracts/v1-0-0.yml#/definitions/User
BirthRegistrationApplication:
type: object
description: A Object holds the basic data for a Birth Registration Application
properties:
id:
type: string
minLength: 2
maxLength: 64
description: Unique Identifier of the Birth Registration Application (UUID)
readOnly: true
tenantId:
type: string
description: Unique Identifier of ULB
maxLength: 128
minLength: 2
applicationNumber:
type: string
description: Unique application number
maxLength: 128
minLength: 2
readOnly: true
babyFirstName:
type: string
description: Baby’s first name
maxLength: 128
minLength: 2
babyLastName:
type: string
description: Baby’s last name
maxLength: 128
minLength: 2
fatherOfApplicant:
type: string
description: Name of father
maxLength: 128
minLength: 2
motherOfApplicant:
type: string
description: Name of mother
maxLength: 128
minLength: 2
fatherMobileNumber:
type: string
description: Number of father
maxLength: 128
minLength: 2
motherMobileNumber:
type: string
description: Number of mother
maxLength: 128
minLength: 2
doctorName:
type: string
description: Name of doctor
maxLength: 128
minLength: 2
hospitalName:
type: string
description: Name of hospital
maxLength: 128
minLength: 2
placeOfBirth:
type: string
description: Place of birth
maxLength: 128
minLength: 2
timeOfBirth:
type: integer
description: Date of birth epoch
address:
$ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/Address
applicant:
$ref: '#/definitions/Applicant'
auditDetails:
$ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/AuditDetails
required:
- tenantId
- applicant
- babyFirstName
- babyLastName
- fatherOfApplicant
- motherOfApplicant
- fatherMobileNumber
- motherMobileNumber
- doctorName
- hospitalName
- placeOfBirth
- timeOfBirth
Workflow:
type: object
description: Fields related to workflow service
properties:
action:
type: string
description: Action on the application in certain
minLength: 1
maxLength: 64
status:
type: string
description: status of the application
comments:
type: string
description: Unique Identifier scrutinized number
minLength: 1
maxLength: 64
documents:
description: Attach the workflow verification documents.
type: array
items:
$ref: https://raw.githubusercontent.com/egovernments/municipal-services/common-contract/docs/common-contract-v2-0-0.yml#/components/schemas/Document
BirthRegistrationRequest:
description: Contract class to receive request. Array of items are used in case of create, whereas single item is used for update
properties:
RequestInfo:
$ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/RequestInfo
BirthRegistrationApplications:
description: Used for search result and create only
type: array
minimum: 1
maximum: 100
items:
$ref: '#/definitions/BirthRegistrationApplication'
BirthRegistrationResponse:
description: Contract class to send response. Array of items are used in case of search results or response for create, whereas single item is used for update
properties:
ResponseInfo:
$ref: https://raw.githubusercontent.com/egovernments/egov-services/master/docs/common/contracts/v1-1-1.yml#/definitions/ResponseInfo
BirthRegistrationApplications:
description: Used for search result and create only
type: array
maximum: 500
items:
$ref: '#/definitions/BirthRegistrationApplication'