/
v1

v1


Endpoint URL

Staging

https://us-central1-fleet-staging-2333a.cloudfunctions.net

Production

will be provided after SIT

 


Login and Get Session Token bUSINESS Provider

Description

To acquire authorization token

Endpoint

/login

Method

POST


Request Headers

{ "Content-Type": "application/json" }


Request Body

Field

Data type

Required

Description

Field

Data type

Required

Description

email

string

yes

email credential

password

string

yes

password


Sample Request Body

{ "email": "sandbox_dev@gmail.com", "password": "password" }

Sample Response

Status: 200 OK! { "success": true, "results": { "apiKey": "fb77c9653bf5e736d191b46bbfed7c2bd", "clientId": "SANDBOX_DEV", "sessionToken": "b45e2fb77c9653bf5e736d19e1fd18ebbffd0f6d3dd25af118e5eb38851bf4d" } }

 

Field

Description

Field

Description

apiKey

Generated hash on client-side to be used on succeeding API request

clientId

Reference Client ID

sessionToken

Generated hash on every API login to be used on succeeding API requests.
Expires after 20 minutes.

 

Get Partners Business Provider

Description

To get the list of your preferred partners

Endpoint

/getPartners

Method

GET


Request Headers


URL Query parameters

 


Sample Response

 

Get List of Areas Business

Description

To get the list of areas

Endpoint

/getListOfAreas

Method

GET


Request Headers


Query parameters (URL)


Sample Response

Get List of Stores/Hubs BUSINESS

Description

To get the list of stores/hubs

Endpoint

/getListOfStores

Method

GET


Request Headers


Query parameters (URL)


Sample URL


Sample Response

Update Post Status Provider

Description

To Update post status

Endpoint

/updatePostStatus

Method

POST


Request Headers


URL Query parameters


Request Body Fields

Field

Data Type

Required

Description

Field

Data Type

Required

Description

postId

string

yes

ID of post to update.

status

string

yes

status to update

remarks

string

no

update remarks from provider

timeStamp

number

no

timestamp in millisecond. Leave 0, null or empty string to use current time.

metaState

string

no

custom status/state from provider


Sample Request Body

 



Sample Response


Status Updates:

Status

Description

START_PICKUP

Order is for pickup

START_DELIVERY

Order is out for delivery

DONE

Order has been delivered

FAILED_PICKUP

Failed to pickup order

FAILED_DELIVERY

Failed to deliver order

FAILED_RETURN

Failed to return order

CANCEL

Cancel order

IN_TRANSIT_FOR_RETURN

Order is out for return

RETURNED

Order has been returned to sender

UPDATE

Push an event update on job history without updating the status of the post. Please use the remarks field.

 

 

Responses (Success and Errors)

Status

Message

Description

Status

Message

Description

200

OK

Success

400

Bad Request

We could not understand the request due to invalid syntax or invalid parameters.

401

Unauthorized

Your apiKey can be missing or invalid. Your auth-token is not valid or may have already expired.

500

Internal Server Error

Unhandled exception. Please contact the production team when you encounter this error.