Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Endpoint URL

Staging

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

Production

will be provided after SIT

...

Expand
title1. Login and Get Session

Login and Get Session Token
Status
colourGreen
titlebUSINESS
Status
colourRed
titleProvider

Description

To acquire authorization token

Endpoint

/login

Method

POST


Request Headers

Code Block
languagejson
{
  "Content-Type": "application/json"
}


Request Body

Field

Data type

Required

Description

email

string

yes

email credential

password

string

yes

password


Sample Request Body

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

Sample Response

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

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.

Expand
title2. Get Partners

Get Partners
Status
colourGreen
titleBusiness
Status
colourRed
titleProvider

Description

To get the list of your preferred partners

Endpoint

/getPartners

Method

GET


Request Headers

Code Block
languagejson
{
  "Auth-Token": "<Auth token acquired on api LOGIN>"
}


URL Query parameters

Code Block
{
  "apiKey": "<apiKey will be acquired on login API>"
}


Sample Response

Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "results": [
        {
            "id": "SANDBOX_BUSINESS",
            "name": "Sandbox Business"
        },
        {
            "id": "SANDBOX_QA",
            "name": "Sandbox_Qa"
        }
    ]
}

Update Post StatusSample Request Body
Expand
title3. Update Post Status
Get List of Areas

Get List of Areas
Status
colour

Red

Green
title

Provider

Business

Description

To Update post statusget the list of areas

Endpoint

/updatePostStatusgetListOfAreas

Method

POSTGET


Request Headers

json
Code Block
language
{
  "Auth-Token": "<Auth token acquired on api LOGIN>",
  "Content-Type": "application/json"
}
URL


Query parameters (URL)

Code Block
languagejson
{
  "apiKey": "<apiKey will be acquired on login API>"
}
Request Body Fields

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

Code Block
languagejson
{
  "postId": "uuNzkYoOy1VI373BoKY9",
  "status": "START_DELIVERY",
  "remarks": "Rider is on his way",
  "timeStamp": 1575890011178,
  "metaState": ""
}
Sample Response
Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "message": "Post successfully updated."
}
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.

Expand
title4. Get Post


Get Post
Status
colourGreen
titleBUSINESS
Status
colourRed
titlePROVIDER

Description

To get a specific post or all post

Endpoint

/getPost

Sample Response

Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "results": [
        {
            "id": "-KnmC5Y0pFYBquoDL1zo",
            "info": {
                "code": "A1",
                "name": "Area 1",
                "stores": [
                    "-LDnYzs1xbK-FeQ0VPFr"                
                ]
            }
        }
    ]
}
Expand
title4. Get Stores/Hubs

Get List of Stores/Hubs
Status
colourGreen
titleBUSINESS

Description

To get the list of stores/hubs

Endpoint

/getListOfStores

Method

GET


Request Headers

json
Code Block
language
{
  "Auth-Token": "<Auth token acquired on api LOGIN>"
}
URL Parameters (Query Parameters


Query parameters (URL)

Parameter
Code Block
Required
language
DescriptionSample URL Parameters
json

apiKey

yes

API key from Login API

postId

no

filter by post id, leave empty or remove postId parameter to query all

partnerId

no

filter by partner id, leave empty or remove partnerId parameter to query all

type

no

Post type which can be either of the following:

  • post

  • opportunity

Defaults to opportunity if empty or undefined.

status

no

filter by status.

set to DONE to get delivered posts.

{
  "apiKey": "<apiKey will be acquired on login API>",
  "areaCode": "<area Code acquired from getListOfAreas API>"
}


Sample URL

Code Block
languagejson
https://us-central1-fleet-staging-2333a.cloudfunctions.net
/getListOfStores?apiKey=7c5dd55738b964944f9357bcc7f45ce6d857ff18&areaCode=A1


Sample Response

Code Block
languagejson
Status: 200 OK!
{
    "apiKeysuccess": "fb77c9653bf5e736d191b46bbfed7c2bd"true,
  	"postId": "uuNzkYoOy1VI373BoKY9", 	"partnerIdresults": "SANDBOX_DX"
}
Sample Response:
Code Block
languagejson
Status: 200 OK!
{[
     "success": true,
    "result": [
		{
            "postIdid": "uuNzkYoOy1VI373BoKY9-LDnYzs1xbK-FeQ0VPFr",
            "customerNameinfo": "Christian{
  Pick up",             "contactNumberaddress": "09123456789",7391 Building 9 Bakawan St. Corner Mayapis St., San Antonio Village, Makati, 1203 "emailAddress": "a@gmail.comMetro Manila",
             "completionDateTime   "advanceStart": 1583836200000false,
                "pickupAddresscode": "Sitio barrio, Angeles Pampanga Philippines",main_store",
                "pickupCitydefault": "Mandaluyong City",true,
                "provincelatitude": "Metro Manila", 14.5601823,
                "latlongitude": 14121.577629200680469999998,
                "longname": 121.0463673, "Main Store",
                "tagsprovince": "Metro Manila",
[                "provinceKey": "-LI4Qgef9HIHhb2AzGzWMM",
            }
     "-LK5fMS1u-Qsv-G1tc9l"   }
    ],
    ],
            "metaTags": "{\"-LI4Qgef9HIHhb2AzGzW\":{\"colorIndex\":1,\"label\":\"API\"},\"-LK5fMS1u-Qsv-G1tc9l\":{\"colorIndex\":4,\"label\":\"Pick-up\"}}",
            "storeName": "",
            "remarks": "my remarks",
            "businessId": "SANDBOX_DEV",
            "businessName": "Sandbox_Dev",
            "businessStoreId": null,
            "storeId": null,
            "courierName": "Sandbox_DX",
            "createdAt": 1583381948826,
            "partnerId": "SANDBOX_DX",
            "refNo": "order-001",
            "status": "ASSIGNED",
            "meta": "{\"customerName\":\"Christian Delivery\",\"contactNumber\":\"09123456789\",\"emailAddress\":\"a@gmail.com\",\"completionDateTime\":1583928900000,\"deliveryAddress\":\"Vermont Royale, Antipolo\",\"deliveryCity\":\"Antipolo\",\"province\":\"Rizal\",\"itemPrice\":200,\"dimension\":\"fff\",\"actualShippingCost\":50,\"codAmount\":250,\"lat\":14.5776292,\"long\":121.0463673,\"tags\":[\"-LI4Qgef9HIHhb2AzGzW\",\"-LK5fK2Pq--uEhN4T9UG\"],\"details\":\"my details\",\"remarks\":\"my remarks\",\"metaTags\":\"{\\\"-LI4Qgef9HIHhb2AzGzW\\\":{\\\"colorIndex\\\":1,\\\"label\\\":\\\"API\\\"},\\\"-LK5fK2Pq--uEhN4T9UG\\\":{\\\"colorIndex\\\":3,\\\"label\\\":\\\"Delivery\\\"}}\"}""total": 1
}
Expand
title5. Update Post Status

Update Post Status
Status
colourRed
titleProvider

Description

To Update post status

Endpoint

/updatePostStatus

Method

POST


Request Headers

Code Block
languagejson
{
  "Auth-Token": "<Auth token acquired on api LOGIN>",
  "Content-Type": "application/json"
}


URL Query parameters

Code Block
languagejson
{
  "apiKey": "<apiKey will be acquired on login API>"
}


Request Body Fields

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

Code Block
languagejson
{
  "postId": "uuNzkYoOy1VI373BoKY9",
  "status": "START_DELIVERY",
  "remarks": "Rider is on his way",
  "timeStamp": 1575890011178,
  "metaState": ""
}



Sample Response

Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "message": "Post successfully updated."
}


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.

Request Headers
Expand
title6. Get Post

Get Post
Status
colourGreen
titleBUSINESS
Status
colourRed
titlePROVIDER

Description

To get a specific post or all post

Endpoint

/getPost

Method

GET


Request Headers

Code Block
languagejson
{
  "Auth-Token": "<Auth token acquired on api LOGIN>"
}


URL Parameters (Query Parameters)

Parameter

Required

Description

apiKey

yes

API key from Login API

postId

no

filter by post id, leave empty or remove postId parameter to query all

partnerId

no

filter by partner id, leave empty or remove partnerId parameter to query all

type

no

Post type which can be either of the following:

  • post

  • opportunity

Defaults to opportunity if empty or undefined.

status

no

filter by status.

set to DONE to get delivered posts.


Sample URL Parameters

Code Block
languagejson
{
    "apiKey": "fb77c9653bf5e736d191b46bbfed7c2bd",
	"postId": "uuNzkYoOy1VI373BoKY9",
	"partnerId": "SANDBOX_DX"
}



Sample Response:

Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "result": [
		{
            "postId": "uuNzkYoOy1VI373BoKY9",
            "customerName": "Christian Pick up",
            "contactNumber": "09123456789",
            "emailAddress": "a@gmail.com",
            "completionDateTime": 1583836200000,
            "pickupAddress": "Sitio barrio, Angeles Pampanga Philippines",
            "pickupCity": "Mandaluyong City",
            "province": "Metro Manila",
            "lat": 14.5776292,
            "metaFieldslong": {} 121.0463673,
          }, 	]
}
Expand
title5. Update Meta Fields
Update Meta Fields
Status
colourRed
titleProvider

Description

To update tracking number and tracking url of a post. For providers only

Endpoint

/updateMetaFields

Method

POST

Code Block
languagejson
{
  "Auth-Token": "<Auth token acquired on api LOGIN>",
  "Content-Type": "application/json"
}
Query parameters (URL)
Code Block
{
  "apiKey": "<apiKey will be acquired on login API>"
}
Request Body Fields

Field

Data Type

Required

Description

postId

string

yes

id of post to update.

trackingNumber

string

no

tracking number

trackingUrl

string

no

tracking URL

Info
  • Fields under metaFields requires at least one field to update.

  • Undefined meta fields will not be updated.

Sample Request Body
Code Block
languagejson
{
    "postId": "uuNzkYoOy1VI373BoKY9",
    "metaFields": {
        "trackingNumber": "ORDER-001-AKS-ASV", "tags": [
                "-LI4Qgef9HIHhb2AzGzW",
                "-LK5fMS1u-Qsv-G1tc9l"
          "trackingUrl": "https://trackmyorder.com/track?id=ORDER-001-AKS-ASV"
 ],
   } }
Sample Response
Code Block
languagejson
Status: 200 OK! {     "successmetaTags": true,
    "message": "Post successfully updated."
}
Expand
title6. Get Partner Metafields
Get Partner Metafields
Status
colourPurple
titleINTERNAL

Description

To get metafields of all or a specific provider. For internal use of DPH

Endpoint

/getPartnersMetaFields

Method

GET

Request Headers
Code Block
languagejson
{
  "Content-Type": "application/json"
  "Auth-Token": "<Auth token acquired on api LOGIN>"
}
Query parameters (URL):
Code Block
languagejson
{
  "apiKey": "<apiKey will be acquired on login API>",
  "partnerId": "<provider's id, can be acquired on getPartners API>"
}
Info

Note: Empty partnerId url params will fetch all of your partners' metafields.

Sample Response with valid partnerId:
Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "result": {"{\"-LI4Qgef9HIHhb2AzGzW\":{\"colorIndex\":1,\"label\":\"API\"},\"-LK5fMS1u-Qsv-G1tc9l\":{\"colorIndex\":4,\"label\":\"Pick-up\"}}",
            "storeName": "",
            "remarks": "my remarks",
            "businessId": "SANDBOX_DEV",
            "businessName": "Sandbox_Dev",
            "businessStoreId": null,
            "goodsstoreId": {null,
            "activecourierName": "Sandbox_DX",
true         }   "createdAt": 1583381948826,
} }
Sample Response for empty partnerId
Code Block
languagejson
Status: 200 OK!
{     "success": true,     "resultpartnerId": {
        "SANDBOX_BADX": {,
            "goodsrefNo": {"order-001",
                "activestatus": true
     "ASSIGNED",
      }         },
        "SANDBOX_PROVIDER"meta": {},
        "SANDBOX_QA": {
            "cod": {
                "required": true,
                "active": true,
                "key": "cod",
                "fieldType": "string",
                "placeholder": "COD"
            },
            "name": {
                "fieldType": "string",
                "placeholder": "Name",
                "required": false,
                "active": true,
                "key": "name"
            },
            "insurance": {
                "required": true,
                "active": true,
                "key": "insurance",
                "fieldType": "string",
  "{\"customerName\":\"Christian Delivery\",\"contactNumber\":\"09123456789\",\"emailAddress\":\"a@gmail.com\",\"completionDateTime\":1583928900000,\"deliveryAddress\":\"Vermont Royale, Antipolo\",\"deliveryCity\":\"Antipolo\",\"province\":\"Rizal\",\"itemPrice\":200,\"dimension\":\"fff\",\"actualShippingCost\":50,\"codAmount\":250,\"lat\":14.5776292,\"long\":121.0463673,\"tags\":[\"-LI4Qgef9HIHhb2AzGzW\",\"-LK5fK2Pq--uEhN4T9UG\"],\"details\":\"my details\",\"remarks\":\"my remarks\",\"metaTags\":\"{\\\"-LI4Qgef9HIHhb2AzGzW\\\":{\\\"colorIndex\\\":1,\\\"label\\\":\\\"API\\\"},\\\"-LK5fK2Pq--uEhN4T9UG\\\":{\\\"colorIndex\\\":3,\\\"label\\\":\\\"Delivery\\\"}}\"}",
             "placeholdermetaFields": "Insurance"{}
        },
	]
  },
            "vehicleType": {
                "options": [
                    {
                        "value": "car",
                        "label": "Car"
     }
Expand
title7. Update Meta Fields

Update Meta Fields
Status
colourRed
titleProvider

Description

To update tracking number and tracking url of a post. For providers only

Endpoint

/updateMetaFields

Method

POST


Request Headers

Code Block
languagejson
{
  "Auth-Token": "<Auth token acquired on api LOGIN>",
  "Content-Type": "application/json"
}


Query parameters (URL)

Code Block
{
  "apiKey": "<apiKey will be acquired on login API>"
}


Request Body Fields

Field

Data Type

Required

Description

postId

string

yes

id of post to update.

trackingNumber

string

no

tracking number

trackingUrl

string

no

tracking URL

Info
  • Fields under metaFields requires at least one field to update.

  • Undefined meta fields will not be updated.


Sample Request Body

Code Block
languagejson
{
    "postId": "uuNzkYoOy1VI373BoKY9",
    "metaFields": {
              }"trackingNumber": "ORDER-001-AKS-ASV",
        "trackingUrl": "https://trackmyorder.com/track?id=ORDER-001-AKS-ASV"
    }
}



Sample Response

Code Block
languagejson
Status: 200 OK!
  {
 
                      "value"success": "motorcycle",
                   true,
    "labelmessage": "Motorcycle"Post successfully updated."
}
Request Headers
Expand
title8. Get Partner Metafields

Get Partner Metafields
Status
colourPurple
titleINTERNAL

Description

To get metafields of all or a specific provider. For internal use of DPH

Endpoint

/getPartnersMetaFields

Method

GET


Request Headers

Code Block
languagejson
{
  "Content-Type": "application/json"
  "Auth-Token": "<Auth token acquired on api   LOGIN>"
  }}


Query parameters (URL):

Code Block
languagejson
{
  "apiKey": "<apiKey will be acquired on login API>",
  "partnerId":    ]"<provider's id, can be acquired on getPartners API>"
}
Info

Note: Empty partnerId url params will fetch all of your partners' metafields.



Sample Response with valid partnerId:

Code Block
languagejson
Status: 200 OK!
 {
     "requiredsuccess": falsetrue,
    "result": {
        "goods": {
            "active": true,
        }
    }
}


Sample Response for empty partnerId

Code Block
languagejson
Status: 200 OK!
{
    "keysuccess": "vehicleType",true,
    "result": {
        "SANDBOX_BA": {
            "placeholdergoods": "Vehicle Type",{
                "fieldTypeactive": "dropdown"true
            }
        },
      }
}
Sample Response with invalid partnerId
Code Block
Status: 400 Bad Request
{  "SANDBOX_PROVIDER": {},
        "successSANDBOX_QA": false,{
    "message": "Invalid partner id. Neither it's not existing or you don't have rights to post to the partner."
}
Sample Response with no partner:
Code Block
Status: 400 Bad Request
{"cod": {
                 "successrequired": falsetrue,
    "message": "No preferred partners yet. Please invite a partner in Deliveries PH - My Partners"
}
Expand
title7. Get Provider's Create Post Template
Get Provider's Create Post Template
Status
colourGreen
titleBusiness

Description

Get provider’s create post template and meta fields schema for createPostv2 API. For integration only

Endpoint

/getCreatePostTemplate

Method

GET

Code Block
languagejson
{
  "Auth-Token": "<Auth token acquired on api LOGIN>"
}
URL Parameters

Field

Required

Description

apiKey

yes

API key from login API

partnerId

yes

Client id of desired partner’s create post template and meta fields schema. Can be acquired through getPartners API

Sample Request
Code Block
languagejson
https://us-central1-fleet-dev-ph.cloudfunctions.net/getCreatePostTemplate?apiKey=7c5dd55738b964944f9357bcc7f45ce6d857ff18&partnerId=SANDBOX_DX
Sample Response
Code Block
languagejson
status: 200 OK!
{ "active": true,
                "key": "cod",
                "successfieldType": true"string",
      "result": {         "requestBodyplaceholder": {"COD"
            "refNo": ""},
            "pickupDetailsname": {
                "customerNamefieldType": "string",
                "contactNumberplaceholder": "Name",
                "emailAddressrequired": ""false,
                "completionDateTimeactive": ""true,
                "latkey": 0, "name"
            },
            "longinsurance": 0,{
                "tagsrequired": []true,
                "remarksactive": ""true,
                "barangaykey": "insurance",
                "provincefieldType": "string",
                "postalCodeplaceholder": "Insurance",
                "pickupAddress": "",
   },
            "pickupCityvehicleType": ""{
            },    "options": [
       "deliveries": [             {
   {                     "customerNamevalue": "car",
                        "contactNumberlabel": "Car",
                    },
 "emailAddress": "",                  {
  "completionDateTime": "",                     "latvalue": 0,"motorcycle",
                        "longlabel": 0,"Motorcycle"
                    "tags": [],}
                ],
    "remarks": "",                     "barangay"required": "",
   false,
                "provinceactive": ""true,
                    "postalCodekey": "vehicleType",
                    "deliveryAddressplaceholder": "Vehicle Type",

                   "deliveryCityfieldType": "dropdown",
            }
       "details": "", }
    }
}


Sample Response with invalid partnerId

Code Block
Status: 400 Bad Request
{
    "success": false,
    "dimensionmessage": "",Invalid partner id. Neither it's not existing or you don't have rights to post to the      "itemPrice": 0,
         partner."
}


Sample Response with no partner:

Code Block
Status: 400 Bad Request
{
          "codAmount"success": 0false,
  
                 "metaFields"message": {"No preferred partners yet. Please invite a partner in Deliveries PH - My             "stringType": "",
                   Partners"
}
Request Headers
Expand
title9. Get Provider's Create Post Template

Get Provider's Create Post Template
Status
colourGreen
titleBusiness

Description

Get provider’s create post template and meta fields schema for createPostv2 API. For integration only

Endpoint

/getCreatePostTemplate

Method

GET


Request Headers

Code Block
languagejson
{
  "Auth-Token": "<Auth token acquired on api LOGIN>"
}


URL Parameters

Field

Required

Description

apiKey

yes

API key from login API

partnerId

yes

Client id of desired partner’s create post template and meta fields schema. Can be acquired through getPartners API


Sample Request

Code Block
languagejson
https://us-central1-fleet-dev-ph.cloudfunctions.net/getCreatePostTemplate?apiKey=7c5dd55738b964944f9357bcc7f45ce6d857ff18&partnerId=SANDBOX_DX



Sample Response

Code Block
languagejson
status: 200 OK!
{
    "success": true,
    "dropdownTyperesult": "",{
        "requestBody": {
             "refNo": "listType":,
    [        "pickupDetails": {
                "customerName": "",
 {               "contactNumber": "",
                "quantityemailAddress": "",
                "completionDateTime": "",
                "itemNamelat": ""0,
                "long": 0,
          }      "tags": [],
                 ]"remarks": "",
                "barangay": "",
  }              "province": "",
 }             ]         },
     "postalCode": "",
  "metaFieldSchema": {             "stringTypepickupAddress": {"",
                "requiredpickupCity": false,""
            },
   "type": "string",        "deliveries": [
       "description": "Sample string type meta"     {
       },             "dropdownTypecustomerName": { "",
                    "requiredcontactNumber": true,"",
                    "typeemailAddress": "string",
                    "descriptioncompletionDateTime": "Dropdown sample",
                 "values   "lat": [0,
                    "carlong": 0,
                    "vantags"
        : [],
       ],                 "detailsremarks": ["",
                    {
 "barangay": "",
                      "valueprovince": "car",
                        "descriptionpostalCode": "Car",
                    }"deliveryAddress": "",
                    {
  "deliveryCity": "",
                     "valuedetails": "van",
   
                    "descriptiondimension": "Van",
                    }
"itemPrice": 0,
               ]     "codAmount": 0,
      },              "listTypemetaFields": {
                "type        "stringType": "object",
                        "descriptiondropdownType": "List sample",
                "properties": {       "listType": [
            "quantity": {               {
         "description": "Quantity",
                        "requiredquantity": true,"",
                                "typeitemName": "string"
                     },       }
             "itemName": {          ]
              "description": "Item Name",    }
                }
   "required": true,         ]
        },
        "metaFieldSchema": {
            "stringType": {
                "required": false,
                "type": "string",
                "description": "Sample string type }meta"
            },
   }         "dropdownType": {
  }         }     }
}
Meta fields schema

Field

Data type

Description

type

string

data type of a meta field.

Can either be object or string

required

boolean

indicator if meta field is required

description

string

description of a meta field

values

array

options/values for the specified meta field

details

array

in depth description of options/values

properties

object

details for object type meta fields

Expand
title8. Update Fee
Update Fee
Status
colourRed
titleProvider

Description

To pass or update fees of a post. For providers only

Endpoint

/updateFee

Method

POST

Code Block
{
  "Auth-Token": "<Auth token acquired on api LOGIN>",
  "Content-Type": "application/json"
}
Query parameters (URL)
Code Block
languagejson
{
  "apiKey": "<apiKey will be acquired on login API>"
}
Request Body Fields

Field

Data Type

Required

Description

postId

string

yes

ID of post to be updated.

remarks

string

no

short description or remarks of the update

fees

array

yes

breakdown of fees

Fees object fields

Field

Data Type

Required

Description

value

number

yes

amount of fee

type

string

yes

type of fee, must be of the following:

  • shipping

  • return

  • insurance

  • handling

  • others

Info
  • List of fees must contain at least one value with fee type of shipping or return.

  • Type of fee must be unique to other fees within the list.

Sample Request Body
Code Block
languagejson
{
    "postId": "Wq9FPWxCYVxNgrPrn08D",
    "remarks": "Shipping fee from upon booking.",
    "fees": ["required": true,
                "type": "string",
                "description": "Dropdown sample",
                "values": [
                    "car",
                    "van"
                ],
                "details": [
                    {
                        "value": "car",
                        "description": "Car"
                    },
                    {
                        "value": "van",
                        "description": "Van"
                    }
                ]
            {},
            "valuelistType": 100,{
                "type": "shipping"object",
             },   "description": "List sample",
   {             "valueproperties": 20,{
             "type": "insurance"      "quantity": {
 }     ] }
Sample Response
Code Block
languagejson
status: 200 OK! {     "success": true,     "result": "Post successfully updated."
}
Expand
title9. Get List of Areas
Get List of Areas
Status
colourGreen
titleBusiness

Description

To get the list of areas

Endpoint

/getListOfAreas

Method

GET

Request Headers
Code Block
{            "Auth-Tokendescription": "<Auth token acquired on api LOGIN>"
}
Query parameters (URL)
Code Block
{"Quantity",
                        "apiKeyrequired": "<apiKey will be acquired on login API>"
}
Sample Response
Code Block
languagejson
Status: 200 OK!
{ true,
                        "successtype": true,"string"
    "results": [         {      },
      "id": "-KnmC5Y0pFYBquoDL1zo",             "infoitemName": {
                        "codedescription": "A1Item Name",
                "name": "Area 1",      "required": true,
         "stores": [                "type": "string"
    "-LDnYzs1xbK-FeQ0VPFr"                }
                ]}
            }
        }
    ]}
}
Expand
title10. Get Stores/Hubs
Get List of Stores/Hubs
Status
colourGreen
titleBUSINESS

Description

To get the list of stores/hubs

Endpoint

/getListOfStores

Method

GET

Request Headers
Code Block
{
  "Auth-Token": "<Auth token acquired on api LOGIN>"
}
Query parameters (URL)
Code Block
languagejson
{
  "apiKey": "<apiKey will be acquired on login API>",
  "areaCode": "<area Code acquired from getListOfAreas API>"
}
Sample URL
Code Block
languagejson
https://us-central1-fleet-staging-2333a.cloudfunctions.net
/getListOfStores?apiKey=7c5dd55738b964944f9357bcc7f45ce6d857ff18&areaCode=A1
Sample Response
Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "results": [
        {
            "id": "-LDnYzs1xbK-FeQ0VPFr",
            "info": {
                "address": "7391 Building 9 Bakawan St. Corner Mayapis St., San Antonio Village, Makati, 1203 Metro Manila",
                "advanceStart": false,
                "code": "main_store",
                "default": true,
                "latitude": 14.5601823,
  


Meta fields schema

Field

Data type

Description

type

string

data type of a meta field.

Can either be object or string

required

boolean

indicator if meta field is required

description

string

description of a meta field

values

array

options/values for the specified meta field

details

array

in depth description of options/values

properties

object

details for object type meta fields

Expand
title10. Update Fee

Update Fee
Status
colourRed
titleProvider

Description

To pass or update fees of a post. For providers only

Endpoint

/updateFee

Method

POST


Request Headers

Code Block
{
  "Auth-Token": "<Auth token acquired on api LOGIN>",
  "Content-Type": "application/json"
}


Query parameters (URL)

Code Block
languagejson
{
  "apiKey": "<apiKey will be acquired on login API>"
}


Request Body Fields

Field

Data Type

Required

Description

postId

string

yes

ID of post to be updated.

remarks

string

no

short description or remarks of the update

fees

array

yes

breakdown of fees


Fees object fields

Field

Data Type

Required

Description

value

number

yes

amount of fee

type

string

yes

type of fee, must be of the following:

  • shipping

  • return

  • insurance

  • handling

  • others

Info
  • List of fees must contain at least one value with fee type of shipping or return.

  • Type of fee must be unique to other fees within the list.


Sample Request Body

Code Block
languagejson
{
    "postId": "Wq9FPWxCYVxNgrPrn08D",
    "remarks": "Shipping fee from upon booking.",
    "fees": [
        {
             "longitudevalue": 121.00680469999998,
   100,
            "nametype": "Main Storeshipping",
        },
       "province": "Metro Manila",
   {
             "provinceKeyvalue": "MM"20,
            }"type": "insurance"
        }
    ],
    "total": 1
}


Sample Response

Code Block
languagejson
status: 200 OK!
{
    "success": true,
    "result": "Post successfully updated."
}

Responses (Success and Errors)

...