Request example:
POST https://ulc.apidev.pingdelivery.com/v1/orders

When creating an order you should pass "Authorization:" header.

Post data:

{
   "data":{
      "country":"MX",
      "client_num":"10000",
      "creation_date":"2017-01-10",
      "sender":{
         "company":"testCompany",
         "URL":"pingdelivery.com"
      },
      "recipient":{
         "person":"mr President",
         "phone":"52123456789",
         "country":"MX",
         "zipcode":"111111",
         "region":"Mexico DF",
         "city":"Mexico",
         "neighborhood":"Olola",
         "street":"Santa cruz",
         "house":"4",
         "apartment":"103",
         "lat":"19.329387",
         "lng":"-99.147690",
         "comment":"some comment",
         "fullAddress":"full address information Mexico DF, Mexico, Olola, Santa cruz 4, 103",
         "delivery_date":"2017-01-11",
         "time_min":"09:00",
         "time_max":"12:00"
      },
      "items":[
         {
            "article":"1",
            "quantity":1,
            "text":"some item"
         }
      ],
      "paytype":"CASH",
      "price":"1000",
      "assessed":"1000",
      "comment":"try to sale more"
   }
}

Response example:

{
   "_id":"58a2d1b95a1f20294155e794",
   "country":"MX",
   "number":"MX101189-DEV",
   "sender":{
      "company":"testCompany",
      "URL":"pingdelivery.com"
   }   ......
}

You need to save "number" field and use it for track.

Necessary and unnecessary fields

Here is an example for minimal order creation info (e.g from landing or smthn like that)

{
    "data": {
            "country": "MX",
            "client_num": "here you can provide id, or just time()_postfix stamp",
            "creation_date": "2017-01-10",
            "sender": {
                "company": "testCompany",
                "URL": "pingdelivery.com"
            },
            "recipient": {
                "person": "Full name",
                "phone": "52123456789",
                "country": "MX",
                "zipcode": "",
                "region": "",
                "city": "Landing city",
                "neighborhood": "",
                "street": "Landing street",
                "house": "",
                "apartment": "",
                "lat": "",
                "lng": "",
                "comment": "",
                "fullAddress": "Landing city, landing street",
                "delivery_date": "current date",
                "time_min": "09:00",
                "time_max": "12:00"
            },
            "items": [
                {
                    "article":"1",
                    "quantity":1,
                    "text":"some item"
                }
            ],
            "paytype": "CASH",
            "price": "price from landing",
            "assessed": "price from landing",
            "comment": ""
    }       
}

Pickups and deliveries

If your company has a case when you need to consider stock pickups from different places, you can send them straightly, the request will look like this

{
    "data": {
            "country": "TT",
            "client_num": "1000000075",
            "creation_date": "2018-03-10",
            "sender": {
                "company": "testCompany",
                "URL": "pingdelivery.com"
            },
            "recipient": {
                "person": "Full name",
                "phone": "52123456789",
                "country": "TT",
                "zipcode": "",
                "region": "",
                "city": "Landing city",
                "neighborhood": "",
                "street": "Landing street",
                "house": "",
                "apartment": "",
                "lat": "",
                "lng": "",
                "comment": "",
                "fullAddress": "Landing city, landing street",
                "delivery_date": "2018-03-31",
                "time_min": "09:00",
                "time_max": "12:00"
            },
            "items": [
                {
                    "article":"1",
                    "quantity":1,
                    "text":"Goji berry"
                }
            ],
            "pickups" : [
                 {
                     "fullAddress" : "fulll adresssss",
                     "phone" : "7999999999",
                     "items" : [
                         {
                             "article":"0",
                             "text":"text",
                             "quantity":1
                         }
                         ]
                 }
             ],
            "paytype": "CASH",
            "price": "1000",
            "assessed": "1000",
            "comment": "1111"
    }       
}

In 'pickups' section you should provide information about pickup point address, phone of the warehouse personal or someone on that point, and items list. In return you ll get order number with D postfix, also, you will need to use pickup numbers, to track your pickups, they will look like the same track number bit with P%pickup number% instead of D. E.g MX100_D and MX100_P0.

You can provide additional data for your items, such as per-item-comment or price for an item, like this

{
    "data": {
            "country": "TT",
            "client_num": "1000000075",
            "creation_date": "2018-03-10",
            "sender": {
                "company": "testCompany",
                "URL": "pingdelivery.com"
            },
            "recipient": {
                "person": "Full name",
                "phone": "52123456789",
                "country": "TT",
                "zipcode": "",
                "region": "",
                "city": "Landing city",
                "neighborhood": "",
                "street": "Landing street",
                "house": "",
                "apartment": "",
                "lat": "",
                "lng": "",
                "comment": "",
                "fullAddress": "Landing city, landing street",
                "delivery_date": "2018-03-31",
                "time_min": "09:00",
                "time_max": "12:00"
            },
            "items": [
                {
                    "article":"1",
                    "quantity":1,
                    "text":"Goji berry",
                    "price":1000,
                    "comment":"item comment"
                }
            ],
            "pickups" : [
                 {
                     "fullAddress" : "fulll adresssss",
                     "phone" : "7999999999",
                     "items" : [
                         {
                             "article":"0",
                             "text":"text",
                             "quantity":1
                         }
                         ]
                 }
             ],
            "paytype": "CASH",
            "price": "1000",
            "assessed": "1000",
            "comment": "1111"
    }       
}

results matching ""

    No results matching ""