MENU navbar-image

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());

Request      

POST api/user/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Example: james@alvargo.uk

password   string   

Example: 12345678

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());

Request      

POST api/user/logout

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

POST api/user/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Example: James

email   string   

Example: james_alvargo@alvargo.uk

password   string   

Example: 12345678

phone   string   

Example: 111222333

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."
}
 

Request      

GET api/users

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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());

Request      

POST api/create-delivery-request

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

pickupLocation   string  optional  

required' Example: et

dropOffLocation   string  optional  

required' Example: est

packageDetails   string  optional  

required' Example: consequatur

packageDimensions   object'  optional  

Example: dolore

width   number  optional  

required' Example: 312.47

height   number  optional  

required' Example: 95909.62714

length   number  optional  

required' Example: 164060427.1

proposedPrice   integer   

Example: 7

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."
}
 

Request      

GET api/get-delivery-requests

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

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."
}
 

Request      

GET api/get-delivery-request/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   string   

The ID of the delivery request. Example: amet

request_id   integer   

Example: 3

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());

Request      

POST api/update-delivery-request-status

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

delivery_request_id   integer  optional  

required' Example: 5

status   string   

Example: accepted enum: 'created','accepted','on_way_pickup','loading','in_transit','arrived_dropoff','unloading','delivered','proof_submitted' example: loading'

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());

Request      

POST api/update-contact-info/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   integer   

Example: 18

Body Parameters

content   string  optional  

required' Example: expedita

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."
}
 

Request      

GET api/get-status-history/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   integer  optional  

required' Example: 18

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());

Request      

POST api/submit-driver-response/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   integer   

Example: 3

Body Parameters

response   string   

enum: 'accept','decline','negotiate' Example: deleniti

price   integer   

Example: 13

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."
}
 

Request      

GET api/get-driver-responses/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   integer   

Example: 13

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."
}
 

Request      

GET api/get-delivery-proof/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   integer   

Example: 9

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."
}
 

Request      

GET api/send-delivery-confirmation/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   integer   

Example: 19

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());

Request      

POST api/submit-delivery-proof

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

signature   file   

The image' Example: /tmp/phpcdUbHn

photo   file   

The image' Example: /tmp/phpLGGnIC

delivery_request_id   integer   

Example: 17

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."
}
 

Request      

GET api/delivery-accepted/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   string   

The ID of the delivery request. Example: modi

Body Parameters

delivery_request_id   integer  optional  

required' Example: 18

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."
}
 

Request      

GET api/delivery-onway/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   string   

The ID of the delivery request. Example: quia

Body Parameters

delivery_request_id   integer  optional  

required' Example: 5

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."
}
 

Request      

GET api/delivery-loading/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   string   

The ID of the delivery request. Example: quas

Body Parameters

delivery_request_id   integer  optional  

required' Example: 4

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."
}
 

Request      

GET api/delivery-intransit/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   string   

The ID of the delivery request. Example: qui

Body Parameters

delivery_request_id   integer  optional  

required' Example: 14

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."
}
 

Request      

GET api/delivery-arriveddropoff/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   string   

The ID of the delivery request. Example: tenetur

Body Parameters

delivery_request_id   integer  optional  

required' Example: 19

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."
}
 

Request      

GET api/delivery-delivered/{delivery_request_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

delivery_request_id   string   

The ID of the delivery request. Example: quam

Body Parameters

delivery_request_id   integer  optional  

required' Example: 14