Create a Resource
Creates a Resource or a Contained Resource based on the request's body.
POST /v1/:type
Path Parameters
type
- (required, string) specifies the type of the resource. Possible values are described in Resource Types.
Request Body
The request body is a json object which can contain some or all properties supported by the targeted resource type. When creating a new resource, one must include all the required
properties of the targeted Resource Type.
POST /v1/clinic
{
"name": "Foot clinic",
"phone": [
{
"value": "5140902999",
"use": "reception",
"system": "phone",
"extension": null
}
],
"email": [
{
"value": "info@footclinic.com",
"use": "info",
"system": "email"
}
],
"openingHours": [
{
"day": 1,
"start": "08:00:00",
"end": "17:00:00"
},
{
"day": 2,
"start": "08:00:00",
"end": "17:00:00"
},
{
"day": 3,
"start": "08:00:00",
"end": "17:00:00"
},
{
"day": 4,
"start": "08:00:00",
"end": "17:00:00"
},
{
"day": 5,
"start": "08:00:00",
"end": "17:00:00"
}
]
}
Response
Returns 201 - Created
with a Resource of the targeted type in the response body.
Example
201 CREATED on POST /v1/clinic
{
"id": "cd429379-821e-42e1-8d4c-815349534670",
"createdAt": "2021-10-12T18:24:09.651074Z",
"updatedAt": "2021-10-12T18:24:09.651074Z",
"name": "Foot clinic",
"phone": [
{
"id": "phone-d13f82fa-2fd5-4422-8e29-dd4fec650440",
"value": "5140902999",
"use": "reception",
"system": "phone",
"extension": null
}
],
"email": [
{
"id": "email-35bfdca3-3e63-49e3-97b4-18979da37a0c",
"value": "info@footclinic.com",
"use": "info",
"system": "email"
}
],
"openingHours": [
{
"day": 1,
"start": "08:00:00",
"end": "17:00:00"
},
{
"day": 2,
"start": "08:00:00",
"end": "17:00:00"
},
{
"day": 3,
"start": "08:00:00",
"end": "17:00:00"
},
{
"day": 4,
"start": "08:00:00",
"end": "17:00:00"
},
{
"day": 5,
"start": "08:00:00",
"end": "17:00:00"
}
]
}