Resources provides services. This link is called a provider.
Attributes
| Name | Type | Description |
|---|---|---|
| id | Integer | Automatically set |
| created_at | Datetime | Automatically set |
| updated_at | Datetime | Automatically set |
| active | Boolean | Automatically set |
| resource_id | Integer | Required |
| service_id | Integer | Required |
| opening_hours_mon | Array | Opening hours for Monday. Fallback to resource availability. |
| opening_hours_tue | Array | Opening hours for Tuesday. Fallback to resource availability. |
| opening_hours_wed | Array | Opening hours for Wednesday. Fallback to resource availability. |
| opening_hours_thu | Array | Opening hours for Thursday. Fallback to resource availability. |
| opening_hours_fri | Array | Opening hours for Friday. Fallback to resource availability. |
| opening_hours_sat | Array | Opening hours for Saturday. Fallback to resource availability. |
| opening_hours_sun | Array | Opening hours for Sunday. Fallback to resource availability. |
| priority_value | Integer | Not required. Priority value for ordering. |
Opening hours for a provider works in the same way as availability is defined on resource exception date.
Listing
GET /providers will return all providers.
Response
[
{
"provider": {
"created_at": "2012-09-20T15:34:16+02:00",
"id": 1,
"resource_id": 1,
"service_id": 1,
"opening_hours_mon": null,
"opening_hours_tue": null,
"opening_hours_wed": null,
"opening_hours_thu": null,
"opening_hours_fri": null,
"opening_hours_sat": null,
"opening_hours_sun": null,
"updated_at": "2012-09-20T15:34:16+02:00"
}
}
]
Get provider
GET /providers/{provider_id} will get a provider with id {provider_id}.
Add new provider
POST /providers will create a new provider.
Update provider
PUT /providers/{provider_id} will update existing provider with id {provider_id}.
Delete provider
DELETE /providers/{provider_id} will delete existing provider with id {provider_id}.