Introduction
Alvargo - Delivery Management API A RESTful API for managing delivery requests and driver responses. A RESTful API for managing delivery requests and driver responses. Built with Laravel, this API handles user authentication, delivery request lifecycle, and driver-customer interactions. Features
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
Endpoints
POST api/user/login
Example request:
curl --request POST \
"https://alvargo.us/Alvargo_Retail_API/public/api/user/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"james@alvargo.uk\",
\"password\": \"12345678\"
}"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/user/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "james@alvargo.uk",
"password": "12345678"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
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.
POST api/user/logout
Example request:
curl --request POST \
"https://alvargo.us/Alvargo_Retail_API/public/api/user/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/user/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
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.
POST api/user/register
Example request:
curl --request POST \
"https://alvargo.us/Alvargo_Retail_API/public/api/user/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"James\",
\"email\": \"james_alvargo@alvargo.uk\",
\"password\": \"12345678\",
\"phone\": \"111222333\"
}"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/user/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "James",
"email": "james_alvargo@alvargo.uk",
"password": "12345678",
"phone": "111222333"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
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.
GET api/users
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/users" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/users"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/create-delivery-request
Example request:
curl --request POST \
"https://alvargo.us/Alvargo_Retail_API/public/api/create-delivery-request" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"pickupLocation\": \"et\",
\"dropOffLocation\": \"est\",
\"packageDetails\": \"consequatur\",
\"packageDimensions\": \"dolore\",
\"proposedPrice\": 7
}"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/create-delivery-request"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"pickupLocation": "et",
"dropOffLocation": "est",
"packageDetails": "consequatur",
"packageDimensions": "dolore",
"proposedPrice": 7
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
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.
GET api/get-delivery-requests
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/get-delivery-requests" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/get-delivery-requests"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
GET api/get-delivery-request/{delivery_request_id}
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/get-delivery-request/amet" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/get-delivery-request/amet"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/update-delivery-request-status
Example request:
curl --request POST \
"https://alvargo.us/Alvargo_Retail_API/public/api/update-delivery-request-status" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"delivery_request_id\": 5,
\"status\": \"accepted enum: \'created\',\'accepted\',\'on_way_pickup\',\'loading\',\'in_transit\',\'arrived_dropoff\',\'unloading\',\'delivered\',\'proof_submitted\' example: loading\'\"
}"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/update-delivery-request-status"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"delivery_request_id": 5,
"status": "accepted enum: 'created','accepted','on_way_pickup','loading','in_transit','arrived_dropoff','unloading','delivered','proof_submitted' example: loading'"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
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.
POST api/update-contact-info/{delivery_request_id}
Example request:
curl --request POST \
"https://alvargo.us/Alvargo_Retail_API/public/api/update-contact-info/18" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"content\": \"expedita\"
}"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/update-contact-info/18"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"content": "expedita"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
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.
GET api/get-status-history/{delivery_request_id}
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/get-status-history/18" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/get-status-history/18"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/submit-driver-response/{delivery_request_id}
Example request:
curl --request POST \
"https://alvargo.us/Alvargo_Retail_API/public/api/submit-driver-response/3" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"response\": \"deleniti\",
\"price\": 13
}"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/submit-driver-response/3"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"response": "deleniti",
"price": 13
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
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.
GET api/get-driver-responses/{delivery_request_id}
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/get-driver-responses/13" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/get-driver-responses/13"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
GET api/get-delivery-proof/{delivery_request_id}
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/get-delivery-proof/9" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/get-delivery-proof/9"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
GET api/send-delivery-confirmation/{delivery_request_id}
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/send-delivery-confirmation/19" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/send-delivery-confirmation/19"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
POST api/submit-delivery-proof
Example request:
curl --request POST \
"https://alvargo.us/Alvargo_Retail_API/public/api/submit-delivery-proof" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "delivery_request_id=17"\
--form "signature=@/tmp/phpcdUbHn" \
--form "photo=@/tmp/phpLGGnIC"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/submit-delivery-proof"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('delivery_request_id', '17');
body.append('signature', document.querySelector('input[name="signature"]').files[0]);
body.append('photo', document.querySelector('input[name="photo"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
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.
GET api/delivery-accepted/{delivery_request_id}
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/delivery-accepted/modi" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"delivery_request_id\": 18
}"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/delivery-accepted/modi"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"delivery_request_id": 18
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
GET api/delivery-onway/{delivery_request_id}
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/delivery-onway/quia" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"delivery_request_id\": 5
}"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/delivery-onway/quia"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"delivery_request_id": 5
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
GET api/delivery-loading/{delivery_request_id}
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/delivery-loading/quas" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"delivery_request_id\": 4
}"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/delivery-loading/quas"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"delivery_request_id": 4
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
GET api/delivery-intransit/{delivery_request_id}
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/delivery-intransit/qui" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"delivery_request_id\": 14
}"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/delivery-intransit/qui"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"delivery_request_id": 14
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
GET api/delivery-arriveddropoff/{delivery_request_id}
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/delivery-arriveddropoff/tenetur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"delivery_request_id\": 19
}"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/delivery-arriveddropoff/tenetur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"delivery_request_id": 19
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.
GET api/delivery-delivered/{delivery_request_id}
Example request:
curl --request GET \
--get "https://alvargo.us/Alvargo_Retail_API/public/api/delivery-delivered/quam" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"delivery_request_id\": 14
}"
const url = new URL(
"https://alvargo.us/Alvargo_Retail_API/public/api/delivery-delivered/quam"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"delivery_request_id": 14
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
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.