Introduction
This documentation aims to provide all the information you need to work with our API.
Base URL
http://mudunelmanar.theportal.agencyAuthenticating requests
This API is not authenticated.
Authentication
APIs for authenticating users
Login
Example request:
curl -X POST \
"http://mudunelmanar.theportal.agency/api/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"email":"suscipit","password":"voluptas"}'
const url = new URL(
"http://mudunelmanar.theportal.agency/api/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "suscipit",
"password": "voluptas"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Driver
APIs for driver trips
Trips
requires authentication
Example request:
curl -X GET \
-G "http://mudunelmanar.theportal.agency/api/driver/trips?status=corporis" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://mudunelmanar.theportal.agency/api/driver/trips"
);
let params = {
"status": "corporis",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Update trip Status
requires authentication
Example request:
curl -X PUT \
"http://mudunelmanar.theportal.agency/api/driver/trips/libero/update_status" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"status":"mollitia"}'
const url = new URL(
"http://mudunelmanar.theportal.agency/api/driver/trips/libero/update_status"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"status": "mollitia"
}
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Upload on loading image
requires authentication
Example request:
curl -X PUT \
"http://mudunelmanar.theportal.agency/api/driver/trips/ea/upload_on_loading_image" \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-F "on_loading_image=@C:\Users\Abdelrahman\AppData\Local\Temp\php206D.tmp"
const url = new URL(
"http://mudunelmanar.theportal.agency/api/driver/trips/ea/upload_on_loading_image"
);
let headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('on_loading_image', document.querySelector('input[name="on_loading_image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Upload completed image
requires authentication
Example request:
curl -X PUT \
"http://mudunelmanar.theportal.agency/api/driver/trips/et/upload_completed_image" \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-F "completed_image=@C:\Users\Abdelrahman\AppData\Local\Temp\php207D.tmp"
const url = new URL(
"http://mudunelmanar.theportal.agency/api/driver/trips/et/upload_completed_image"
);
let headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('completed_image', document.querySelector('input[name="completed_image"]').files[0]);
fetch(url, {
method: "PUT",
headers,
body,
}).then(response => response.json());
Received response:
Request failed with error:
Store location
requires authentication
Example request:
curl -X POST \
"http://mudunelmanar.theportal.agency/api/driver/locations/voluptatum" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"trip_id":16,"lat":"velit","lng":"in"}'
const url = new URL(
"http://mudunelmanar.theportal.agency/api/driver/locations/voluptatum"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"trip_id": 16,
"lat": "velit",
"lng": "in"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Update profile data
requires authentication
Example request:
curl -X POST \
"http://mudunelmanar.theportal.agency/api/driver/profile" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name":"enim","email":"dolores","fcm_token":"adipisci"}'
const url = new URL(
"http://mudunelmanar.theportal.agency/api/driver/profile"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "enim",
"email": "dolores",
"fcm_token": "adipisci"
}
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error: