NAV
bash javascript

Info

Welcome to the generated API reference. Get Postman Collection

Auth

APIs for authentication

Login

[Route for authentication. Get the token to do all requests in the API. ]

Example request:

curl -X POST \
    "https://agendapratica.biz/api/v1/login" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"email":"maria.rosa@gmail.com","password":"w87Yu8eQ"}'
const url = new URL(
    "https://agendapratica.biz/api/v1/login"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "maria.rosa@gmail.com",
    "password": "w87Yu8eQ"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/v1/login

Body Parameters

Parameter Type Status Description
email string required The email of the user.
password string required The password of the user.

Relation management

List

[Display a listing of items related to an entity.] Relations available: Unit / Worker; Unit / Room; Schedule / Tag; Service / Worker; Service / Room; Worker / Unit; Worker / Service; Worker / Room; Room / Unit; Room / Worker; Room / Service;


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/relation/1/1/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/relation/1/1/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/relation/{entity}/{entityId}/{relation}

URL Parameters

Parameter Status Description
page optional The page number.
limit optional The number of registers per page.

Store

[Store relations to an entity.] Relations available: Unit / Worker; Unit / Room; Schedule / Tag; Service / Worker; Service / Room; Worker / Unit; Worker / Service; Worker / Room; Room / Unit; Room / Worker; Room / Service;


Requires authentication

Example request:

curl -X POST \
    "https://agendapratica.biz/api/v1/relation/1/1/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"ids":"consectetur"}'
const url = new URL(
    "https://agendapratica.biz/api/v1/relation/1/1/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "consectetur"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/v1/relation/{entity}/{entityId}/{relation}

Body Parameters

Parameter Type Status Description
ids string required The ids of the entity to be related to the base entity

Delete

[Remove the specified id related to the base entity.] Relations available: Unit / Worker; Unit / Room; Schedule / Tag; Service / Worker; Service / Room; Worker / Unit; Worker / Service; Worker / Room; Room / Unit; Room / Worker; Room / Service;


Requires authentication

Example request:

curl -X DELETE \
    "https://agendapratica.biz/api/v1/relation/1/1/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"ids":"tenetur"}'
const url = new URL(
    "https://agendapratica.biz/api/v1/relation/1/1/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": "tenetur"
}

fetch(url, {
    method: "DELETE",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE api/v1/relation/{entity}/{entityId}/{relation}

Body Parameters

Parameter Type Status Description
ids string required The ids of the entity to delete relation with the base entity

Room management

List

[Display a listing of rooms.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/rooms" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/rooms"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/rooms

URL Parameters

Parameter Status Description
page optional The page number.
limit optional The number of registers per page.
filter optional The filters for the list. Select a field, an operator and pass the query value. Ex.: filter[active][eq]=1. Operators: eq (equals), ne (not equals), gt (greater than), ge (grater or equals), lt (lower than), le (lower or equals), like (like).

Store

[Store a newly created room in storage.]


Requires authentication

Example request:

curl -X POST \
    "https://agendapratica.biz/api/v1/rooms" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"Room 101","description":"Room for physical exercises","active":true}'
const url = new URL(
    "https://agendapratica.biz/api/v1/rooms"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Room 101",
    "description": "Room for physical exercises",
    "active": true
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/v1/rooms

Body Parameters

Parameter Type Status Description
title string required The name of the room.
description string optional The description of the room.
active boolean optional Set the room active or not. Default value is 1 (active).

Show

[Display the specified room.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/rooms/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/rooms/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/rooms/{room}

Update

[Update the specified room in storage.]


Requires authentication

Example request:

curl -X PUT \
    "https://agendapratica.biz/api/v1/rooms/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"Room 101","description":"Room for physical exercises","active":true}'
const url = new URL(
    "https://agendapratica.biz/api/v1/rooms/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Room 101",
    "description": "Room for physical exercises",
    "active": true
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT api/v1/rooms/{room}

PATCH api/v1/rooms/{room}

Body Parameters

Parameter Type Status Description
title string required The name of the room.
description string optional The description of the room.
active boolean optional Set the room active or not.

Delete

[Remove the specified room from storage.]


Requires authentication

Example request:

curl -X DELETE \
    "https://agendapratica.biz/api/v1/rooms/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/rooms/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE api/v1/rooms/{room}

Schedule management

List

[Display a listing of schedules.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/schedules" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/schedules"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/schedules

URL Parameters

Parameter Status Description
page optional The page number.
limit optional The number of registers per page.
filter optional The filters for the list. Select a field, an operator and pass the query value. Ex.: filter[active][eq]=1&filter[created_at][gt]=2020-01-01. Operators: eq (equals), ne (not equals), gt (greater than), ge (grater or equals), lt (lower than), le (lower or equals), like (like).

Store

[Store a newly created schedule in storage.]


Requires authentication

Example request:

curl -X POST \
    "https://agendapratica.biz/api/v1/schedules" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":1,"service_id":1,"unit_id":1,"worker_id":1,"room_id":1,"date":"2021-10-01","start_time":"10:00:00","end_time":"10:30:00","message":"I am allergic to antibiotics","checked":true,"approved":true,"confirmed":true}'
const url = new URL(
    "https://agendapratica.biz/api/v1/schedules"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 1,
    "service_id": 1,
    "unit_id": 1,
    "worker_id": 1,
    "room_id": 1,
    "date": "2021-10-01",
    "start_time": "10:00:00",
    "end_time": "10:30:00",
    "message": "I am allergic to antibiotics",
    "checked": true,
    "approved": true,
    "confirmed": true
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/v1/schedules

Body Parameters

Parameter Type Status Description
user_id integer required The Id of the user reserving this schedule.
service_id integer required The Id of the service of this schedule.
unit_id integer required The Id of the unit of this schedule. Required only if company has units.
worker_id integer required The Id of the worker of this schedule. Required only if company has workers.
room_id integer required The Id of the room of this schedule. Required only if company has rooms.
date string required The date of the schedule.
start_time required optional string The start time of the schedule.
end_time required optional string The end time of the schedule.
message string optional The id of the user.
checked boolean optional Set the schedule as visualized. Default 0.
approved boolean optional Set the schedule as approved. Default 0.
confirmed boolean optional Set the schedule as confirmed by the client. Default 0.

Show

[Display the specified schedule.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/schedules/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/schedules/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/schedules/{schedule}

Update

[Update the specified schedule in storage.]


Requires authentication

Example request:

curl -X PUT \
    "https://agendapratica.biz/api/v1/schedules/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"user_id":1,"service_id":1,"unit_id":1,"worker_id":1,"room_id":1,"date":"2021-10-01","start_time":"10:00:00","end_time":"10:30:00","message":"I am allergic to antibiotics","checked":true,"approved":true,"confirmed":true}'
const url = new URL(
    "https://agendapratica.biz/api/v1/schedules/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 1,
    "service_id": 1,
    "unit_id": 1,
    "worker_id": 1,
    "room_id": 1,
    "date": "2021-10-01",
    "start_time": "10:00:00",
    "end_time": "10:30:00",
    "message": "I am allergic to antibiotics",
    "checked": true,
    "approved": true,
    "confirmed": true
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT api/v1/schedules/{schedule}

PATCH api/v1/schedules/{schedule}

Body Parameters

Parameter Type Status Description
user_id integer optional The Id of the user reserving this schedule.
service_id integer optional The Id of the service of this schedule.
unit_id integer optional The Id of the unit of this schedule. Required only if company has units.
worker_id integer optional The Id of the worker of this schedule. Required only if company has workers.
room_id integer optional The Id of the room of this schedule. Required only if company has rooms.
date string optional The date of the schedule.
start_time string optional The start time of the schedule.
end_time string optional The end time of the schedule.
message string optional The id of the user.
checked boolean optional Set the schedule as visualized.
approved boolean optional Set the schedule as approved.
confirmed boolean optional Set the schedule as confirmed by the client.

Delete

[Remove the specified schedule from storage.]


Requires authentication

Example request:

curl -X DELETE \
    "https://agendapratica.biz/api/v1/schedules/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/schedules/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE api/v1/schedules/{schedule}

Service management

List

[Display a listing of services.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/services" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/services"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/services

URL Parameters

Parameter Status Description
page optional The page number.
limit optional The number of registers per page.
filter optional The filters for the list. Select a field, an operator and pass the query value. Ex.: filter[active][eq]=1. Operators: eq (equals), ne (not equals), gt (greater than), ge (grater or equals), lt (lower than), le (lower or equals), like (like).

Store

[Store a newly created service in storage.]


Requires authentication

Example request:

curl -X POST \
    "https://agendapratica.biz/api/v1/services" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"Appointment with physiotherapist","description":"Medical consultation with a physiotherapy specialist","active":true,"time_required":30,"value":130}'
const url = new URL(
    "https://agendapratica.biz/api/v1/services"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Appointment with physiotherapist",
    "description": "Medical consultation with a physiotherapy specialist",
    "active": true,
    "time_required": 30,
    "value": 130
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/v1/services

Body Parameters

Parameter Type Status Description
title string required The name of the service.
description string optional The description of the service.
active boolean optional Set the service active or not. Default value is 1 (active).
time_required integer required Set the time required for the service appointment in minutes. An appointment for this service will occupy this time on the calendar.
value integer optional The Value of the service, if you want to inform your client. Default value is 0.

Show

[Display the specified service.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/services/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/services/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/services/{service}

Update

[Update the specified service in storage.]


Requires authentication

Example request:

curl -X PUT \
    "https://agendapratica.biz/api/v1/services/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"Appointment with physiotherapist","description":"Medical consultation with a physiotherapy specialist","active":true,"time_required":30,"value":130}'
const url = new URL(
    "https://agendapratica.biz/api/v1/services/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Appointment with physiotherapist",
    "description": "Medical consultation with a physiotherapy specialist",
    "active": true,
    "time_required": 30,
    "value": 130
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT api/v1/services/{service}

PATCH api/v1/services/{service}

Body Parameters

Parameter Type Status Description
title string optional The name of the service.
description string optional The description of the service.
active boolean optional Set the service active or not.
time_required integer optional Set the time required for the service appointment in minutes. An appointment for this service will occupy this time on the calendar.
value integer optional The Value of the service, if you want to inform your client.

Delete

[Remove the specified service from storage.]


Requires authentication

Example request:

curl -X DELETE \
    "https://agendapratica.biz/api/v1/services/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/services/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE api/v1/services/{service}

Tag management

Tag

[Display a listing of Tags.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/tags" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/tags"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/tags

URL Parameters

Parameter Status Description
page optional The page number.
limit optional The number of registers per page.
filter optional The filters for the list. Select a field, an operator and pass the query value. Ex.: filter[title][eq]=Important. Operators: eq (equals), ne (not equals), gt (greater than), ge (grater or equals), lt (lower than), le (lower or equals), like (like).

Store

[Store a newly created Tag in storage.]


Requires authentication

Example request:

curl -X POST \
    "https://agendapratica.biz/api/v1/tags" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"Important"}'
const url = new URL(
    "https://agendapratica.biz/api/v1/tags"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Important"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/v1/tags

Body Parameters

Parameter Type Status Description
title string required The name of the Tag.

Show

[Display the specified Tag.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/tags/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/tags/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/tags/{tag}

Update

[Update the specified Tag in storage.]


Requires authentication

Example request:

curl -X PUT \
    "https://agendapratica.biz/api/v1/tags/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"Important"}'
const url = new URL(
    "https://agendapratica.biz/api/v1/tags/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Important"
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT api/v1/tags/{tag}

PATCH api/v1/tags/{tag}

Body Parameters

Parameter Type Status Description
title string optional The name of the Tag.

Delete

[Remove the specified Tag from storage.]


Requires authentication

Example request:

curl -X DELETE \
    "https://agendapratica.biz/api/v1/tags/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/tags/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE api/v1/tags/{tag}

Unit management

List

[Display a listing of units.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/units" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/units"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/units

URL Parameters

Parameter Status Description
page optional The page number.
limit optional The number of registers per page.
filter optional The filters for the list. Select a field, an operator and pass the query value. Ex.: filter[active][eq]=1. Operators: eq (equals), ne (not equals), gt (greater than), ge (grater or equals), lt (lower than), le (lower or equals), like (like).

Store

[Store a newly created unit in storage.]


Requires authentication

Example request:

curl -X POST \
    "https://agendapratica.biz/api/v1/units" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"Central clinical center","description":"Service unit in the capital","active":true}'
const url = new URL(
    "https://agendapratica.biz/api/v1/units"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Central clinical center",
    "description": "Service unit in the capital",
    "active": true
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/v1/units

Body Parameters

Parameter Type Status Description
title string required The name of the unit.
description string optional The description of the unit.
active boolean optional Set the unit active or not. Default value is 1 (active).

Show

[Display the specified unit.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/units/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/units/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/units/{unit}

Update

[Update the specified unit in storage.]


Requires authentication

Example request:

curl -X PUT \
    "https://agendapratica.biz/api/v1/units/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"Central clinical center","description":"Service unit in the capital","active":true}'
const url = new URL(
    "https://agendapratica.biz/api/v1/units/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Central clinical center",
    "description": "Service unit in the capital",
    "active": true
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT api/v1/units/{unit}

PATCH api/v1/units/{unit}

Body Parameters

Parameter Type Status Description
title string optional The name of the unit.
description string optional The description of the unit.
active boolean optional Set the unit active or not.

Delete

[Remove the specified unit from storage.]


Requires authentication

Example request:

curl -X DELETE \
    "https://agendapratica.biz/api/v1/units/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/units/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE api/v1/units/{unit}

User management

List

[Display a listing of users.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/users" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/users"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/users

URL Parameters

Parameter Status Description
page optional The page number.
limit optional The number of registers per page.
filter optional The filters for the list. Select a field, an operator and pass the query value. Ex.: filter[email][eq]=maria@gmail.com. Operators: eq (equals), ne (not equals), gt (greater than), ge (grater or equals), lt (lower than), le (lower or equals), like (like).

Store

[Store a newly created user in storage. The user may change password after creation]


Requires authentication

Example request:

curl -X POST \
    "https://agendapratica.biz/api/v1/users" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"name":"Maria Rosa","email":"maria.rosa@gmail.com","phone":"51999887766","password":"9Ax8cWq0","identity":11111111111,"birthday":2}'
const url = new URL(
    "https://agendapratica.biz/api/v1/users"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Maria Rosa",
    "email": "maria.rosa@gmail.com",
    "phone": "51999887766",
    "password": "9Ax8cWq0",
    "identity": 11111111111,
    "birthday": 2
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/v1/users

Body Parameters

Parameter Type Status Description
name string required The name of the user.
email string required The email of the user.
phone string required The phone of the user.
password string required The password of the user.
identity integer optional The id of the user.
birthday integer optional The id of the user.

Show

[Display the specified user.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/users/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/users/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/users/{user}

Update

[Update the specified user in storage.]


Requires authentication

Example request:

curl -X PUT \
    "https://agendapratica.biz/api/v1/users/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"name":"Maria Rosa","email":"maria.rosa@gmail.com","phone":"51999887766","password":"9Ax8cWq0","identity":11111111111,"birthday":2}'
const url = new URL(
    "https://agendapratica.biz/api/v1/users/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Maria Rosa",
    "email": "maria.rosa@gmail.com",
    "phone": "51999887766",
    "password": "9Ax8cWq0",
    "identity": 11111111111,
    "birthday": 2
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT api/v1/users/{user}

PATCH api/v1/users/{user}

Body Parameters

Parameter Type Status Description
name string optional The name of the user.
email string optional The email of the user.
phone string optional The phone of the user.
password string optional The password of the user.
identity integer optional The id of the user.
birthday integer optional The id of the user.

Delete

[Remove the specified user from storage.]


Requires authentication

Example request:

curl -X DELETE \
    "https://agendapratica.biz/api/v1/users/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/users/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE api/v1/users/{user}

Worker management

Worker

[Display a listing of workers.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/workers" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/workers"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/workers

URL Parameters

Parameter Status Description
page optional The page number.
limit optional The number of registers per page.
filter optional The filters for the list. Select a field, an operator and pass the query value. Ex.: filter[active][eq]=1. Operators: eq (equals), ne (not equals), gt (greater than), ge (grater or equals), lt (lower than), le (lower or equals), like (like).

Store

[Store a newly created worker in storage.]


Requires authentication

Example request:

curl -X POST \
    "https://agendapratica.biz/api/v1/workers" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"Roberto Rodrigues","description":"A professional specialist in physiotherapy","active":true}'
const url = new URL(
    "https://agendapratica.biz/api/v1/workers"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Roberto Rodrigues",
    "description": "A professional specialist in physiotherapy",
    "active": true
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/v1/workers

Body Parameters

Parameter Type Status Description
title string required The name of the worker.
description string optional The description of the worker.
active boolean optional Set the worker active or not. Default value is 1 (active).

Show

[Display the specified resource.]


Requires authentication

Example request:

curl -X GET \
    -G "https://agendapratica.biz/api/v1/workers/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/workers/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (401):

{
    "message": "Unauthenticated."
}

HTTP Request

GET api/v1/workers/{worker}

Update

[Update the specified worker in storage.]


Requires authentication

Example request:

curl -X PUT \
    "https://agendapratica.biz/api/v1/workers/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"title":"Roberto Rodrigues","description":"A professional specialist in physiotherapy","active":true}'
const url = new URL(
    "https://agendapratica.biz/api/v1/workers/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Roberto Rodrigues",
    "description": "A professional specialist in physiotherapy",
    "active": true
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT api/v1/workers/{worker}

PATCH api/v1/workers/{worker}

Body Parameters

Parameter Type Status Description
title string optional The name of the worker.
description string optional The description of the worker.
active boolean optional Set the worker active or not.

Delete

[Remove the specified worker from storage.]


Requires authentication

Example request:

curl -X DELETE \
    "https://agendapratica.biz/api/v1/workers/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://agendapratica.biz/api/v1/workers/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

DELETE api/v1/workers/{worker}