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

...

title1. Login and Get Session

...

Status
colourGreen
titlebUSINESS
Status
colourRed
titleProvider

...

Description

...

To acquire authorization token

...

Endpoint

...

/login

...

Method

...

POST

...

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

...

Field

...

Data type

...

Required

...

Description

...

email

...

string

...

yes

...

email credential

...

password

...

string

...

yes

...

password

...

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.

Info
  • Session token expires after 20 minutes of use.

  • Session duration refreshes every login or on API (createPost, getPost, etc.) calls given that the token is still valid.

  • QUOTA_EXCEEDED error message occurs when you reach a certain number of login API request per second. For bulk API calls, please use the login API once and reuse the session token. You may also retry the operation after 1-2 seconds.

Error Messages:

Invalid Email

Code Block
languagejson
Status: 401 Unauthorized
{
    "success": false,
    "results": "EMAIL_NOT_FOUND"
}

Invalid Password

Code Block
languagejson
Status: 401 Unauthorized
{
    "success": false,
    "results": "INVALID_PASSWORD"
}

Quota Limit Exceeded Error

Code Block
languagejson
Status: 401 Unauthorized
{
    "success": false,
    "results": "QUOTA_EXCEEDED : Exceeded quota for verifying passwords."
}

...

title2. Get Partners

...

Status
colourGreen
titleBusiness
Status
colourRed
titleProvider

...

Description

...

To get the list of your preferred partners

...

Endpoint

...

/getPartners

...

Method

...

GET

...

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

...

Code Block
languagejson
{
    "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",
            "serviceType": "onDemand"
        },
        {
            "id": "SANDBOX_QA",
            "name": "Sandbox_QA",
            "serviceType": "scheduled"
        }
    ]
}

...

title3. Get List of Areas

...

Status
colourGreen
titleBusiness

...

Description

...

To get the list of areas

...

Endpoint

...

/getListOfAreas

...

Method

...

GET

...

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

...

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

...

languagejson

...

Endpoint URL

Staging

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

Production

will be provided after SIT

...

Request Headers
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": {
        "nameapiKey": "Area 1fb77c9653bf5e736d191b46bbfed7c2bd",
    
           "storesclientId": ["SANDBOX_DEV",
                    "-LDnYzs1xbK-FeQ0VPFr"sessionToken": "b45e2fb77c9653bf5e736d19e1fd18ebbffd0f6d3dd25af118e5eb38851bf4d"
               
                ]
            }
        }
    ]
}
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

Code Block
{
    "Auth-Token": "<Auth token acquired on api LOGIN>"
}
Query parameters (URL)
}
}

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.

Info
  • Session token expires after 20 minutes of use.

  • Session duration refreshes every login or on API (createPost, getPost, etc.) calls given that the token is still valid.

  • QUOTA_EXCEEDED error message occurs when you reach a certain number of login API request per second. For bulk API calls, please use the login API once and reuse the session token. You may also retry the operation after 1-2 seconds.

Error Messages:

Invalid Email

Code Block
languagejson
Status: 401 Unauthorized
{
    "success": false,
    "results": "EMAIL_NOT_FOUND"
}

Invalid Password

Code Block
languagejson
Status: 401 Unauthorized
{
    "apiKeysuccess": "<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
false,
    "results": "INVALID_PASSWORD"
}

Quota Limit Exceeded Error

Code Block
languagejson
Status: 200401 OK!Unauthorized
{
    "success": truefalse,
    "results": [
        {
            "id": "-LDnYzs1xbK-FeQ0VPFr",
            "info": {
           "QUOTA_EXCEEDED : Exceeded quota for verifying passwords."
}
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
{
    "addressAuth-Token": "7391<Auth Buildingtoken 9acquired Bakawanon St.api Corner Mayapis St., San Antonio Village, Makati, 1203 Metro Manila",
           LOGIN>"
}


URL Query parameters

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


Sample Response

Code Block
languagejson
Status: 200 OK!
{
    "advanceStartsuccess": falsetrue,
    "results": [
          "code": "main_store",{
                "defaultid": true,
   "SANDBOX_BUSINESS",
            "latitudename": 14.5601823"Sandbox Business",
                "longitudeserviceType": 121.00680469999998,"onDemand"
        },
       "name": "Main Store", {
                 "provinceid": "Metro ManilaSANDBOX_QA",
                "provinceKeyname": "MMSandbox_QA",
             }"serviceType": "scheduled"
        }
    ],

   "total": 1
}

Get Provider's Create Post v3 TemplateSample Request
Expand
title53. Get Provider's Create Post v3 Template
List of Areas

Get List of Areas
Status
colourGreen
titleBusiness

Description

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

To get the list of areas

Endpoint

/

v3/getCreatePostTemplate

getListOfAreas

Method

GET


Request Headers

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


Query parameters (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

isAutoReattempt

no

Set to true to get create post template of your configured auto reattempt providers. This will disregard the value of your partnerId if set to true.

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


Sample Response

Code Block
languagejson
https://us-central1-fleet-dev-ph.cloudfunctions.net/v3/getCreatePostTemplate?apiKey=7c5dd55738b964944f9357bcc7f45ce6d857ff18&partnerId=SANDBOX_DX
Sample Response
Code Block
languagejson
status: 200 OK!
Status: 200 OK!
{
    "success": true,
    "resultresults": {[
        "requestBody": {
            "refNoid": "-KnmC5Y0pFYBquoDL1zo",
            "pickupDetailsinfo": {
                "customerNamecode": "A1",
                "contactNumbername": "Area 1",
                "emailAddressstores": "",[
                "lat": 0,
                "long-LDnYzs1xbK-FeQ0VPFr": 0,               
 "tags": [],              ]
  "remarks": "",         }
       "barangay": "", }
                "province": "",
        ]
}
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

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


Query parameters (URL)

Code Block
languagejson
{
     "pickupDateTimeapiKey": "",<apiKey will be acquired on      login API>",
      "pickupAddressareaCode": "",<area code acquired from getListOfAreas             "pickupCity": ""
   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": [
        },{
            "deliveryDetailsid": {
   "-LDnYzs1xbK-FeQ0VPFr",
            "customerNameinfo": "",{
                "contactNumberaddress": "",7391 Building 9 Bakawan St. Corner Mayapis St., San Antonio Village, Makati, 1203 Metro    "emailAddress": ""Manila",
                "latadvanceStart": 0false,
                "longcode": 0"main_store",
                "tagsdefault": []true,
                "remarkslatitude": ""14.5601823,
                "barangaylongitude": ""121.00680469999998,
                "provincename": "Main Store",
                "postalCodeprovince": "Metro Manila",
                "deliveryDateTimeprovinceKey": "MM",
              }
 "deliveryAddress": "",      }
     ],
    "deliveryCitytotal": "",
1
}
Expand
title5. Get Provider's Create Post v3 Template

Get Provider's Create Post v3 Template
Status
colourGreen
titleBusiness

Description

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

Endpoint

/v3/getCreatePostTemplate

Method

GET


Request Headers

Code Block
languagejson
{
               "itemDescription"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

isAutoReattempt

no

Set to true to get create post template of your configured auto reattempt providers. This will disregard the value of your partnerId if set to true.


Sample Request

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



Sample Response

Code Block
languagejson
status: 200 OK!
   {
    "itemPricesuccess": 0true,
    "result": {
          "codAmountrequestBody": 0,{
                "productSizerefNo": "",

               "lengthpickupDetails": 0,{
                "widthcustomerName": 0"",
                "heightcontactNumber": 0"",
                "weightemailAddress": 0"",
                "metaFieldslat": {0,
                    "shipmentlong": ""0,
                }
"tags": [],
           }         },
    "remarks": "",
   "metaFieldSchema": {             "shipmentbarangay": {"",
                "requiredprovince": true"",
                "typepostalCode": "string",
                "descriptionpickupDateTime": "Shipment/Parcel Size",
                "valuespickupAddress": ["",
                "pickupCity": ""
    "big-pouch",        },
            "boxdeliveryDetails": {
                ]"customerName": "",
                "detailscontactNumber": [ "",
                "emailAddress": "",
         {       "lat": 0,
                "valuelong": "big-pouch",0,
                "tags": [],
                "descriptionremarks": ""Big,
Pouch (100 pesos within metro manila)"           "barangay": "",
        },        "province": "",
           {       "postalCode": "",
                 "valuedeliveryDateTime": "box",
                "deliveryAddress": "",
                "descriptiondeliveryCity": "Box",
                "itemDescription": "",
  }              "itemPrice": 0,
 ]               }
"codAmount": 0,
       }     }
}
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
title6. Get Quotation
Get Quotation
Status
colourGreen
titlebUSINESS

Description

To get the list of available product’s information and rates based on location per provider.

Endpoint

/getQuotation

Method

POST

Info
  • Price quotation is not available for partners with “on demand” service type.

  • Inches is used as a unit of measurement for length, width and height. (Please see sample request response).

  • Kg is used as a unit of measurement for weight. (Please see sample request response).

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

Request Params

Code Block
languagejson
{
    "apiKey": "<apiKey will be acquired on login API>",
    "partnerId": "<provider’s id, can be acquired on getPartners API >"
}
Request Body

Field

Data type

Required

Description

pickup

object

yes

object for pickup address

delivery

object

yes

object for delivery address

Fields of pickup and delivery:

Field

Data Type

Required

Max Length

Description

province

string

yes

60

province

city

string

yes

60

city

barangay

string

no

60

barangay

Sample Request Body
Code Block
languagejson
{
	"pickup": {
		"province": "metro manila",
		"city": "pasig city",
		"barangay": "pinagbuhatan"
	},
	"delivery": {
		"province": "rizal",
		"city": "cainta",
		"barangay": "san andres"
	}
}

Sample Response (Serviceable area)

Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "result": {    "productSize": "",
                "length": 0,
                "width": 0,
                "height": 0,
                "weight": 0,
                "metaFields": {
                    "shipment": ""
                }
            }
        },
        "metaFieldSchema": {
            "shipment": {
                "required": true,
                "type": "string",
                "description": "Shipment/Parcel Size",
                "values": [
                    "big-pouch",
                    "box"
                ],
                "details": [
                    {
                        "value": "big-pouch",
                        "description": "Big Pouch (100 pesos within metro manila)"
                    },
                    {
                        "value": "box",
                        "description": "Box"
                    }
                ]
            }
        }
    }
}


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
title6. Get Quotation

Get Quotation
Status
colourGreen
titlebUSINESS

Description

To get the list of available product’s information and rates based on location per provider.

Endpoint

/getQuotation

Method

POST

Info
  • Price quotation is not available for partners with “on demand” service type.

  • Inches is used as a unit of measurement for length, width and height. (Please see sample request response).

  • Kg is used as a unit of measurement for weight. (Please see sample request response).


Request Headers

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

Request Params

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


Request Body

Field

Data type

Required

Description

pickup

object

yes

object for pickup address

delivery

object

yes

object for delivery address

Fields of pickup and delivery:

Field

Data Type

Required

Max Length

Description

province

string

yes

60

province

city

string

yes

60

city

barangay

string

no

60

barangay


Sample Request Body

Code Block
languagejson
{
	"pickup": {
		"province": "metro manila",
		"city": "pasig city",
		"barangay": "pinagbuhatan"
	},
	"delivery": {
		"province": "rizal",
		"city": "cainta",
		"barangay": "san andres"
	}
}

Sample Response (Serviceable area)

Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "result": {
        "destinations": [
            "REGION 4-A"
            "NCR"
        ],
        "estimatedPickupDays": 3,
        "estimatedDeliveryDays": 6,
        "products": [
            {
                "size": "L",
                "price": 165,
                "description": "12 x 18 x 2",
                "name": "Large Pouch",
                "length": 12,
                "width": 18,
                "height": 2,
                "weight": 3
            },
            {
                "size": "XL",
                "price": 310,
                "description": "18 x 12 x 9",
                "name": "Box",
                "length": 18,
                "width": 12,
                "height": 9,
                "weight": 6
            }
        ]
    }
}

Sample Response (Not serviceable area)

Code Block
languagejson
Status: 400 Bad Request
{
    "success": false,
    "result": "Pickup/delivery location is not serviceable by the selected provider."
}

Error Messages:

Missing Partner Id

Code Block
languagejson
Status: 400 Bad Request
{
    "success": false,
    "message": "Missing partnerId. Please check your dashboard documentation."
}

Invalid Partner Id

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

Service type “On Demand”

Code Block
languagejson
Status: 400 Bad Request
{
    "success": false,
    "message": "Price quotation is not yet available for on demand providers."
}
Request Headers
Expand
title7. Create Post v3

Create Post v3
Status
colourGreen
titleBusiness

Description

To create a post based on providers serviceable area.

Endpoint

/v3/createPost

Method

POST


Request Headers

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


Query parameters (URL)

Code Block
languagejson
{
    "apiKey": "<REQUIRED, apiKey will be acquired on login API>",
    "partnerId": "<REQUIRED, preferred partner/provider, can be acquired on getPartners API>"
}
Info
  • Availability of product sizes varies to each providers and pickup/delivery location.

  • To be able to get the available sizes and price of a provider, see /getQuotation API.

  • productSize field is currently not available for on demand providers. Leave an empty string instead.

  • Lat/long fields is required for on demand providers.

  • barangay field is not required but will affect the accuracy of identifying if the pickup/delivery location is serviceable by the provider or not.

metaFields:

  • Meta fields are special fields requested by the provider that needs input from the customer.

  • To to get provider’s meta fields schema, see /getCreatePostTemplate API.


Request Body Fields:

Field

Data Type

Required

Max Length

Description

refNo

string

yes

30

reference number of post

isDraft

boolean

no

n/a

set true to save post as draft.

source

string

no

origin/source of post, can be one of the ff:

Shopify

isAutoReattempt

boolean

no

Set to true to assign as auto reattempt post. This will disregard the value of your partnerId on params if set to true.

businessStoreId

string

no

create a post by store/hub, empty string or null will assign to default store.

see /getListOfStores API for the id.

pickupDetails

object

yes

object for pickup details

deliveryDetails

object

yes

object for delivery details

isPSGC

boolean

no

Set to true to receive PSGC address format


Fields of pickupDetails

Field

Data Type

Required

Max Length

Description

senderName

string

yes

80

name of sender

contactNumber

string

yes

20

contact number of sender. Must be a valid contact number

emailAddress

string

no

60

email address of sender

pickupDateTime

string

yes

n/a

date and time of pickup
Format: YYYY-MM-DDTHH:mm

pickupAddress

string

yes

350

pickup address

pickupCity

string

yes

60

pickup city

province

string

yes

60

pickup province

barangay

string

no

60

pickup barangay

note: not required but will affect the accuracy of identifying if the location is serviceable by the provider.

postalCode

string

no

10

pickup postal code

lat

number

yes (for onDemand providers)

n/a

latitude of pickup location

long

number

yes (for onDemand providers)

longitude of pickup location

tags

array

no

list of tag id, can be get through getTags API

remarks

string

no

350

pickup remarks


Fields of deliveryDetails

Field

Data Type

Required

Max Length

Description

recipientName

string

yes

80

name of recipient

contactNumber

string

yes

20

contact number of receiver. Must be a valid number

emailAddress

string

no

60

email address of receiver

deliveryDateTime

string

yes

n/a

date and time of deliver.
Format: YYYY-MM-DDTHH:mm

deliveryAddress

string

yes

350

delivery address

deliveryCity

string

yes

60

delivery city

province

string

yes

60

delivery province

barangay

string

no

60

delivery barangay

note: not required but will affect the accuracy of identifying if the location is serviceable by the provider.

postalCode

string

no

10

delivery postal code

lat

number

yes (for onDemand providers)

n/a

latitude of delivery location

long

number

yes (for onDemand providers)

longitude of delivery location

tags

array

no

list of tag id, can be get through getTags API

itemDescription

string

no

350

Details about the item/product. e.g. Item name, quantity etc.

remarks

string

no

350

delivery remarks

productSize

string

yes (for scheduled providers)

n/a

product/parcel size

can be one of the following:
(empty string for on demand providers)
S
M
L
XL

length

number

no

length measurement of an item in inches

width

number

no

length measurement of an item in inches

height

number

no

length measurement of an item in inches

weight

number

no

weight measurement of an item in kilograms

declaredValue

number

no

declared item price

codAmount

number

no

cash on delivery amount

metaFields

object

no

metaFields to fulfill provider’s required fields


Sample Request Body

Code Block
languagejson
{
    "refNo": "order-001",
    "businessStoreID": "",
    "isPSGC": false
    "isAutoReattempt": false,
    "pickupDetails": {
        "senderName": "Christian Pick up",
        "contactNumber": "09123456789",
        "emailAddress": "a@gmail.com",
        "pickupDateTime": "2020-09-29T21:05",
        "pickupAddress": "536 Calbayog St. Highway Hills Mandaluyong City",
        "pickupCity": "Mandaluyong City",
        "province": "Metro Manila",
        "barangay": "Highway Hills",
        "postalCode": "1556",
        "lat": 14.5776292,
        "long": 121.0463673,
        "tags": [],
        "remarks": "my remarks"
    },
    "deliveryDetails": {
        "recipientName": "Christian Delivery",
        "contactNumber": "09123456789",
        "emailAddress": "a@email.com",
        "deliveryDateTime": "2020-09-29T22:06",
        "deliveryAddress": "Vermont Royale, Antipolo",
        "deliveryCity": "Antipolo",
        "province": "Rizal",
        "barangay": "San Roque",
        "postalCode": "1870",
        "declaredValue": 200,
        "productSize": "L",
        "width": 0, 
        "height": 0,
        "length": 10,
        "weight": 0,
        "codAmount": 250,
        "lat": 14.5776292,
        "long": 121.0463673,
        "tags": [],
        "itemDescription": "Brand New Phone X",
        "remarks": "Please handle with care. Ask the guards for direction.",
        "metaFields": {}
    }
}


Sample Response

Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "message": "Job posted on marketplace",
    "result": {
        "postId": "3nHfPLXUGWYhlQ5TcNva",
        "customerName": "Christian Pick up",
        "contactNumber": "09123456789",
        "emailAddress": "a@gmail.com",
        "completionDateTime": 1601384700000,
        "pickupAddress": "536 Calbayog St. Highway Hills Mandaluyong City",
        "pickupCity": "Mandaluyong City",
        "province": "Metro Manila",
        "barangay": "Highway Hills",
        "postalCode": "1556",
        "lat": 14.5776292,
        "long": 121.0463673,
        "tags": [
            "-LI4Qgef9HIHhb2AzGzW",
            "-LK5fMS1u-Qsv-G1tc9l"
        ],
        "metaTags": "{\"-LI4Qgef9HIHhb2AzGzW\":{\"colorIndex\":1,\"label\":\"API\"},\"-LK5fMS1u-Qsv-G1tc9l\":{\"colorIndex\":4,\"label\":\"Pick-up\"}}",
        "storeName": "",
        "details": "",
        "remarks": "my remarks",
        "transactions": [],
        "attempts": {},
        "approximateShippingFee": 115,
        "billableShippingFee": 0,
        "actualShippingFee": 0,
        "finalShippingFee": 0,
        "metaState": "",
        "lastUpdateRemarks": "",
        "businessId": "DRINKKA",
        "businessName": "Drinkka_DEMO",
        "businessStoreId": null,
        "storeId": null,
        "courierName": "Sandbox_DX",
        "createdAt": 1601372523479,
        "partnerId": "SANDBOX_DX",
        "refNo": "order-001",
        "status": "ASSIGNED",
        "meta": "{\"customerName\":\"Christian Delivery\",\"contactNumber\":\"09123456789\",\"emailAddress\":\"a@email.com\",\"completionDateTime\":1601388360000,\"deliveryAddress\":\"Vermont Royale, Antipolo\",\"deliveryCity\":\"Antipolo\",\"province\":\"Rizal\",\"barangay\":\"San Roque\",\"postalCode\":\"1870\",\"itemPrice\":200,\"dimension\":{\"length\":10,\"width\":0,\"height\":0},\"codAmount\":250,\"lat\":14.5776292,\"long\":121.0463673,\"tags\":[\"-LI4Qgef9HIHhb2AzGzW\",\"-LK5fK2Pq--uEhN4T9UG\"],\"metaTags\":\"{\\\"-LI4Qgef9HIHhb2AzGzW\\\":{\\\"colorIndex\\\":1,\\\"label\\\":\\\"API\\\"},\\\"-LK5fK2Pq--uEhN4T9UG\\\":{\\\"colorIndex\\\":3,\\\"label\\\":\\\"Delivery\\\"}}\",\"details\":\"Brand New Phone X\",\"remarks\":\"Please handle with care. Ask the guards for direction.\",\"trackingNumber\":\"\",\"trackingUrl\":\"\",\"weight\":0}",
        "metaFields": {}
    }
}

Sample Request Body

Code Block
languagejson
{
    "refNo": "order-001",
    "businessStoreID": "",
    "isPSGC": true
    "isAutoReattempt": false,
    "pickupDetails": {
        "senderName": "Christian Pick up",
        "contactNumber": "09123456789",
        "emailAddress": "a@gmail.com",
        "pickupDateTime": "2020-09-29T21:05",
        "pickupAddress": "536 Calbayog St. Highway Hills Mandaluyong City",
        "pickupCity": "Mandaluyong City",
        "province": "Metro Manila",
        "barangay": "Highway Hills",
        "postalCode": "1556",
        "lat": 14.5776292,
        "long": 121.0463673,
        "tags": [],
        "remarks": "my remarks"
    },
    "deliveryDetails": {
        "recipientName": "Christian Delivery",
        "contactNumber": "09123456789",
        "emailAddress": "a@email.com",
        "deliveryDateTime": "2020-09-29T22:06",
        "deliveryAddress": "Vermont Royale, Antipolo",
        "deliveryCity": "Antipolo",
        "province": "Rizal",
        "barangay": "San Roque",
        "postalCode": "1870",
        "declaredValue": 200,
        "productSize": "L",
        "width": 0, 
        "height": 0,
        "length": 10,
        "weight": 0,
        "codAmount": 250,
        "lat": 14.5776292,
        "long": 121.0463673,
        "tags": [],
        "itemDescription": "Brand New Phone X",
        "remarks": "Please handle with care. Ask the guards for direction.",
        "metaFields": {}
    }
}

Sample Response

Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "message": "Job posted on marketplace",
    "result": {
        "postId": "3nHfPLXUGWYhlQ5TcNva",
        "customerName": "Christian Pick up",
        "contactNumber": "09123456789",
        "emailAddress": "a@gmail.com",
        "completionDateTime": 1601384700000,
        "pickupAddress": "536 Calbayog St. Highway Hills Mandaluyong City",
        "pickupCity": "CITY OF MANDALUYONG",
        "province": "SECOND DISTRICT",
        "barangay": "HIGHWAY HILLS",
        "postalCode": "1556",
        "lat": 14.5776292,
        "long": 121.0463673,
        "tags": [
            "-LI4Qgef9HIHhb2AzGzW",
            "-LK5fMS1u-Qsv-G1tc9l"
        ],
        "metaTags": "{\"-LI4Qgef9HIHhb2AzGzW\":{\"colorIndex\":1,\"label\":\"API\"},\"-LK5fMS1u-Qsv-G1tc9l\":{\"colorIndex\":4,\"label\":\"Pick-up\"}}",
        "storeName": "",
        "details": "",
        "remarks": "my remarks",
        "transactions": [],
        "attempts": {},
        "approximateShippingFee": 115,
        "billableShippingFee": 0,
        "actualShippingFee": 0,
        "finalShippingFee": 0,
        "metaState": "",
        "lastUpdateRemarks": "",
        "businessId": "DRINKKA",
        "businessName": "Drinkka_DEMO",
        "destinationsbusinessStoreId": [null,
            "REGION 4-A"
 "storeId": null,
        "courierName":  "NCRSandbox_DX",
        ]"createdAt": 1601372523479,
        "estimatedPickupDayspartnerId": 3"SANDBOX_DX",
        "estimatedDeliveryDaysrefNo": 6"order-001",
        "productsstatus": ["ASSIGNED",
            {
                "size": "L",
                "price": 165,
                "description": "12 x 18 x 2",
                "name": "Large Pouch",
                "length": 12,
                "width": 18,
                "height": 2,
                "weight": 3
            },
            {
                "size": "XL",
                "price": 310,
                "description": "18 x 12 x 9",
                "name": "Box",
                "length": 18,
                "width": 12,
                "height": 9,
                "weight": 6
            }
        ]
    }
}

Sample Response (Not serviceable area)

Code Block
languagejson
Status: 400 Bad Request
{
    "success": false,
    "result": "Pickup/delivery location is not serviceable by the selected provider."
}

Error Messages:

Missing Partner Id
"meta": "{\"customerName\":\"Christian Delivery\",\"contactNumber\":\"09123456789\",\"emailAddress\":\"a@email.com\",\"completionDateTime\":1601388360000,\"deliveryAddress\":\"Vermont Royale, Antipolo\",\"deliveryCity\":\"CITY OF ANTIPOLO\",\"province\":\"RIZAL\",\"barangay\":\"SAN ROQUE\",\"postalCode\":\"1870\",\"itemPrice\":200,\"dimension\":{\"length\":10,\"width\":0,\"height\":0},\"codAmount\":250,\"lat\":14.5776292,\"long\":121.0463673,\"tags\":[\"-LI4Qgef9HIHhb2AzGzW\",\"-LK5fK2Pq--uEhN4T9UG\"],\"metaTags\":\"{\\\"-LI4Qgef9HIHhb2AzGzW\\\":{\\\"colorIndex\\\":1,\\\"label\\\":\\\"API\\\"},\\\"-LK5fK2Pq--uEhN4T9UG\\\":{\\\"colorIndex\\\":3,\\\"label\\\":\\\"Delivery\\\"}}\",\"details\":\"Brand New Phone X\",\"remarks\":\"Please handle with care. Ask the guards for direction.\",\"trackingNumber\":\"\",\"trackingUrl\":\"\",\"weight\":0}",
        "metaFields": {}
    }
}

Error Messages:

Invalid Request Parameter

Code Block
languagejson
Status: 400 Bad Request
{
    "success": false,
    "message": "MissingInvalid Request partnerIdParameter. PleaseCheck check your dashboard documentation."
}

Invalid Partner Id

Code Block
languagejson
Status: 400 Bad Request
{,
    "result": {
        "successpickupDetails": false, {
            "messagecustomerName": "InvalidRequired partner idfield.",
Either it's not existing or you don't have rights to post to the partner."
}

Service type “On Demand”

Code Block
languagejson
Status: 400 Bad Request
{"contactNumber": "Required field.",
      "success": false,     "messageprovince": "Price quotation is not yet available for on demand providers."
}
Expand
title7. Create Post v3
Create Post v3
Status
colourGreen
titleBusiness

Description

To create a post based on providers serviceable area.

Endpoint

/v3/createPost

Method

POST

Code Block
languagejson
{Required field.",
            "Auth-TokenpickupDateTime": "Invalid data type. Must be "<Auth token acquired on api LOGIN>",in string",
            "pickupAddress": "Required field.",
            "Content-TypepickupCity": "application/jsonRequired field."
}
Query parameters (URL)
Code Block
languagejson
        },
        "deliveryDetails": {
    "apiKey        "customerName": "Required field."<REQUIRED,
apiKey  will be acquired on login API>",     "partnerIdcontactNumber": "<REQUIRED, preferred partner/provider, can be acquired on getPartners API>"
}
Info
  • Availability of product sizes varies to each providers and pickup/delivery location.

  • To be able to get the available sizes and price of a provider, see /getQuotation API.

  • productSize field is currently not available for on demand providers. Leave an empty string instead.

  • Lat/long fields is required for on demand providers.

  • barangay field is not required but will affect the accuracy of identifying if the pickup/delivery location is serviceable by the provider or not.

metaFields:

  • Meta fields are special fields requested by the provider that needs input from the customer.

  • To to get provider’s meta fields schema, see /getCreatePostTemplate API.

Request Body Fields:

Field

Data Type

Required

Max Length

Description

refNo

string

yes

30

reference number of post

isDraft

boolean

no

n/a

set true to save post as draft.

source

string

no

origin/source of post, can be one of the ff:

Shopify

isAutoReattempt

boolean

no

Set to true to assign as auto reattempt post. This will disregard the value of your partnerId on params if set to true.

businessStoreId

string

no

create a post by store/hub, empty string or null will assign to default store.

see /getListOfStores API for the id.

pickupDetails

object

yes

object for pickup details

deliveryDetails

object

yes

object for delivery details

Fields of pickupDetails

Field

Data Type

Required

Max Length

Description

senderName

string

yes

80

name of sender

contactNumber

string

yes

20

contact number of sender. Must be a valid contact number

emailAddress

string

no

60

email address of sender

pickupDateTime

string

yes

n/a

date and time of pickup
Format: YYYY-MM-DDTHH:mm

pickupAddress

string

yes

350

pickup address

pickupCity

string

yes

60

pickup city

province

string

yes

60

pickup province

barangay

string

no

60

pickup barangay

note: not required but will affect the accuracy of identifying if the location is serviceable by the provider.

postalCode

string

no

10

pickup postal code

lat

number

yes (for onDemand providers)

n/a

latitude of pickup location

long

number

yes (for onDemand providers)

longitude of pickup location

tags

array

no

list of tag id, can be get through getTags API

remarks

string

no

350

pickup remarks

Fields of deliveryDetails

Field

Data Type

Required

Max Length

Description

recipientName

string

yes

80

name of recipient

contactNumber

string

yes

20

contact number of receiver. Must be a valid number

emailAddress

string

no

60

email address of receiver

deliveryDateTime

string

yes

n/a

date and time of deliver.
Format: YYYY-MM-DDTHH:mm

deliveryAddress

string

yes

350

delivery address

deliveryCity

string

yes

60

delivery city

province

string

yes

60

delivery province

barangay

string

no

60

delivery barangay

note: not required but will affect the accuracy of identifying if the location is serviceable by the provider.

postalCode

string

no

10

delivery postal code

lat

number

yes (for onDemand providers)

n/a

latitude of delivery location

long

number

yes (for onDemand providers)

longitude of delivery location

tags

array

no

list of tag id, can be get through getTags API

itemDescription

string

no

350

Details about the item/product. e.g. Item name, quantity etc.

remarks

string

no

350

delivery remarks

productSize

string

yes (for scheduled providers)

n/a

product/parcel size

can be one of the following:
(empty string for on demand providers)
S
M
L
XL

length

number

no

length measurement of an item in inches

width

number

no

length measurement of an item in inches

height

number

no

length measurement of an item in inches

weight

number

no

weight measurement of an item in kilograms

declaredValue

number

no

declared item price

codAmount

number

no

cash on delivery amount

metaFields

object

no

metaFields to fulfill provider’s required fields

Sample Request Body
Code Block
languagejson
{
    "refNo": "order-001",
    "isAutoReattempt": false,
    "pickupDetails": {Required field.",
            "province": "Required field.",
            "deliveryDateTime": "Invalid data type. Must be in string",
            "deliveryAddress": "Required field.",
            "deliveryCity": "Required field.",
            "itemDescription": "Invalid data type. Must be in string",
            "productSize": "Invalid data type. Must be in string",
            "width": "Invalid data type. Must be in number",
            "height": "Invalid data type. Must be in number",
            "length": "Invalid data type. Must be in number",
            "weight": "Invalid data type. Must be in number",
            "metaFields": {
                "shipment": "Required field."
            }
        }
    }
}
Status: 400 Bad Request
{
    "success": false,
    "message": "Invalid Request Parameter. Check your dashboard documentation",
    "result": {
        "pickupDetails": {
            "customerName": "Maximum length exceeded.",
            "contactNumber": "Invalid format.",
            "emailAddress": "Maximum length exceeded.",
            "remarks": "Maximum length exceeded.",
            "barangay": "Maximum length exceeded.",
            "province": "Maximum length exceeded.",
            "postalCode": "Maximum length exceeded.",
            "pickupAddress": "Maximum length exceeded.",
            "senderNamepickupCity": "ChristianMaximum Picklength up"exceeded."
        },
        "contactNumber"deliveryDetails": {
            "customerName": "09123456789Maximum length exceeded.",
            "emailAddresscontactNumber": "a@gmailInvalid format.com",,
            "pickupDateTimeemailAddress": "2020-09-29T21:05",Maximum length exceeded.",
            "pickupAddressremarks": "536Maximum Calbayoglength Stexceeded.",
Highway Hills Mandaluyong City",         "pickupCitybarangay": "Mandaluyong CityMaximum length exceeded.",
            "province": "Metro ManilaMaximum length exceeded.",
            "barangaypostalCode": "Highway HillsMaximum length exceeded.",
            "postalCodedeliveryAddress": "1556Maximum length exceeded.",
            "latdeliveryCity": 14.5776292 "Maximum length exceeded.",
        "long": 121.0463673,   "itemDescription": "Maximum length exceeded."
  "tags": [],     }
   "remarks": "my remarks"
    }, }
}


Missing Partner ID

Code Block
languagejson
Status: 400 Bad Request
{
    "deliveryDetailssuccess": {
   false,
    "recipientNamemessage": "Christian Delivery",
        "contactNumber": "09123456789",
   Missing partnerId. Please check your dashboard documentation."
}


Invalid Partner ID

Code Block
languagejson
Status: 400 Bad Request
{
    "emailAddresssuccess": "a@email.com"false,
        "deliveryDateTimemessage": "2020-09-29T22:06",
        "deliveryAddress": "Vermont Royale, Antipolo",
        "deliveryCity": "Antipolo",
   Invalid partner id. Either it's not existing or you don't have rights to post to the partner."
}


Invalid business store id

Code Block
languagejson
Status: 400 Bad Request
{
    "provincesuccess": "Rizal",
   false,
    "barangaymessage": "SanInvalid Roque",store ID. Check your storeId. Remove storeId to use "postalCode": "1870",
        "declaredValue": 200,
   default store."
}


Invalid pickup/delivery date and time.

Code Block
languagejson
Status: 400 Bad Request
{
    "productSizesuccess": "L",
  false,
     "widthmessage": 0, 
        "height": 0,
        "length": 10,
  "Pickup/delivery date and time must be greater than the current time."
}
Status: 400 Bad Request
{
     "weightsuccess": 0false,
   
    "codAmountmessage": 250,
        "lat": 14.5776292,
        "long": 121.0463673 "Delivery date and time must be greater than the pickup time."
}


Missing coordinates for on demand providers.

Code Block
{
    "success": false,
    "message": "Pickup/delivery latitude and longitude is required for on demand providers."
}


Invalid pickup/delivery location.

Code Block
languagejson
Status: 400 Bad Request
{
    "success": false,
    "message": "Invalid pickup location."
}
"tags"Status: [],400 Bad Request
 {
    "itemDescriptionsuccess": "Brand New Phone X"false,
    "message": "Invalid delivery  "remarks": "Please handle with care. Ask the guards for direction."location."
}


Not Serviceable

Code Block
languagejson
Status: 400 Bad Request
{
    "success": false,
    "message": "Pickup location is "metaFields": {}
    }
}
Sample Response
Code Block
languagejson
Status: 200 OK!not serviceable by the provider."
}
Status: 400 Bad Request
{
    "success": truefalse,
    "message": "Job posted on marketplace",
    "result":Delivery location is not serviceable by the provider."
}
Status: 400 Bad Request
{
    "success": false,
    "postIdmessage": "3nHfPLXUGWYhlQ5TcNva",Pickup and delivery location is not serviceable by the "customerNameprovider.": "Christian Pick up",
   
}

PSGC false and field pickup/delivery address is in PSGC format

Code Block
languagejson
Status: 400 Bad Request
{
    "contactNumbersuccess": "09123456789",
  false,
     "emailAddressmessage": "a@gmailInvalid pickup location.com",
   "
}

Status: 400 Bad Request
{
    "completionDateTimesuccess": 1601384700000false,
 
      "pickupAddressmessage": "536Invalid Calbayogdelivery St. Highway Hills Mandaluyong City",
        "pickupCity": "Mandaluyong City",
   location."
}


Product

Code Block
languagejson
Status: 400 Bad Request
{
    "provincesuccess": "Metro Manila"false,

       "barangaymessage": "HighwayProduct Hills",size not available for the designated service   "postalCode": "1556",
   area."
}

Auto Reattempt

Code Block
languagejson
Status: 400 Bad Request
{
    "latsuccess": 14.5776292,
   false,
    "longmessage": 121.0463673,
        "tags": [
  "No auto re-attempt settings configured in your Deliveries PH Web account."
}
Expand
title8. Update Post Status

Update Post Status
Status
colourRed
titleProvider

Description

To Update post status

Endpoint

/updatePostStatus

Method

POST


Request Headers

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


URL Query parameters

Code Block
languagejson
{
    "apiKey": "<apiKey will ],be acquired on       "metaTags": "{\"-LI4Qgef9HIHhb2AzGzW\":{\"colorIndex\":1,\"label\":\"API\"},\"-LK5fMS1u-Qsv-G1tc9l\":{\"colorIndex\":4,\"label\":\"Pick-up\"}}",
 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 milliseconds. Leave 0, null or empty string to use current server timestamp.

metaState

string

no

custom status/state from provider


Sample Request Body

Code Block
languagejson
{
      "storeNamepostId": "uuNzkYoOy1VI373BoKY9",
        "detailsstatus": "START_DELIVERY",
        "remarks": "myRider remarks",is on        "transactions": [],
        "attempts": {},
        "approximateShippingFee": 115,
        "billableShippingFee": 0,
        "actualShippingFee": 0,
his way",
       "finalShippingFeetimeStamp": 01575890011178,
 
      "metaState": "",
     
}



Sample Response

Code Block
languagejson
Status: 200 OK!
{
    "lastUpdateRemarkssuccess": true,
    "message"",Post successfully        "businessId": "DRINKKA",
        "businessName": "Drinkka_DEMO",
        "businessStoreId": null,
        "storeId": null,
        "courierName": "Sandbox_DX",
        "createdAt": 1601372523479,
        "partnerId": "SANDBOX_DX",
        "refNo": "order-001",
        "status": "ASSIGNED",
        "meta": "{\"customerName\":\"Christian Delivery\",\"contactNumber\":\"09123456789\",\"emailAddress\":\"a@email.com\",\"completionDateTime\":1601388360000,\"deliveryAddress\":\"Vermont Royale, Antipolo\",\"deliveryCity\":\"Antipolo\",\"province\":\"Rizal\",\"barangay\":\"San Roque\",\"postalCode\":\"1870\",\"itemPrice\":200,\"dimension\":{\"length\":10,\"width\":0,\"height\":0},\"codAmount\":250,\"lat\":14.5776292,\"long\":121.0463673,\"tags\":[\"-LI4Qgef9HIHhb2AzGzW\",\"-LK5fK2Pq--uEhN4T9UG\"],\"metaTags\":\"{\\\"-LI4Qgef9HIHhb2AzGzW\\\":{\\\"colorIndex\\\":1,\\\"label\\\":\\\"API\\\"},\\\"-LK5fK2Pq--uEhN4T9UG\\\":{\\\"colorIndex\\\":3,\\\"label\\\":\\\"Delivery\\\"}}\",\"details\":\"Brand New Phone X\",\"remarks\":\"Please handle with care. Ask the guards for direction.\",\"trackingNumber\":\"\",\"trackingUrl\":\"\",\"weight\":0}updated."
}


Status Updates:

Status

Description

ASSIGNED

this can only be triggered in web if business or customers assign a post/an opportunity to provider

ACCEPTED

this can only be triggered through manual accept in their DPH account or

if AUTO ACCEPT is toggled on, post will automatically be accepted

ASSIGNING_RIDER

Provider is assigning a rider for the order. For on-demand providers only.

START_PICKUP

Order is for pickup

DONE_PICKUP

Order has been picked up

ARRIVED_AT_HUB

Courier has successfully delivered order to hub. For scheduled providers only.

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 fill up the remarks field.

Update Post Status
Expand
title9. 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.

businessStoreId

no

Filter by store/hub.

isPSGC

no

Set to true to receive PSGC address format


Sample URL Parameters

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



Sample Response:

Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "result": [
		{
            "postId": "uuNzkYoOy1VI373BoKY9",
            "customerName": "Christian Pick up",
            "contactNumber": "09123456789",
            "emailAddress": "a@gmail.com",
            "metaFieldscompletionDateTime": {}1583836200000,
    } }

Error Messages:

Invalid Request Parameter

Code Block
languagejson
Status: 400 Bad Request {     "successpickupAddress": false,"Sitio barrio, Angeles Pampanga Philippines",
     "message": "Invalid Request Parameter. Check your dashboard documentation"pickupCity",: "Mandaluyong City",
  "result": {         "pickupDetailsprovince": {"Metro Manila",
            "customerNamelat": "Required field."14.5776292,
            "contactNumberlong": "Required field."121.0463673,
            "provincetags": "Required field.",[
             "pickupDateTime": "Invalid data type. Must be in string", "-LI4Qgef9HIHhb2AzGzW",
                "pickupAddress": "Required field.",-LK5fMS1u-Qsv-G1tc9l"
            ],
  "pickupCity": "Required field."        "metaTags": },
        "deliveryDetails": {
            "customerName": "Required field."{\"-LI4Qgef9HIHhb2AzGzW\":{\"colorIndex\":1,\"label\":\"API\"},\"-LK5fMS1u-Qsv-G1tc9l\":{\"colorIndex\":4,\"label\":\"Pick-up\"}}",
            "contactNumberstoreName": "Required field.",
            "provinceremarks": "Requiredmy field.remarks",
            "deliveryDateTimebusinessId": "Invalid data type. Must be in stringSANDBOX_DEV",
            "deliveryAddressbusinessName": "Required field.Sandbox_Dev",
            "deliveryCitybusinessStoreId": "Required field."null,
            "itemDescriptionstoreId": "Invalid data type. Must be in string"null,
            "productSizecourierName": "Invalid data type. Must be in stringSandbox_DX",
            "widthcreatedAt": "Invalid data type. Must be in number"1583381948826,
            "heightpartnerId": "Invalid data type. Must be in numberSANDBOX_DX",
            "lengthrefNo": "Invalid data type. Must be in numberorder-001",
            "weightstatus": "Invalid data type. Must be in numberASSIGNED",
            "metaFieldsisAutoReattempt": true,
{            "meta": "{\"customerName\":\"Christian Delivery\",\"contactNumber\":\"09123456789\",\"emailAddress\":\"a@gmail.com\",\"completionDateTime\":1583928900000,\"deliveryAddress\":\"Vermont   "shipment": "Required field."
            }
        }
    }
}
Status: 400 Bad Request
{
    "success": false,
    "message": "Invalid Request Parameter. Check your dashboard documentation",
    "result": {
        "pickupDetails": {
            "customerName": "Maximum length exceeded.",
            "contactNumber": "Invalid format.",
            "emailAddress": "Maximum length exceeded.",
            "remarks": "Maximum length exceeded.",
            "barangay": "Maximum length exceeded.",
            "province": "Maximum length exceeded.",
            "postalCode": "Maximum length exceeded.",
            "pickupAddress": "Maximum length exceeded.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\\\"}}\"}",
            "pickupCitymetaFields": "Maximum length exceeded."{}
         },
	]
}

Sample URL Parameters:

Code Block
languagejson
{
    "apiKey": "fb77c9653bf5e736d191b46bbfed7c2bd",
	"deliveryDetailspostId": {
       "uuNzkYoOy1VI373BoKY9",
	"partnerId": "SANDBOX_DX"
	"isPSGC": true
}

Sample Response:

Code Block
languagejson
Status: 200 OK!
{
    "customerNamesuccess": "Maximum length exceeded.",
true,
           "contactNumber"result": "Invalid format.",[
		{
            "emailAddresspostId": "Maximum length exceeded.uuNzkYoOy1VI373BoKY9",
            "remarkscustomerName": "MaximumChristian lengthPick exceeded.up",
            "barangaycontactNumber": "Maximum length exceeded.09123456789",
            "provinceemailAddress": "Maximum length exceededa@gmail.com",
            "postalCodecompletionDateTime": "Maximum length exceeded."1583836200000,
            "deliveryAddresspickupAddress": "Maximum length exceeded.Sitio barrio, Angeles Pampanga Philippines",
            "deliveryCitypickupCity": "MaximumCITY lengthOF exceeded.MANDALUYONG",
            "itemDescriptionprovince": "Maximum length exceeded."SECOND DISTRICT",
           } "lat": 14.5776292,
  } }
Missing Partner ID
Code Block
languagejson
Status: 400 Bad Request {     "successlong": false121.0463673,
    "message": "Missing partnerId. Please check your dashboard documentation."
}
Invalid Partner ID
Code Block
languagejson
Status: 400 Bad Request
{        "tags": [
          "success": false,     "message-LI4Qgef9HIHhb2AzGzW":,
"Invalid partner id. Either it's not existing or you don't have rights to post to the partner."
}
Invalid business store id
Code Block
languagejson
Status: 400 Bad Request
{ "-LK5fMS1u-Qsv-G1tc9l"
         "success": false,  ],
  "message": "Invalid store ID. Check your storeId. Remove storeId to use default store."
}
Invalid pickup/delivery date and time.
Code Block
languagejson
Status: 400 Bad Request
{
    "success": false,
    "message": "Pickup/delivery date and time must be greater than the current time."
}
Status: 400 Bad Request
{"metaTags": "{\"-LI4Qgef9HIHhb2AzGzW\":{\"colorIndex\":1,\"label\":\"API\"},\"-LK5fMS1u-Qsv-G1tc9l\":{\"colorIndex\":4,\"label\":\"Pick-up\"}}",
            "successstoreName": false,
    "message":,
"Delivery date and time must be greater than the pickup time." }
Missing coordinates for on demand providers.
Code Block
{     "successremarks": false,     "message": "Pickup/delivery latitude and longitude is required for on demand providers."
}
Invalid pickup/delivery location.
Code Block
languagejson
Status: 400 Bad Request
{"my remarks",
      "success": false,     "messagebusinessId": "SANDBOX_DEV"Invalid,
pickup location." } Status: 400 Bad Request {     "successbusinessName": false,"Sandbox_Dev",
            "messagebusinessStoreId": "Invalidnull,
 delivery location." }
Not Serviceable
Code Block
languagejson
Status: 400 Bad Request {     "successstoreId": falsenull,
     "message": "Pickup location is not serviceable by the provider."
}
Status: 400 Bad Request
{"courierName": "Sandbox_DX",
            "successcreatedAt": false1583381948826,
     "message": "Delivery location is not serviceable by the provider."
}
Status: 400 Bad Request
{       "partnerId": "SANDBOX_DX",
            "successrefNo": false,"order-001",
      "message": "Pickup and delivery location is not serviceable by the provider."
}
Product
Code Block
languagejson
Status: 400 Bad Request
{"status": "ASSIGNED",
            "successisAutoReattempt": falsetrue,
    "message": "Product size not available for the designated service area."
}

Auto Reattempt

Code Block
languagejson
Status: 400 Bad Request
{
    "success": false,
    "message": "No auto re-attempt settings configured in your Deliveries PH Web account."
}
Expand
title8. 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 milliseconds. Leave 0, null or empty string to use current server timestamp.

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

ASSIGNED

this can only be triggered in web if business or customers assign a post/an opportunity to provider

ACCEPTED

this can only be triggered through manual accept in their DPH account or

if AUTO ACCEPT is toggled on, post will automatically be accepted

START_PICKUP

Order is for pickup

DONE_PICKUP

Order has been picked up

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 fill up the remarks field.

Expand
title9. Get Post
Get Post StatuscolourGreentitleBUSINESS
"meta": "{\"customerName\":\"Christian Delivery\",\"contactNumber\":\"09123456789\",\"emailAddress\":\"a@gmail.com\",\"completionDateTime\":1583928900000,\"deliveryAddress\":\"Vermont Royale, Antipolo\",\"deliveryCity\":\"CITY OF 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\\\"}}\"}",
            "metaFields": {}
        },
	]
}

Sample URL Parameters
Expand
title10. Update Fee

Update Fee
Status
colourRed
title

PROVIDER

Provider

Description

To

get

pass or update fees of a

specific post or all post

post. For providers only

Endpoint

/

getPost

updateFee

Method

GET

POST


Request Headers

Code Block
languagejson
{
    "Auth-Token": "<Auth token acquired on api LOGIN>",
    "Content-Type": "application/json"
}
URL Parameters (Query Parameters)Parameter


Query parameters (URL)

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


Request Body Fields

Field

Data Type

Required

Description

apiKey

postId

string

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.

businessStoreId

no

Filter by store/hub.

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
{
    "apiKeypostId": "fb77c9653bf5e736d191b46bbfed7c2bdWq9FPWxCYVxNgrPrn08D",
	"postId": "uuNzkYoOy1VI373BoKY9",
	"partnerId": "SANDBOX_DX"
}
Sample Response:
Code Block
languagejson
Status: 200 OK!    "remarks": "Shipping fee from upon booking.",
    "fees": [
        {
            "value": 100,
            "type": "shipping"
        },
        {
    "success": true,        "resultvalue": [
		{20,
            "postIdtype": "uuNzkYoOy1VI373BoKY9insurance",
        }
     "customerName": "Christian Pick up",
 ]
}


Sample Response

Code Block
languagejson
status: 200 OK!
{
    "success": true,
    "result": "Post successfully updated."
}
Expand
title11. Update Meta Fields v2

Update Meta Fields v2
Status
colourRed
titleProvider

Description

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

Endpoint

/v2/updateMetaFields

Method

POST


Request Headers

Code Block
{
          "contactNumber"Auth-Token": "09123456789",<Auth token acquired on api LOGIN>",
       "emailAddress"Content-Type": "a@gmail.com",
application/json"
}


Query parameters (URL)

Code Block
{
    "apiKey": "<apiKey will be acquired on login "completionDateTime": 1583836200000,
     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 pickup/delivery requires at least one field to update.

  • You may update the tracking of both or pickup/delivery only.

  • Undefined tracking number/url fields will not be updated.


Sample Request Body

Code Block
languagejson
{
      "pickupAddresspostId": "Sitio barrio, Angeles Pampanga PhilippinesuuNzkYoOy1VI373BoKY9",
  
         "pickupCitypickup": "Mandaluyong City",
   {
        "provincetrackingNumber": "Metro ManilaORDER-001-PIC-ASV",
            "lattrackingUrl": 14.5776292,
            "long": 121.0463673,
            "tags": [
           https://trackmyorder.com/track?id=ORDER-001-PIC-ASV"
    "-LI4Qgef9HIHhb2AzGzW"},
    "delivery": {
        "trackingNumber":  "ORDER-LK5fMS1u001-QsvDEL-G1tc9l"
            ],
ASV",
           "metaTagstrackingUrl": "{\"-LI4Qgef9HIHhb2AzGzW\":{\"colorIndex\":1,\"label\":\"API\"},\"-LK5fMS1u-Qsv-G1tc9l\":{\"colorIndex\":4,\"label\":\"Pick-up\"}}",https://trackmyorder.com/track?id=ORDER-001-DEL-ASV"
            "storeName": "",
 }
}


Sample Response

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

Request Headers
Expand
title12. Get Available Partners

Get Available Partners
Status
colourGreen
titlebUSINESS

Description

To get the list of available scheduled providers and its product information and rates based on location.

Endpoint

/v3/getAvailablePartners

Method

POST

Info
  • Get Available Partners is not available for partners with “on demand” service type.

  • Inches is used as a unit of measurement for length, width and height. (Please see sample request response).

  • Kg is used as a unit of measurement for weight. (Please see sample request response).


Request Headers

Code Block
languagejson
{
    "businessIdAuth-Token": "SANDBOX_DEV",<Auth token acquired on          "businessName": "Sandbox_Dev",
   api LOGIN>",
        "businessStoreId"Content-Type": null,
            "storeId": null,
  "application/json"
}

Request Params

Code Block
languagejson
{
         "courierNameapiKey": "Sandbox_DX",<apiKey             "createdAt": 1583381948826,
            "partnerId": "SANDBOX_DX",
            "refNo": "order-001will be acquired on login API>",
}


Request Body

Field

Data type

Required

Description

serviceType

string

yes

can be any of the following:
onDemand
scheduled

pickup

object

yes

object for pickup address

delivery

object

yes

object for delivery address

dimensions

object

no

object for dimensions

weight

number

no

weight measurement of an item in kilograms

Fields of pickup and delivery:

Field

Data Type

Required

Max Length

Description

province

string

yes

60

province

city

string

yes

60

city

barangay

string

no

60

barangay


Sample Request Body

Code Block
languagejson
{
   "serviceType": "Scheduled",
   "pickup":  {
      "statusprovince": "ASSIGNEDmetro manila",
   
        "isAutoReattemptcity": true"quezon city",
            "meta"barangay": "{\"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\\\"}}\"}"Katipunan"
   },
   "delivery": {
      "province": "rizal",
      "city": "antipolo city",
      "barangay": "san roque"
   },
   "dimensions": {
      "length": 100,
      "width": 18,
      "height": 6
   },
   "weight": 5
}

Sample Response (Serviceable area)

Code Block
languagejson
Status: 200 OK!
{
    "success": true,
    "result": {
        "destinations": [
            "REGION 4-A"
            "NCR"
        ],
        "estimatedPickupDays": 3,
        "estimatedDeliveryDays": 6,
  "metaFields      "products": {}[
          }, 	] }
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

Code Block
{
    "Auth-Token": "<Auth token acquired on api LOGIN>",            "Content-Typesize": "application/json"
}
Query parameters (URL)
Code Block
languagejson
{L",
                "apiKeyprice": "<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
{ 165,
                "description": "12 x 18 x 2",
                "name": "Large Pouch",
                "length": 12,
                "postIdwidth": 18,
                "Wq9FPWxCYVxNgrPrn08Dheight": 2,
                "remarksweight": "Shipping fee from upon booking." 3
            },
    "fees": [        {
                "size": "XL",
                "price": 310,
   {             "valuedescription": 100,"18 x 12 x 9",
                "typename": "shippingBox",
           },     "length": 18,
   {             "valuewidth": 2012,
            "type": "insurance"     "height": 9,
   }     ]
}
Sample Response
Code Block
languagejson
status: 200 OK! {     "success": true,     "result": "Post successfully updated."
}
Expand
title11. Update Meta Fields v2
Update Meta Fields v2
Status
colourRed
titleProvider

Description

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

Endpoint

/v2/updateMetaFields

Method

POST

Request Headers
Code Block
{     "Auth-Tokenweight": "<Auth6
 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 pickup/delivery requires at least one field to update.

  • You may update the tracking of both or pickup/delivery only.

  • Undefined tracking number/url fields will not be updated.

Sample Request Body
}
}

Sample Response (Not serviceable area)

Code Block
languagejson
Status: 400 Bad Request
{
    "postIdsuccess": "uuNzkYoOy1VI373BoKY9"false,
    "pickupresult": {"Pickup/delivery location is not serviceable by the selected  "trackingNumber": "ORDER-001-PIC-ASV",
   provider."
}

Error Messages:

Missing Partner Id

Code Block
languagejson
Status: 400 Bad Request
{
    "success": false,
    "trackingUrlmessage": "https://trackmyorder.com/track?id=ORDER-001-PIC-ASV"
    },Missing partnerId. Please check your dashboard documentation."
}

Invalid Partner Id

Code Block
languagejson
Status: 400 Bad Request
{
    "delivery": {
 success": false,
      "trackingNumbermessage": "ORDER-001-DEL-ASV",
        "trackingUrl": "https://trackmyorder.com/track?id=ORDER-001-DEL-ASV"
    }
}
Sample Response
Invalid partner id. Either it's not existing or you don't have rights to post to the partner."
}

Service type “On Demand”

Code Block
languagejson
Status: 200 OK!400 Bad Request
{
    "success": truefalse,
    "message": "Post successfully updatedPrice quotation is not yet available for on demand providers."
}

...

List of Statuses

Expand

Status

Description

ASSIGNED

this can only be triggered in web if business or customers assign a post/an opportunity to provider

ACCEPTED

this can only be triggered through manual accept in their DPH account or

if AUTO ACCEPT is toggled on, post will automatically be accepted

ASSIGNING_RIDER

Provider is assigning a rider for the order. For on-demand providers only.

START_PICKUP

Order is for pickup

DONE_PICKUP

Order has been picked up

ARRIVED_AT_HUB

Courier has successfully delivered order to hub. For scheduled providers only.

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 fill up the remarks field.



Responses (Success and Errors)

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.