Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization header in the form "Basic {credentials}".
The value of {credentials} should be your username/id and your password, joined with a colon (:),
and then base64-encoded.
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
To authenticate with this API, you need to use Basic Authentication with your username and password. You can include your credentials in the request headers as follows: Basic BASIC_AUTH_USERNAME:BASIC_AUTH_PASSWORD
Authentication
APIs for managing authentication
Registers a client user.
requires authentication
Example request:
curl --request POST \
"https://pet-meds-backend-updated.local/api/client/exercitationem/register" \
--header "Authorization: Basic {BASIC_AUTH_USERNAME:BASIC_AUTH_PASSWORD}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"libero\",
\"email\": \"aleen.lueilwitz@example.net\"
}"
const url = new URL(
"https://pet-meds-backend-updated.local/api/client/exercitationem/register"
);
const headers = {
"Authorization": "Basic {BASIC_AUTH_USERNAME:BASIC_AUTH_PASSWORD}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "libero",
"email": "aleen.lueilwitz@example.net"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 201,
"message": [
"Registered successfully"
],
"data": {
"name": "Client User",
"email": "willms.emily@example.com",
"access_token": "xlJ0sXAiOiJKV1QlLCJhbGsiOiJSUzI1NvJ9.eyJhdWQwOwIxIiwianRpIjwiNWQ1M2RwMmIzZjUzMTBmOWY5ZDM3ODI4NDFkYWJkMzJiYmI3OTczNjY1MzcwNWI4NGNhMTA2ZDc2MDgzYmNiMDMxMWMxZGE5ZGE1NjVkZDAiLCJpYXQiOjE2OTYyNjEyNjYuMTIzNTU5LCJuYmYiOjE2OTYyNjEyNjYuMTIzNTYxLCJleHAiOjE3MTIwNzI0NjYuMTA5NTA1LCJzdWIiOiIxMTAiLCJzY29wZXMiOltdfQ.im3lpA9gzpiyUxPCgL1QsarRbZkucgIlOTMzv_-m7vfi_VL_T2K4ub75ESVXrKYUsGTtIouPXhIJ4mnzYtcW8VHjNAQP-jREhZzCMgcJR3o95mWuLfFEcylz9birSgOJx9zqFLGVgl3cBZy_fWzoyib51h7IfRm3NV2F2CIXZR15QihrUnlRfgo5wMbENZ9gfj0bBIPtJGq7jO0dZ1KwdqZb4iXXFHh49gniPfu-sNLUEHzhdQ3vIK1JN-IerldfLXbXbNcWl9ORftcYV_RJd_6V6AI-nO_UYfUJcXrmeBImBPZPQpXy4me6xYxPvU8nvUnuqrUPTo_q2vXkzILCL0sRfOUI6erA3PqBWpHT9iSW7LIO7LviHZ8m-beKzRYoumgnoZJWOu-Wh2kXEUROd48urvZ6Q2eL1vLySADXiFSNAaxVAHJd9n1sJQK1TYlCV-wM8YR5G03h8XJZLY-mhD1Wp6jGJaSTwV3vNGsUqRh80YL-rEK359eD883bpnarS73LKTUx4LrCZATPGlzmtfDa1P1RrGolB501ULoy5NJKBIDMBBvU2gjAQ6c5HHXVrXv7MxOpoibODGm1CwA0Gez4PzAT3AJBbn3DoH6-rtCsWrcxgkbbi6YcRmOzNBkRWw8yvUkfP67-JjT9ZNNmU3DEan2auRMmc8yr7Rhou-s"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Logs in a client user.
requires authentication
Example request:
curl --request POST \
"https://pet-meds-backend-updated.local/api/client/est/login" \
--header "Authorization: Basic {BASIC_AUTH_USERNAME:BASIC_AUTH_PASSWORD}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"smraz@example.org\"
}"
const url = new URL(
"https://pet-meds-backend-updated.local/api/client/est/login"
);
const headers = {
"Authorization": "Basic {BASIC_AUTH_USERNAME:BASIC_AUTH_PASSWORD}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "smraz@example.org"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"success": true,
"status_code": 200,
"message": [
"Login successfully"
],
"data": {
"name": "Client User",
"email": "willms.emily@example.com",
"access_token": "xlJ0sXAiOiJKV1QlLCJhbGsiOiJSUzI1NvJ9.eyJhdWQwOwIxIiwianRpIjwiNWQ1M2RwMmIzZjUzMTBmOWY5ZDM3ODI4NDFkYWJkMzJiYmI3OTczNjY1MzcwNWI4NGNhMTA2ZDc2MDgzYmNiMDMxMWMxZGE5ZGE1NjVkZDAiLCJpYXQiOjE2OTYyNjEyNjYuMTIzNTU5LCJuYmYiOjE2OTYyNjEyNjYuMTIzNTYxLCJleHAiOjE3MTIwNzI0NjYuMTA5NTA1LCJzdWIiOiIxMTAiLCJzY29wZXMiOltdfQ.im3lpA9gzpiyUxPCgL1QsarRbZkucgIlOTMzv_-m7vfi_VL_T2K4ub75ESVXrKYUsGTtIouPXhIJ4mnzYtcW8VHjNAQP-jREhZzCMgcJR3o95mWuLfFEcylz9birSgOJx9zqFLGVgl3cBZy_fWzoyib51h7IfRm3NV2F2CIXZR15QihrUnlRfgo5wMbENZ9gfj0bBIPtJGq7jO0dZ1KwdqZb4iXXFHh49gniPfu-sNLUEHzhdQ3vIK1JN-IerldfLXbXbNcWl9ORftcYV_RJd_6V6AI-nO_UYfUJcXrmeBImBPZPQpXy4me6xYxPvU8nvUnuqrUPTo_q2vXkzILCL0sRfOUI6erA3PqBWpHT9iSW7LIO7LviHZ8m-beKzRYoumgnoZJWOu-Wh2kXEUROd48urvZ6Q2eL1vLySADXiFSNAaxVAHJd9n1sJQK1TYlCV-wM8YR5G03h8XJZLY-mhD1Wp6jGJaSTwV3vNGsUqRh80YL-rEK359eD883bpnarS73LKTUx4LrCZATPGlzmtfDa1P1RrGolB501ULoy5NJKBIDMBBvU2gjAQ6c5HHXVrXv7MxOpoibODGm1CwA0Gez4PzAT3AJBbn3DoH6-rtCsWrcxgkbbi6YcRmOzNBkRWw8yvUkfP67-JjT9ZNNmU3DEan2auRMmc8yr7Rhou-s"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.