Skip to content

Latest commit

 

History

History
71 lines (55 loc) · 2.53 KB

File metadata and controls

71 lines (55 loc) · 2.53 KB
title Providers
nav_order 8

Resources provides services. This link is called a provider.

Attributes

NameTypeDescription
idIntegerAutomatically set
created_atDatetimeAutomatically set
updated_atDatetimeAutomatically set
activeBooleanAutomatically set
resource_idIntegerRequired
service_idIntegerRequired
opening_hours_monArrayOpening hours for Monday. Fallback to resource availability.
opening_hours_tueArrayOpening hours for Tuesday. Fallback to resource availability.
opening_hours_wedArrayOpening hours for Wednesday. Fallback to resource availability.
opening_hours_thuArrayOpening hours for Thursday. Fallback to resource availability.
opening_hours_friArrayOpening hours for Friday. Fallback to resource availability.
opening_hours_satArrayOpening hours for Saturday. Fallback to resource availability.
opening_hours_sunArrayOpening hours for Sunday. Fallback to resource availability.
priority_valueIntegerNot 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}.