MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

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/v1/auth/send-otp

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/send-otp" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"b\",
    \"user_type\": \"customer\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/send-otp"
);

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

let body = {
    "phone": "b",
    "user_type": "customer"
};

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

Request      

POST api/v1/auth/send-otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

phone   string     

Must be at least 10 characters. Must not be greater than 15 characters. Example: b

user_type   string     

Example: customer

Must be one of:
  • customer
  • rider

POST api/v1/auth/verify-otp

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/verify-otp" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"b\",
    \"otp\": \"ngzmiy\",
    \"user_type\": \"customer\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/verify-otp"
);

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

let body = {
    "phone": "b",
    "otp": "ngzmiy",
    "user_type": "customer"
};

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

Request      

POST api/v1/auth/verify-otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

phone   string     

Must be at least 10 characters. Must not be greater than 15 characters. Example: b

otp   string     

Must be 6 characters. Example: ngzmiy

user_type   string     

Example: customer

Must be one of:
  • customer
  • rider

POST api/v1/auth/register

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/register"
);

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

let body = {
    "name": "b",
    "email": "zbailey@example.net"
};

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

Request      

POST api/v1/auth/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Must not be greater than 100 characters. Example: b

email   string  optional    

Must be a valid email address. Must not be greater than 150 characters. Example: zbailey@example.net

POST api/v1/auth/logout

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/logout"
);

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


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

Request      

POST api/v1/auth/logout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/auth/me

Example request:
curl --request GET \
    --get "http://localhost/api/v1/auth/me" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/auth/me"
);

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/v1/auth/me

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/auth/fcm-token

Example request:
curl --request POST \
    "http://localhost/api/v1/auth/fcm-token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fcm_token\": \"b\"
}"
const url = new URL(
    "http://localhost/api/v1/auth/fcm-token"
);

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

let body = {
    "fcm_token": "b"
};

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

Request      

POST api/v1/auth/fcm-token

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

fcm_token   string     

Must not be greater than 255 characters. Example: b

POST api/v1/baker/login

Example request:
curl --request POST \
    "http://localhost/api/v1/baker/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"gbailey@example.net\",
    \"password\": \"|]|{+-\"
}"
const url = new URL(
    "http://localhost/api/v1/baker/login"
);

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

let body = {
    "email": "gbailey@example.net",
    "password": "|]|{+-"
};

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

Request      

POST api/v1/baker/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Must be a valid email address. Example: gbailey@example.net

password   string     

Example: |]|{+-

GET api/v1/customer/home

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/home" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/home"
);

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/v1/customer/home

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/customer/categories

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/categories"
);

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/v1/customer/categories

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/customer/categories/{slug}/products

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/categories/architecto/products" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/categories/architecto/products"
);

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/v1/customer/categories/{slug}/products

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The slug of the category. Example: architecto

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/products/search" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/products/search"
);

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

GET api/v1/customer/products/{slug}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/products/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/products/architecto"
);

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/v1/customer/products/{slug}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

The slug of the product. Example: architecto

GET api/v1/customer/flavors

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/flavors" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/flavors"
);

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/v1/customer/flavors

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/customer/cart

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/cart" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/cart"
);

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/v1/customer/cart

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/customer/cart/items

Example request:
curl --request POST \
    "http://localhost/api/v1/customer/cart/items" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": 16,
    \"weight\": \"ngzmiy\",
    \"flavor\": \"v\",
    \"is_eggless\": true,
    \"quantity\": 26,
    \"message_on_cake\": \"l\",
    \"special_instructions\": \"j\",
    \"custom_photo_path\": \"n\"
}"
const url = new URL(
    "http://localhost/api/v1/customer/cart/items"
);

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

let body = {
    "product_id": 16,
    "weight": "ngzmiy",
    "flavor": "v",
    "is_eggless": true,
    "quantity": 26,
    "message_on_cake": "l",
    "special_instructions": "j",
    "custom_photo_path": "n"
};

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

Request      

POST api/v1/customer/cart/items

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

product_id   integer     

The id of an existing record in the products table. Example: 16

weight   string  optional    

Must not be greater than 10 characters. Example: ngzmiy

flavor   string  optional    

Must not be greater than 80 characters. Example: v

is_eggless   boolean  optional    

Example: true

quantity   integer  optional    

Must be at least 1. Example: 26

message_on_cake   string  optional    

Must not be greater than 100 characters. Example: l

special_instructions   string  optional    

Must not be greater than 2000 characters. Example: j

custom_photo_path   string  optional    

Must not be greater than 255 characters. Example: n

PUT api/v1/customer/cart/items/{id}

Example request:
curl --request PUT \
    "http://localhost/api/v1/customer/cart/items/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": 16,
    \"weight\": \"ngzmiy\",
    \"flavor\": \"v\",
    \"message_on_cake\": \"d\",
    \"special_instructions\": \"l\"
}"
const url = new URL(
    "http://localhost/api/v1/customer/cart/items/architecto"
);

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

let body = {
    "quantity": 16,
    "weight": "ngzmiy",
    "flavor": "v",
    "message_on_cake": "d",
    "special_instructions": "l"
};

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

Request      

PUT api/v1/customer/cart/items/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: architecto

Body Parameters

quantity   integer  optional    

Must be at least 1. Example: 16

weight   string  optional    

Must not be greater than 10 characters. Example: ngzmiy

flavor   string  optional    

Must not be greater than 80 characters. Example: v

message_on_cake   string  optional    

Must not be greater than 100 characters. Example: d

special_instructions   string  optional    

Must not be greater than 2000 characters. Example: l

DELETE api/v1/customer/cart/items/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/customer/cart/items/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/cart/items/architecto"
);

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


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

Request      

DELETE api/v1/customer/cart/items/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: architecto

POST api/v1/customer/cart/apply-coupon

Example request:
curl --request POST \
    "http://localhost/api/v1/customer/cart/apply-coupon" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"b\"
}"
const url = new URL(
    "http://localhost/api/v1/customer/cart/apply-coupon"
);

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

let body = {
    "code": "b"
};

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

Request      

POST api/v1/customer/cart/apply-coupon

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Must not be greater than 30 characters. Example: b

POST api/v1/customer/cart/validate-pincode

Example request:
curl --request POST \
    "http://localhost/api/v1/customer/cart/validate-pincode" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"pincode\": \"569775\"
}"
const url = new URL(
    "http://localhost/api/v1/customer/cart/validate-pincode"
);

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

let body = {
    "pincode": "569775"
};

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

Request      

POST api/v1/customer/cart/validate-pincode

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

pincode   string     

Must be 6 digits. Example: 569775

GET api/v1/customer/cart/delivery-slots

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/cart/delivery-slots" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/cart/delivery-slots"
);

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/v1/customer/cart/delivery-slots

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/customer/custom-cakes/upload-photo

Example request:
curl --request POST \
    "http://localhost/api/v1/customer/custom-cakes/upload-photo" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "photo=@/private/var/folders/90/437m1pn54s34qymlrhxqsffc0000gn/T/php9bb54cltep5d2kZ8430" 
const url = new URL(
    "http://localhost/api/v1/customer/custom-cakes/upload-photo"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('photo', document.querySelector('input[name="photo"]').files[0]);

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

Request      

POST api/v1/customer/custom-cakes/upload-photo

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

photo   file     

Must be an image. Must not be greater than 5120 kilobytes. Example: /private/var/folders/90/437m1pn54s34qymlrhxqsffc0000gn/T/php9bb54cltep5d2kZ8430

POST api/v1/customer/orders

Example request:
curl --request POST \
    "http://localhost/api/v1/customer/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"delivery_type\": \"delivery\",
    \"address_id\": 16,
    \"delivery_date\": \"2026-04-17T12:24:45\",
    \"delivery_slot\": \"ngzmiyvdljnikhwa\",
    \"payment_method\": \"razorpay\",
    \"coupon_code\": \"y\"
}"
const url = new URL(
    "http://localhost/api/v1/customer/orders"
);

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

let body = {
    "delivery_type": "delivery",
    "address_id": 16,
    "delivery_date": "2026-04-17T12:24:45",
    "delivery_slot": "ngzmiyvdljnikhwa",
    "payment_method": "razorpay",
    "coupon_code": "y"
};

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

Request      

POST api/v1/customer/orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

delivery_type   string     

Example: delivery

Must be one of:
  • pickup
  • delivery
address_id   integer  optional    

The id of an existing record in the addresses table. Example: 16

delivery_date   string     

Must be a valid date. Example: 2026-04-17T12:24:45

delivery_slot   string     

Must not be greater than 20 characters. Example: ngzmiyvdljnikhwa

payment_method   string     

Example: razorpay

Must be one of:
  • razorpay
  • cod
coupon_code   string  optional    

Must not be greater than 30 characters. Example: y

POST api/v1/customer/orders/{id}/verify-payment

Example request:
curl --request POST \
    "http://localhost/api/v1/customer/orders/architecto/verify-payment" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"razorpay_order_id\": \"architecto\",
    \"razorpay_payment_id\": \"architecto\",
    \"razorpay_signature\": \"architecto\"
}"
const url = new URL(
    "http://localhost/api/v1/customer/orders/architecto/verify-payment"
);

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

let body = {
    "razorpay_order_id": "architecto",
    "razorpay_payment_id": "architecto",
    "razorpay_signature": "architecto"
};

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

Request      

POST api/v1/customer/orders/{id}/verify-payment

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

Body Parameters

razorpay_order_id   string     

Example: architecto

razorpay_payment_id   string     

Example: architecto

razorpay_signature   string     

Example: architecto

GET api/v1/customer/orders

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/orders"
);

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/v1/customer/orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/customer/orders/{id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/orders/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/orders/architecto"
);

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/v1/customer/orders/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

GET api/v1/customer/orders/{id}/tracking

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/orders/architecto/tracking" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/orders/architecto/tracking"
);

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/v1/customer/orders/{id}/tracking

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/customer/orders/{id}/cancel

Example request:
curl --request POST \
    "http://localhost/api/v1/customer/orders/architecto/cancel" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/orders/architecto/cancel"
);

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


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

Request      

POST api/v1/customer/orders/{id}/cancel

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

GET api/v1/customer/orders/{id}/invoice

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/orders/architecto/invoice" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/orders/architecto/invoice"
);

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/v1/customer/orders/{id}/invoice

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/customer/orders/{id}/review

Example request:
curl --request POST \
    "http://localhost/api/v1/customer/orders/architecto/review" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": 16,
    \"product_rating\": 2,
    \"rider_rating\": 2,
    \"comment\": \"z\",
    \"image_path\": \"m\"
}"
const url = new URL(
    "http://localhost/api/v1/customer/orders/architecto/review"
);

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

let body = {
    "product_id": 16,
    "product_rating": 2,
    "rider_rating": 2,
    "comment": "z",
    "image_path": "m"
};

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

Request      

POST api/v1/customer/orders/{id}/review

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

Body Parameters

product_id   integer     

The id of an existing record in the products table. Example: 16

product_rating   integer     

Must be at least 1. Must not be greater than 5. Example: 2

rider_rating   integer  optional    

Must be at least 1. Must not be greater than 5. Example: 2

comment   string  optional    

Must not be greater than 2000 characters. Example: z

image_path   string  optional    

Must not be greater than 255 characters. Example: m

GET api/v1/customer/addresses

Example request:
curl --request GET \
    --get "http://localhost/api/v1/customer/addresses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/addresses"
);

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/v1/customer/addresses

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/customer/addresses

Example request:
curl --request POST \
    "http://localhost/api/v1/customer/addresses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"label\": \"b\",
    \"address_line1\": \"n\",
    \"address_line2\": \"g\",
    \"landmark\": \"z\",
    \"city\": \"m\",
    \"pincode\": \"569775\",
    \"latitude\": 4326.41688,
    \"longitude\": 4326.41688,
    \"is_default\": true
}"
const url = new URL(
    "http://localhost/api/v1/customer/addresses"
);

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

let body = {
    "label": "b",
    "address_line1": "n",
    "address_line2": "g",
    "landmark": "z",
    "city": "m",
    "pincode": "569775",
    "latitude": 4326.41688,
    "longitude": 4326.41688,
    "is_default": true
};

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

Request      

POST api/v1/customer/addresses

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

label   string     

Must not be greater than 30 characters. Example: b

address_line1   string     

Must not be greater than 255 characters. Example: n

address_line2   string  optional    

Must not be greater than 255 characters. Example: g

landmark   string  optional    

Must not be greater than 150 characters. Example: z

city   string  optional    

Must not be greater than 100 characters. Example: m

pincode   string     

Must be 6 digits. Example: 569775

latitude   number  optional    

Example: 4326.41688

longitude   number  optional    

Example: 4326.41688

is_default   boolean  optional    

Example: true

PUT api/v1/customer/addresses/{id}

Example request:
curl --request PUT \
    "http://localhost/api/v1/customer/addresses/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"label\": \"b\",
    \"address_line1\": \"n\",
    \"address_line2\": \"g\",
    \"landmark\": \"z\",
    \"city\": \"m\",
    \"pincode\": \"569775\",
    \"latitude\": 4326.41688,
    \"longitude\": 4326.41688,
    \"is_default\": true
}"
const url = new URL(
    "http://localhost/api/v1/customer/addresses/architecto"
);

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

let body = {
    "label": "b",
    "address_line1": "n",
    "address_line2": "g",
    "landmark": "z",
    "city": "m",
    "pincode": "569775",
    "latitude": 4326.41688,
    "longitude": 4326.41688,
    "is_default": true
};

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

Request      

PUT api/v1/customer/addresses/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the address. Example: architecto

Body Parameters

label   string  optional    

Must not be greater than 30 characters. Example: b

address_line1   string  optional    

Must not be greater than 255 characters. Example: n

address_line2   string  optional    

Must not be greater than 255 characters. Example: g

landmark   string  optional    

Must not be greater than 150 characters. Example: z

city   string  optional    

Must not be greater than 100 characters. Example: m

pincode   string  optional    

Must be 6 digits. Example: 569775

latitude   number  optional    

Example: 4326.41688

longitude   number  optional    

Example: 4326.41688

is_default   boolean  optional    

Example: true

DELETE api/v1/customer/addresses/{id}

Example request:
curl --request DELETE \
    "http://localhost/api/v1/customer/addresses/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/customer/addresses/architecto"
);

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


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

Request      

DELETE api/v1/customer/addresses/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the address. Example: architecto

PUT api/v1/customer/profile

Example request:
curl --request PUT \
    "http://localhost/api/v1/customer/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"zbailey@example.net\"
}"
const url = new URL(
    "http://localhost/api/v1/customer/profile"
);

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

let body = {
    "name": "b",
    "email": "zbailey@example.net"
};

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

Request      

PUT api/v1/customer/profile

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string  optional    

Must not be greater than 100 characters. Example: b

email   string  optional    

Must be a valid email address. Must not be greater than 150 characters. Example: zbailey@example.net

GET api/v1/baker/orders/queue

Example request:
curl --request GET \
    --get "http://localhost/api/v1/baker/orders/queue" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/baker/orders/queue"
);

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/v1/baker/orders/queue

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/baker/orders/{id}

Example request:
curl --request GET \
    --get "http://localhost/api/v1/baker/orders/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/baker/orders/architecto"
);

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/v1/baker/orders/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/baker/orders/{id}/start

Example request:
curl --request POST \
    "http://localhost/api/v1/baker/orders/architecto/start" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/baker/orders/architecto/start"
);

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


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

Request      

POST api/v1/baker/orders/{id}/start

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/baker/orders/{id}/items/{itemId}/status

Example request:
curl --request POST \
    "http://localhost/api/v1/baker/orders/architecto/items/architecto/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"preparation_status\": \"not_started\"
}"
const url = new URL(
    "http://localhost/api/v1/baker/orders/architecto/items/architecto/status"
);

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

let body = {
    "preparation_status": "not_started"
};

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

Request      

POST api/v1/baker/orders/{id}/items/{itemId}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

itemId   string     

Example: architecto

Body Parameters

preparation_status   string     

Example: not_started

Must be one of:
  • not_started
  • in_progress
  • done

POST api/v1/baker/orders/{id}/ready

Example request:
curl --request POST \
    "http://localhost/api/v1/baker/orders/architecto/ready" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/baker/orders/architecto/ready"
);

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


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

Request      

POST api/v1/baker/orders/{id}/ready

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/baker/shift/start

Example request:
curl --request POST \
    "http://localhost/api/v1/baker/shift/start" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/baker/shift/start"
);

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


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

Request      

POST api/v1/baker/shift/start

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/baker/shift/end

Example request:
curl --request POST \
    "http://localhost/api/v1/baker/shift/end" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/baker/shift/end"
);

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


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

Request      

POST api/v1/baker/shift/end

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/baker/history

Example request:
curl --request GET \
    --get "http://localhost/api/v1/baker/history" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/baker/history"
);

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/v1/baker/history

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/baker/orders/{id}/help

Example request:
curl --request POST \
    "http://localhost/api/v1/baker/orders/architecto/help" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/baker/orders/architecto/help"
);

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


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

Request      

POST api/v1/baker/orders/{id}/help

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/delivery/toggle-online

Example request:
curl --request POST \
    "http://localhost/api/v1/delivery/toggle-online" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"is_online\": true
}"
const url = new URL(
    "http://localhost/api/v1/delivery/toggle-online"
);

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

let body = {
    "is_online": true
};

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

Request      

POST api/v1/delivery/toggle-online

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

is_online   boolean     

Example: true

GET api/v1/delivery/dashboard

Example request:
curl --request GET \
    --get "http://localhost/api/v1/delivery/dashboard" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/delivery/dashboard"
);

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/v1/delivery/dashboard

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/delivery/assigned-orders

Example request:
curl --request GET \
    --get "http://localhost/api/v1/delivery/assigned-orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/delivery/assigned-orders"
);

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/v1/delivery/assigned-orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/delivery/orders/{id}/accept

Example request:
curl --request POST \
    "http://localhost/api/v1/delivery/orders/architecto/accept" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/delivery/orders/architecto/accept"
);

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


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

Request      

POST api/v1/delivery/orders/{id}/accept

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/delivery/orders/{id}/reject

Example request:
curl --request POST \
    "http://localhost/api/v1/delivery/orders/architecto/reject" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"b\"
}"
const url = new URL(
    "http://localhost/api/v1/delivery/orders/architecto/reject"
);

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

let body = {
    "reason": "b"
};

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

Request      

POST api/v1/delivery/orders/{id}/reject

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

Body Parameters

reason   string     

Must not be greater than 255 characters. Example: b

POST api/v1/delivery/orders/{id}/arrived-shop

Example request:
curl --request POST \
    "http://localhost/api/v1/delivery/orders/architecto/arrived-shop" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/delivery/orders/architecto/arrived-shop"
);

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


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

Request      

POST api/v1/delivery/orders/{id}/arrived-shop

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/delivery/orders/{id}/picked-up

Example request:
curl --request POST \
    "http://localhost/api/v1/delivery/orders/architecto/picked-up" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/delivery/orders/architecto/picked-up"
);

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


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

Request      

POST api/v1/delivery/orders/{id}/picked-up

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/delivery/orders/{id}/arrived-customer

Example request:
curl --request POST \
    "http://localhost/api/v1/delivery/orders/architecto/arrived-customer" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/delivery/orders/architecto/arrived-customer"
);

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


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

Request      

POST api/v1/delivery/orders/{id}/arrived-customer

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/delivery/orders/{id}/verify-otp

Example request:
curl --request POST \
    "http://localhost/api/v1/delivery/orders/architecto/verify-otp" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"otp\": \"bngz\"
}"
const url = new URL(
    "http://localhost/api/v1/delivery/orders/architecto/verify-otp"
);

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

let body = {
    "otp": "bngz"
};

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

Request      

POST api/v1/delivery/orders/{id}/verify-otp

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

Body Parameters

otp   string     

Must not be greater than 6 characters. Example: bngz

POST api/v1/delivery/orders/{id}/delivered

Example request:
curl --request POST \
    "http://localhost/api/v1/delivery/orders/architecto/delivered" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/delivery/orders/architecto/delivered"
);

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


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

Request      

POST api/v1/delivery/orders/{id}/delivered

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/delivery/orders/{id}/failed

Example request:
curl --request POST \
    "http://localhost/api/v1/delivery/orders/architecto/failed" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"b\"
}"
const url = new URL(
    "http://localhost/api/v1/delivery/orders/architecto/failed"
);

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

let body = {
    "reason": "b"
};

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

Request      

POST api/v1/delivery/orders/{id}/failed

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

Body Parameters

reason   string     

Must not be greater than 255 characters. Example: b

POST api/v1/delivery/orders/{id}/cash-collected

Example request:
curl --request POST \
    "http://localhost/api/v1/delivery/orders/architecto/cash-collected" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/delivery/orders/architecto/cash-collected"
);

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


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

Request      

POST api/v1/delivery/orders/{id}/cash-collected

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

POST api/v1/delivery/location

Example request:
curl --request POST \
    "http://localhost/api/v1/delivery/location" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"latitude\": 4326.41688,
    \"longitude\": 4326.41688,
    \"speed\": 4326.41688,
    \"heading\": 4326.41688,
    \"accuracy\": 4326.41688,
    \"order_id\": 16
}"
const url = new URL(
    "http://localhost/api/v1/delivery/location"
);

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

let body = {
    "latitude": 4326.41688,
    "longitude": 4326.41688,
    "speed": 4326.41688,
    "heading": 4326.41688,
    "accuracy": 4326.41688,
    "order_id": 16
};

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

Request      

POST api/v1/delivery/location

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

latitude   number     

Example: 4326.41688

longitude   number     

Example: 4326.41688

speed   number  optional    

Example: 4326.41688

heading   number  optional    

Example: 4326.41688

accuracy   number  optional    

Example: 4326.41688

order_id   integer  optional    

The id of an existing record in the orders table. Example: 16

GET api/v1/delivery/earnings

Example request:
curl --request GET \
    --get "http://localhost/api/v1/delivery/earnings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/delivery/earnings"
);

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/v1/delivery/earnings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/delivery/earnings/history

Example request:
curl --request GET \
    --get "http://localhost/api/v1/delivery/earnings/history" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/delivery/earnings/history"
);

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/v1/delivery/earnings/history

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/delivery/profile

Example request:
curl --request PUT \
    "http://localhost/api/v1/delivery/profile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"vehicle_number\": \"n\",
    \"upi_id\": \"g\",
    \"profile_photo\": \"z\",
    \"license_document\": \"m\"
}"
const url = new URL(
    "http://localhost/api/v1/delivery/profile"
);

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

let body = {
    "name": "b",
    "vehicle_number": "n",
    "upi_id": "g",
    "profile_photo": "z",
    "license_document": "m"
};

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

Request      

PUT api/v1/delivery/profile

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string  optional    

Must not be greater than 100 characters. Example: b

vehicle_number   string  optional    

Must not be greater than 15 characters. Example: n

upi_id   string  optional    

Must not be greater than 100 characters. Example: g

profile_photo   string  optional    

Must not be greater than 255 characters. Example: z

license_document   string  optional    

Must not be greater than 255 characters. Example: m

POST api/webhooks/razorpay

Example request:
curl --request POST \
    "http://localhost/api/webhooks/razorpay" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/webhooks/razorpay"
);

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


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

Request      

POST api/webhooks/razorpay

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json