Endpoint URL
Staging | |
---|---|
Production | will be provided after SIT |
...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Login and Get Session Token
|
Code Block | ||
---|---|---|
| ||
{ "Content-Type": "application/json" } |
Request Body
Field | Data type | Required | Description |
---|---|---|---|
string | yes | email credential | |
password | string | yes | password |
Sample Request Body
Code Block | ||
---|---|---|
| ||
{ "email": "sandbox_dev@gmail.com", "password": "password" } |
Sample Response
Code Block | ||
---|---|---|
| ||
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. |
Info |
---|
|
Error Messages:
Invalid Email
Code Block | ||
---|---|---|
| ||
Status: 401 Unauthorized { "success": false, "results": "EMAIL_NOT_FOUND" } |
Invalid Password
Code Block | ||
---|---|---|
| ||
Status: 401 Unauthorized { "success": false, "results": "INVALID_PASSWORD" } |
Quota Limit Exceeded Error
Code Block | ||
---|---|---|
| ||
Status: 401 Unauthorized { "success": false, "results": "QUOTA_EXCEEDED : Exceeded quota for verifying passwords." } |
Expand | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||
Get Partners
|
Code Block | ||
---|---|---|
| ||
{ "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 | ||
---|---|---|
| ||
Status: 200 OK! { "success": true, "results": [ { "id": "SANDBOX_BUSINESS", "name": "Sandbox Business" }, { "id": "SANDBOX_QA", "name": "Sandbox_Qa" } ] } |
Expand | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
Get List of Areas
|
Code Block |
---|
{ "Auth-Token": "<Auth token acquired on api LOGIN>" } |
Query parameters (URL)
Code Block |
---|
{ "apiKey": "<apiKey will be acquired on login API>" } |
Sample Response
Code Block | ||
---|---|---|
| ||
Status: 200 OK! { "success": true, "results": [ { "id": "-KnmC5Y0pFYBquoDL1zo", "info": { "code": "A1", "name": "Area 1", "stores": [ "-LDnYzs1xbK-FeQ0VPFr" ] } } ] } |
Expand | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||
Get List of Stores/Hubs
|
Code Block |
---|
{ "Auth-Token": "<Auth token acquired on api LOGIN>" } |
Query parameters (URL)
Code Block | ||
---|---|---|
| ||
{ "apiKey": "<apiKey will be acquired on login API>", "areaCode": "<area code acquired from getListOfAreas API>" } |
Sample URL
Code Block | ||
---|---|---|
| ||
https://us-central1-fleet-staging-2333a.cloudfunctions.net /getListOfStores?apiKey=7c5dd55738b964944f9357bcc7f45ce6d857ff18&areaCode=A1 |
Sample Response
Code Block | ||
---|---|---|
| ||
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, "longitude": 121.00680469999998, "name": "Main Store", "province": "Metro Manila", "provinceKey": "MM" } } ], "total": 1 } |
Expand | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Update Post Status
| |||||||||||||||||||||
Get Provider's Create Post v3 Template
|
Code Block | ||
---|---|---|
| ||
{ "Auth-Token": "<Auth token acquired on api LOGIN>", "Content-Type": "application/json" } |
URL
Query parametersParameters
codeField |
---|
Required |
---|
{
"apiKey": "<apiKey will be acquired on login API>"
}
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
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 | ||
---|---|---|
| ||
https://us-central1-fleet-dev-ph.cloudfunctions.net/v3/getCreatePostTemplate?apiKey=7c5dd55738b964944f9357bcc7f45ce6d857ff18&partnerId=SANDBOX_DX |
Sample Response
Code Block | ||
---|---|---|
| ||
status: 200 OK! { "success": true, "postIdresult": "uuNzkYoOy1VI373BoKY9",{ "requestBody": { "statusrefNo": "START_DELIVERY", "remarkspickupDetails": "Rider is on his way",{ "timeStampcustomerName": 1575890011178"", "metaState "contactNumber": "" } |
Code Block | ||
---|---|---|
| ||
Status: 200 OK! { , "successemailAddress": true, "message": "Post successfully updated." } |
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.
title | 6. Get Post |
---|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Description
To get a specific post or all post
Endpoint
/getPost
Method
GET
Code Block | ||
---|---|---|
| ||
{
"Auth-Token": "<Auth token acquired on api LOGIN>"
} |
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.
Code Block | ||
---|---|---|
| ||
{
"apiKey": "fb77c9653bf5e736d191b46bbfed7c2bd",
"postId": "uuNzkYoOy1VI373BoKY9",
"partnerId": "SANDBOX_DX"
} |
Code Block | ||
---|---|---|
| ||
Status: 200 OK! { "success": true, "result": [ {", "lat": 0, "long": 0, "tags": [], "remarks": "", "barangay": "", "province": "", "postIdpostalCode": "uuNzkYoOy1VI373BoKY9", "customerNamepickupDateTime": ""Christian, Pick up", "contactNumberpickupAddress": "09123456789", "emailAddresspickupCity": "a@gmail.com", "completionDateTime": 1583836200000}, "pickupAddressdeliveryDetails": "Sitio{ barrio, Angeles Pampanga Philippines", "pickupCitycustomerName": "Mandaluyong City", "provincecontactNumber": "Metro Manila", "latemailAddress": 14.5776292,"", "longlat": 121.04636730, "tagslong": [0, "-LI4Qgef9HIHhb2AzGzW"tags": [], "-LK5fMS1u-Qsv-G1tc9l" remarks": "", ], "metaTags"barangay": "{\"-LI4Qgef9HIHhb2AzGzW\":{\"colorIndex\":1,\"label\":\"API\"},\"-LK5fMS1u-Qsv-G1tc9l\":{\"colorIndex\":4,\"label\":\"Pick-up\"}}",, "storeNameprovince": "", "remarkspostalCode": "my remarks", "businessIddeliveryDateTime": "SANDBOX_DEV", "businessNamedeliveryAddress": "Sandbox_Dev", "businessStoreIddeliveryCity": null"", "storeIditemDescription": null,"", "courierNameitemPrice": "Sandbox_DX"0, "createdAtcodAmount": 15833819488260, "partnerIdproductSize": "SANDBOX_DX", "refNolength": 0, "order-001", "width": 0, "statusheight": 0, "ASSIGNEDweight": 0, "metametaFields": "{\"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\\\"}}\"}",{ "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" "metaFields": {} }, ] } |
title | 7. Get Partner Metafields |
---|
Status | ||||
---|---|---|---|---|
|
Description
To get metafields of all or a specific provider. For internal use of DPH
Endpoint
/getPartnersMetaFields
Method
GET
Code Block | ||
---|---|---|
| ||
{ ] "Content-Type": "application/json" "Auth-Token": "<Auth token acquired on api LOGIN>" } |
Code Block | ||
---|---|---|
| ||
{ "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. |
Code Block | ||
---|---|---|
| ||
Status: 200 OK! } } |
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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Quotation
|
Code Block | ||
---|---|---|
| ||
{ "successAuth-Token": true"<Auth token acquired on api LOGIN>", "resultContent-Type": "application/json" } |
Request Params
Code Block | ||
---|---|---|
| ||
{ "goodsapiKey": {"<apiKey will be acquired on login API>", "activepartnerId": true"<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 | ||
---|---|---|
| ||
Status: 200 OK! { "success": true, "result{ "pickup": { "province": "metro manila", "city": "pasig city", "barangay": "pinagbuhatan" }, "delivery": { "SANDBOX_BA": { "province": "rizal", "city": "cainta", "barangay": "san andres" } } |
Sample Response (Serviceable area)
Code Block | ||
---|---|---|
| ||
Status: 200 OK! { "success": true, "goodsresult": { "destinations": [ "active": true "REGION 4-A" "NCR" } ], "estimatedPickupDays": }3, "SANDBOX_PROVIDERestimatedDeliveryDays": {}6, "SANDBOX_QAproducts": { [ "cod": { "requiredsize": true"L", "activeprice": true165, "keydescription": "cod12 x 18 x 2", "fieldTypename": "stringLarge Pouch", "placeholderlength": "COD"12, }, "name"width": {18, "fieldTypeheight": "string"2, "placeholderweight": "Name", 3 }, "required": false, { "activesize": true"XL", "keyprice": "name"310, }, "description": "18 x 12 x "insurance": {9", "requiredname": true"Box", "activelength": true18, "keywidth": "insurance"12, "fieldTypeheight": "string"9, "placeholderweight": "Insurance"6 }, ] "vehicleType": { } } |
Sample Response (Not serviceable area)
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "success": false, "optionsresult": ["Pickup/delivery location is not serviceable by the selected provider." } |
Error Messages:
Missing Partner Id
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "success": false, { "message": "Missing partnerId. Please check your dashboard documentation." } |
Invalid Partner Id
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "success": false, "valuemessage": "car",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 | ||
---|---|---|
| ||
Status: 400 Bad Request { "labelsuccess": "Car"false, "message": "Price quotation is not yet available for on demand },providers." } |
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Create Post v3
|
Code Block | ||
---|---|---|
| ||
{ "Auth-Token": "<Auth token acquired on api LOGIN>", { "Content-Type": "application/json" } |
Query parameters (URL)
Code Block | ||
---|---|---|
| ||
{ "value"apiKey": "motorcycle"<REQUIRED, apiKey will be acquired on login API>", "label"partnerId": "Motorcycle"<REQUIRED, preferred partner/provider, can be acquired on getPartners } ], "required": false, "active": true, "key": "vehicleType", "placeholder": "Vehicle Type", "fieldType": "dropdown" } } } } |
Code Block |
---|
Status: 400 Bad Request
{
"success": false,
"message": "Invalid partner id. Neither it's not existing or you don't have rights to post to the partner."
} |
Code Block |
---|
Status: 400 Bad Request
{
"success": false,
"message": "No preferred partners yet. Please invite a partner in Deliveries PH - My Partners"
} |
title | 8. Update Fee |
---|
Status | ||||
---|---|---|---|---|
|
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"
} |
Code Block | ||
---|---|---|
| ||
{
"apiKey": "<apiKey will be acquired on login API>"
} |
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
API>"
} |
Info |
---|
|
metaFields:
Meta fields are special fields requested by the provider that needs input from the customer.
To be able to determine 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:
| |
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 |
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
Update Meta Fields v2Status | ||||
---|---|---|---|---|
|
Description
To update tracking number and tracking url of pickup or delivery of a post. For providers only
Endpoint
/v2/updateMetaFields
Method
POST
Field | Data Type | Required | Max Length | Description |
---|---|---|---|---|
valuerecipientName | numberstring | yes | 80 | amount name of feerecipient |
typecontactNumber | string | yes | 20 | type of fee, must be of the following:
|
Info |
---|
|
Code Block | ||
---|---|---|
| ||
{
"postId": "Wq9FPWxCYVxNgrPrn08D",
"remarks": "Shipping fee from upon booking.",
"fees": [
{
"value": 100,
"type": "shipping"
},
{
"value": 20,
"type": "insurance"
}
]
} |
Code Block | ||
---|---|---|
| ||
status: 200 OK!
{
"success": true,
"result": "Post successfully updated."
} |
title | 9. Update Meta Fields v2 |
---|
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. |
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: |
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 | ||
---|---|---|
| ||
{ "Auth-TokenrefNo": "<Authorder-001", token acquired on api LOGIN>""pickupDetails": { "senderName": "Christian Pick up", "Content-Type "contactNumber": "09123456789", "emailAddress": "application/json" } |
Code Block |
---|
{a@gmail.com", "apiKeypickupDateTime": "<apiKey will be acquired on login API>" } |
Field
Data Type
Required
Description
postId
string
yes
id of post to update.
trackingNumber
string
no
tracking number
trackingUrl
string
no
tracking URL
Info |
---|
|
Code Block | ||
---|---|---|
| ||
{ "postId": "uuNzkYoOy1VI373BoKY9",2020-09-29T21:05", "pickupAddress": "536 Calbayog St. Highway Hills Mandaluyong City", "pickuppickupCity": { "Mandaluyong City", "trackingNumberprovince": "ORDER-001-PIC-ASVMetro Manila", "trackingUrlbarangay": "https://trackmyorder.com/track?id=ORDER-001-PIC-ASV" Highway Hills", }, "deliverypostalCode": {"1556", "trackingNumberlat": 14.5776292, "ORDER-001-DEL-ASV" "long": 121.0463673, "trackingUrltags": [], "https://trackmyorder.com/track?id=ORDER-001-DEL-ASV "remarks": "my remarks" } } |
Code Block | ||
---|---|---|
| ||
Status: 200 OK! {, "deliveryDetails": { "successrecipientName": true,"Christian Delivery", "messagecontactNumber": "Post successfully updated." } |
title | 10. Get Provider's Create Post v3 Template |
---|
Status | ||||
---|---|---|---|---|
|
Description
Get provider’s create post template and meta fields schema for createPost v3 API.
For integration only
Endpoint
/v3/getCreatePostTemplate
Method
GET
Code Block | ||
---|---|---|
| ||
{
"Auth-Token": "<Auth token acquired on api LOGIN>"
} |
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
Code Block | ||
---|---|---|
| ||
https://us-central1-fleet-dev-ph.cloudfunctions.net/v3/getCreatePostTemplate?apiKey=7c5dd55738b964944f9357bcc7f45ce6d857ff18&partnerId=SANDBOX_DX |
Code Block | ||
---|---|---|
| ||
status: 200 OK! { "success": true, "result": {09123456789", "emailAddress": "a@email.com", "deliveryDateTime": "2020-09-29T22:06", "deliveryAddress": "Vermont Royale, Antipolo", "deliveryCity": "Antipolo", "province": "Rizal", "requestBodybarangay": { "San Roque", "refNopostalCode": "1870", "pickupDetailsdeclaredValue": {200, "customerName"productSize": "L", "width": 0, "contactNumberheight": ""0, "length": 10, "emailAddressweight": ""0, "codAmount": 250, "lat": 0, 14.5776292, "long": 0, 121.0463673, "tags": [], "itemDescription": "Brand New Phone X", "remarks": "",Please handle with care. Ask the guards for direction.", "barangaymetaFields": "",{} } } |
Sample Response
Code Block | ||
---|---|---|
| ||
Status: 200 OK! { "provincesuccess": ""true, "message": "Job posted on marketplace", "postalCoderesult": "",{ "postId": "3nHfPLXUGWYhlQ5TcNva", "pickupDateTimecustomerName": "Christian Pick up", "contactNumber": "09123456789", "pickupAddressemailAddress": "a@gmail.com", "completionDateTime": 1601384700000, "pickupCitypickupAddress": ""536 Calbayog St. Highway Hills Mandaluyong City", }, "pickupCity": "Mandaluyong City", "deliveryDetailsprovince": {"Metro Manila", "customerName"barangay": "Highway Hills", "postalCode": "1556", "contactNumberlat": "",14.5776292, "long": 121.0463673, "emailAddresstags": "",[ "lat": 0, "-LI4Qgef9HIHhb2AzGzW", "long": 0,"-LK5fMS1u-Qsv-G1tc9l" ], "tagsmetaTags": [],"{\"-LI4Qgef9HIHhb2AzGzW\":{\"colorIndex\":1,\"label\":\"API\"},\"-LK5fMS1u-Qsv-G1tc9l\":{\"colorIndex\":4,\"label\":\"Pick-up\"}}", "storeName": "", "remarksdetails": "", "barangay"remarks": "my remarks", "transactions": [], "provinceattempts": ""{}, "approximateShippingFee": 115, "postalCodebillableShippingFee": ""0, "actualShippingFee": 0, "deliveryDateTimefinalShippingFee": ""0, "metaState": "", "deliveryAddresslastUpdateRemarks": "", "deliveryCity"businessId": "DRINKKA", "itemDescriptionbusinessName": "Drinkka_DEMO", "businessStoreId": null, "itemPricestoreId": 0null, "courierName": "Sandbox_DX", "codAmountcreatedAt": 01601372523479, "productSize"partnerId": "SANDBOX_DX", "length"refNo": 0, "order-001", "widthstatus": 0"ASSIGNED", "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" } ] } } } } |
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
title | 11. Create Post v3 |
---|
Status | ||||
---|---|---|---|---|
|
Description
To create a post based on providers serviceable area.
Endpoint
/v3/createPost
Method
POST
Code Block | ||
---|---|---|
| ||
{
"Auth-Token": "<Auth token acquired on api LOGIN>",
"Content-Type": "application/json"
} |
Code Block | ||
---|---|---|
| ||
{
"apiKey": "<REQUIRED, apiKey will be acquired on login API>",
"partnerId": "<REQUIRED, preferred partner/provider, can be acquired on getPartners API>"
} |
Info |
---|
|
metaFields:
Meta fields are special fields requested by the provider that needs input from the customer.
To be able to determine provider’s meta fields schema, see /getCreatePostTemplate API.
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
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
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
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
Code Block | ||
---|---|---|
| ||
{ "refNo": "order-001", "pickupDetails": {"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": {} } } |
Error Messages:
Invalid Request Parameter
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "success": false, "message": "Invalid Request Parameter. Check your dashboard documentation", "result": { "pickupDetails": { "customerName": "Required field.", "contactNumber": "Required field.", "province": "Required field.", "pickupDateTime": "Invalid data type. Must be in string", "pickupAddress": "Required field.", "pickupCity": "Required field." }, "deliveryDetails": { "customerName": "Required field.", "contactNumber": "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", "senderNamemetaFields": "Christian Pick up",{ "contactNumbershipment": "09123456789", Required field." } } } } Status: 400 Bad Request { "success": false, "emailAddressmessage": "a@gmail.com", Invalid Request Parameter. Check your dashboard documentation", "pickupDateTimeresult": "2020-09-29T21:05",{ "pickupAddresspickupDetails": "536{ Calbayog St. Highway Hills Mandaluyong City", "pickupCitycustomerName": "Mandaluyong CityMaximum length exceeded.", "provincecontactNumber": "MetroInvalid Manilaformat.", "barangayemailAddress": "Highway HillsMaximum length exceeded.", "postalCoderemarks": "1556Maximum length exceeded.", "latbarangay": 14.5776292"Maximum length exceeded.", "long": 121.0463673, "province": "Maximum length exceeded.", "tags": [], "remarkspostalCode": "my remarks" }, Maximum length exceeded.", "deliveryDetails": { "recipientNamepickupAddress": "Christian DeliveryMaximum length exceeded.", "contactNumberpickupCity": "09123456789",Maximum length exceeded." "emailAddress": "a@email.com"}, "deliveryDateTimedeliveryDetails": "2020-09-29T22:06", { "deliveryAddresscustomerName": "VermontMaximum Royale,length Antipoloexceeded.", "deliveryCitycontactNumber": "AntipoloInvalid format.", "provinceemailAddress": "RizalMaximum length exceeded.", "barangayremarks": "San RoqueMaximum length exceeded.", "postalCodebarangay": "1870Maximum length exceeded.", "declaredValue": 200,province": "Maximum length exceeded.", "productSizepostalCode": "LMaximum length exceeded.", "widthdeliveryAddress": 0"Maximum length exceeded.", "heightdeliveryCity": 0, "Maximum length exceeded.", "lengthitemDescription": 10,"Maximum length exceeded." "weight": 0, } "codAmount": 250, } } |
Missing Partner ID
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "latsuccess": 14.5776292false, "longmessage": "Missing 121partnerId.0463673, Please check your dashboard "tags": [], documentation." } |
Invalid Partner ID
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "itemDescriptionsuccess": "Brand New Phone X", false, "remarksmessage": "PleaseInvalid handlepartner with careid. AskEither theit's guardsnot for direction.", "metaFields": {} } } |
existing or you don't have rights to post to the partner."
} |
Invalid business store id
Code Block | ||
---|---|---|
| ||
Status: 400 200Bad OK!Request { "success": truefalse, "message": "Job posted on marketplace", Invalid store ID. Check your storeId. Remove storeId to use default store." } |
Invalid pickup/delivery date and time.
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "resultsuccess": { false, "postIdmessage": "3nHfPLXUGWYhlQ5TcNva", "customerName": "Christian Pick up", Pickup/delivery date and time must be greater than the current time." } Status: 400 Bad Request { "contactNumbersuccess": "09123456789"false, "emailAddressmessage": "a@gmail.com", "completionDateTime": 1601384700000, "pickupAddress": "536 Calbayog St. Highway Hills Mandaluyong City", 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 | ||
---|---|---|
| ||
Status: 400 Bad Request { "pickupCitysuccess": "Mandaluyong City"false, "provincemessage": "Metro Manila", Invalid pickup location." } Status: 400 Bad Request { "barangaysuccess": "Highway Hills"false, "postalCodemessage": "1556", Invalid delivery location." } |
Not Serviceable
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "latsuccess": 14.5776292false, "longmessage": 121.0463673, "tags": [ "Pickup location is not serviceable by the provider." } Status: 400 Bad Request { "-LI4Qgef9HIHhb2AzGzW", "success": false, "-LK5fMS1u-Qsv-G1tc9l" ], "message": "Delivery location is not serviceable by the provider." } Status: 400 Bad Request { "metaTagssuccess": "{\"-LI4Qgef9HIHhb2AzGzW\":{\"colorIndex\":1,\"label\":\"API\"},\"-LK5fMS1u-Qsv-G1tc9l\":{\"colorIndex\":4,\"label\":\"Pick-up\"}}", false, "storeNamemessage": "",Pickup and delivery location is not serviceable by the "details": "", provider." } |
Product
Code Block |
---|
Status: 400 Bad Request { "remarkssuccess": "my remarks"false, "transactionsmessage": [],"Product size not available for the designated service "attemptsarea.": {}, } |
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Update Post Status
|
Code Block | ||
---|---|---|
| ||
{ "approximateShippingFee"Auth-Token": "<Auth 115,token acquired on api LOGIN>", "billableShippingFeeContent-Type": 0, "actualShippingFeeapplication/json": 0, } |
URL Query parameters
Code Block | ||
---|---|---|
| ||
{ "finalShippingFeeapiKey": 0,"<apiKey will be acquired on login "metaStateAPI>": "", } |
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 | ||
---|---|---|
| ||
{ "lastUpdateRemarkspostId": "uuNzkYoOy1VI373BoKY9", "businessIdstatus": "DRINKKASTART_DELIVERY", "businessNameremarks": "Drinkka_DEMORider is on his way", "businessStoreIdtimeStamp": null1575890011178, "storeIdmetaState": null, "courierName": "Sandbox_DX", "createdAt": 1601372523479, "partnerId": "SANDBOX_DX", "" } |
Sample Response
Code Block | ||
---|---|---|
| ||
Status: 200 OK!
{
"success": true,
"message": "Post successfully updated."
} |
Status Updates:
Status | Description |
| Order is for pickup |
| Order is out for delivery |
| Order has been delivered |
| Failed to pickup order |
| Failed to deliver order |
| Failed to return order |
| Cancel order |
| Order is out for return |
| Order has been returned to sender |
| Push an event update on job history without updating the status of the post. Please use the remarks field. |
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Post
|
Code Block | ||
---|---|---|
| ||
{ "refNoAuth-Token": "order-001",<Auth token acquired on api "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": {} } } |
Error Messages:
Invalid Request Parameter
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "success": false, "message": "Invalid Request Parameter. Check your dashboard documentation", "result": {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:
Defaults to opportunity if empty or undefined. |
status | no | filter by status. set to |
Sample URL Parameters
Code Block | ||
---|---|---|
| ||
{
"apiKey": "fb77c9653bf5e736d191b46bbfed7c2bd",
"postId": "uuNzkYoOy1VI373BoKY9",
"partnerId": "SANDBOX_DX"
} |
Sample Response:
Code Block | ||
---|---|---|
| ||
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, "long": 121.0463673, "tags": [ "-LI4Qgef9HIHhb2AzGzW", "-LK5fMS1u-Qsv-G1tc9l" ], "metaTags": "{\"-LI4Qgef9HIHhb2AzGzW\":{\"colorIndex\":1,\"label\":\"API\"},\"-LK5fMS1u-Qsv-G1tc9l\":{\"colorIndex\":4,\"label\":\"Pick-up\"}}", "pickupDetailsstoreName": {"", "customerNameremarks": "Requiredmy field.remarks", "contactNumberbusinessId": "Required field.SANDBOX_DEV", "provincebusinessName": "Required field.Sandbox_Dev", "pickupDateTimebusinessStoreId": "Invalid data type. Must be in string"null, "pickupAddressstoreId": "Required field."null, "pickupCitycourierName": "Required field." Sandbox_DX", }, "deliveryDetailscreatedAt": {1583381948826, "customerNamepartnerId": "Required field.SANDBOX_DX", "contactNumberrefNo": "Required field.order-001", "provincestatus": "Required field.ASSIGNED", "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.""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\\\"}}\"}", "metaFields": {} }, ] } } Status: 400 Bad Request } |
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get Partner Metafields
|
Code Block | ||
---|---|---|
| ||
{ "successContent-Type": false,"application/json" "messageAuth-Token": "Invalid<Auth Requesttoken Parameter.acquired Checkon yourapi dashboard documentationLOGIN>", "result": } |
Query parameters (URL):
Code Block | ||
---|---|---|
| ||
{ "pickupDetailsapiKey": {"<apiKey will be acquired on login API>", "customerNamepartnerId": "Maximum length exceeded."<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 | ||
---|---|---|
| ||
Status: 200 OK! { "contactNumbersuccess": true, "Invalid format.", "result": { "emailAddressgoods": "Maximum length exceeded.",{ "remarksactive": "Maximum length exceeded.",true "barangay": "Maximum length exceeded.",} } } |
Sample Response for empty partnerId
Code Block | ||
---|---|---|
| ||
Status: 200 OK! { "provincesuccess": "Maximumtrue, length exceeded.", "result": { "postalCodeSANDBOX_BA": "Maximum length exceeded.",{ "pickupAddressgoods": "Maximum{ length exceeded.", "pickupCityactive": "Maximumtrue length exceeded." }, } "deliveryDetails": { }, "customerNameSANDBOX_PROVIDER": "Maximum length exceeded.", {}, "contactNumberSANDBOX_QA": "Invalid format.", { "emailAddresscod": { "Maximum length exceeded.", "remarksrequired": true, "Maximum length exceeded.", "barangayactive": true, "Maximum length exceeded.", "provincekey": "Maximumcod", length exceeded.", "postalCodefieldType": "string"Maximum, length exceeded.", "deliveryAddressplaceholder": "Maximum length exceeded.",COD" "deliveryCity": "Maximum length exceeded."}, "itemDescriptionname": "Maximum{ length exceeded." } } } |
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "fieldType": "string", "success": false, "messageplaceholder": "Missing partnerId. Please check your dashboard documentation." } |
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request {"Name", "successrequired": false, "message": "Invalid partner id. Either it's not existing or you don't have rights to post to the partner." } |
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "active": true, "key": "name" "success": false}, "message": "Invalid store ID. Check your storeId. Remove storeId to use default store." } |
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "insurance": { "successrequired": falsetrue, "message": "Pickup/delivery date and time must be greater than the current time." } Status: 400 Bad Request { "active": true, "successkey": false"insurance", "message "fieldType": "Delivery date and time must be greater than the pickup time." } |
Code Block |
---|
{
"success": false,
"message": "Pickup/delivery latitude and longitude is required for on demand providers."
} |
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request {string", "placeholder": "Insurance" "success": false}, "message "vehicleType": "Invalid pickup location." } Status: 400 Bad Request {{ "successoptions": [ false, "message": "Invalid delivery location." } |
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "success": false,{ "message": "Pickup location is not serviceable by the provider." } Status: 400 Bad Request { "successvalue": false,"car", "message": "Delivery location is not serviceable by the provider." } Status: 400 Bad Request { "label": "Car" "success": false, "message": "Pickup and delivery}, location is not serviceable by the provider." } |
Code Block |
---|
Status: 400 Bad Request { "success": false, { "message": "Product size not available for the designated service area." } |
title | 12. Get Quotation |
---|
Status | ||||
---|---|---|---|---|
|
Description
To determine provider’s product rates based on location.
Endpoint
/getQuotation
Method
POST
Info |
---|
Price quotation not available on partners with “on demand” service type. |
Code Block | ||
---|---|---|
| ||
{ "Auth-Tokenvalue": "<Auth token acquired on api LOGIN>",motorcycle", "Content-Typelabel": "application/json" } |
Request Params
Code Block | ||
---|---|---|
| ||
{Motorcycle" } ], "apiKeyrequired": "<apiKey will be acquired on login API>", false, "partnerIdactive": "<provider’s idtrue, can be acquired on getPartners API >" } |
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
Code Block | ||
---|---|---|
| ||
{ "pickup": { "province": "metro manila", "city": "pasig city", "barangay "key": "pinagbuhatanvehicleType" }, "delivery": { "province, "placeholder": "rizalVehicle Type", "city": "cainta", "barangay": "san andres" } } |
Sample Response (Serviceable area)
Code Block | ||
---|---|---|
| ||
Status: 200 OK! { "successfieldType": true,"dropdown" "result":} { } "destinations": [ } } |
Sample Response with invalid partnerId
Code Block |
---|
Status: 400 Bad Request { "REGION 4-A""success": false, "message": "Invalid partner id. Neither it's not existing or "NCR" ], you don't have rights to post to the partner." } |
Sample Response with no partner:
Code Block |
---|
Status: 400 Bad Request { "estimatedPickupDayssuccess": 3false, "estimatedDeliveryDaysmessage": 6,"No preferred partners yet. Please invite a partner in "products": [ Deliveries PH - My Partners" } |
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Update Fee
|
Code Block |
---|
{ "Auth-Token": "<Auth token acquired on api LOGIN>", "sizeContent-Type": "Lapplication/json", } |
Query parameters (URL)
Code Block | ||
---|---|---|
| ||
{ "price"apiKey": 165,"<apiKey will be acquired on "description": "12 x 18 x 2", "name": "Large Pouch", "length": 12, "width": 18, "height": 2, "weight": 3 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:
|
Info |
---|
|
Sample Request Body
Code Block | ||
---|---|---|
| ||
{ "postId": "Wq9FPWxCYVxNgrPrn08D", "remarks": "Shipping fee from upon booking.", "fees": [ }, { "sizevalue": "XL"100, "pricetype": 310, "shipping" "description": "18 x 12 x 9"}, { "namevalue": "Box"20, "lengthtype": 18,"insurance" } ] } |
Sample Response
Code Block | ||
---|---|---|
| ||
status: 200 OK! { "widthsuccess": 12 true, "result": "Post successfully updated." } |
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Update Meta Fields v2
|
Code Block |
---|
{ "height"Auth-Token": 9,"<Auth token acquired on api LOGIN>", "Content-Type": "application/json" } |
Query parameters (URL)
Code Block |
---|
{ "weightapiKey": 6"<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 |
---|
|
Sample Request Body
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "successpostId": false"uuNzkYoOy1VI373BoKY9", "resultpickup": "Pickup/delivery location is not serviceable by the selected provider." } |
Error Messages:
Missing Partner Id
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request {{ "trackingNumber": "ORDER-001-PIC-ASV", "successtrackingUrl": false, "message": "Missing partnerId. Please check your dashboard documentation." } |
Invalid Partner Id
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request { "success": false,"https://trackmyorder.com/track?id=ORDER-001-PIC-ASV" }, "delivery": { "messagetrackingNumber": "Invalid partner id. Either it's not existing or you don't have rights to post to the partner." } |
ORDER-001-DEL-ASV",
"trackingUrl": "https://trackmyorder.com/track?id=ORDER-001-DEL-ASV"
}
} |
Sample Response
Code Block | ||
---|---|---|
| ||
Status: 400 Bad Request200 OK! { "success": falsetrue, "message": "PricePost quotation is not yet available for on demand providerssuccessfully updated." } |
Responses (Success and Errors)
...