Pathover

The Pathover Developer Hub

Welcome to the Pathover Developer Hub. You'll find comprehensive guides and documentation to help you start working with the Pathover API as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Documentation
 

Welcome to the documentation for the Pathover API!

You can use the API to access Pathover API endpoints, which you can use to submit orders; create, read, update, and delete the data related to your store; and create optimized routes.

This documentation includes language bindings in cURL, Python, JavaScript, and PHP. You can view code examples and switch between programming languages in the far right panel.

Suggest Edits

Requirements

 

The API follows RESTful principles and make use of standard HTTP methods such as GET and POST. To access the Pathover API, please make sure you satisfy the following requirements:

  • You must access the API over HTTPS protocol.

  • POST data may be encoded as either application/json or application/x-www-form-urlencoded. If you choose application/x-www-form-urlencoded, please remember to STRINGIFY your fields!

  • The base URL for the Pathover API is: https://api.pathover.com/v2

  • Be sure to specify the API version in the endpoints. The current version is /v2.

  • You will need to send Pathover a web-hook in order to get real-time updates from the API. (coming soon)

Suggest Edits

Authentication

 

Access to the Pathover API is through API key. Once you've created a Pathover account, you can generate an API key from the API Integration page.

Include the API key in the header of all API requests to the server. We use Bearer Authentication.

The authorization header takes on this form:

Authorization: "bearer API_TOKEN"

You must replace the text API_TOKEN with your own API key.

Suggest Edits

Dates and Datetimes

 

All DateTimes from the Pathover API are in UTC format (example: 2016/11/18 00:18:12). You may want to convert to your local time before further use.

We use the current date time format:
"YYYY-MM-DD HH:mm:ss"

Example: "2017-01-01 12:00:00"

Again, all date times will be in UTC time.

Only the "batchTimes" in the Locations API is in the local timezone corresponding to the address of the location.

Suggest Edits

Error Handling

 

All errors returned will be in a simple string format. They will not be in JSON.

Status Codes: [400, 401, 500]
will return errors and the body of the response is just a string. It is NOT JSON.

Suggest Edits

/test

Submit a request to this endpoint to see if your API key is valid and working!

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.pathover.com/v2/test
curl -X GET https://api.pathover.com/v2/test \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5"
EOF
# Python

import requests # import third-party library "requests" package
import json # used for stringifying dict

API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5"

# request headers
headers = {
  "Content-Type": "application/x-www-form-urlencoded",
  "Authorization": "bearer " + API_TOKEN # put api token here
}

# make post request, the response get stored into result variable
result = requests.get("https://api.pathover.com/v2/test", headers=headers)

# get result
result.text
// JavaScript

var request = require('request'); // require third-party library "request" node module
var API_TOKEN = 'PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5';

// make post request
request.get({
  url: 'https://api.pathover.com/v2/test',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'bearer ' + API_TOKEN //put api token here
  }
}, function(err, res, body) {
	// handle error
  if (err) { 
    throw err;
  }
  
  // response info
  console.log(res.statusCode); // statusCode
  console.log(res.body); // the body of the response
});
<?php

// IMPORTANT! In order for DECIMAL/FLOAT types to work, you must put 4.0 (with decimal point and trailing zero). It will not work if you just put 4 (without the decimal point and zero at the end)

// url
$URL = 'https://api.pathover.com/api/v2/test';

// api key
$API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5";

// set up curl
$curl = curl_init();

// make curl request
curl_setopt_array($curl, array(
  CURLOPT_URL => $URL, // url
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_SSL_VERIFYPEER => false,
  CURLOPT_SSL_VERIFYHOST => false,
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "Authorization: bearer " . $API_TOKEN,
    "content-type: application/x-www-form-urlencoded"
  )
));

$response = curl_exec($curl);
$err = curl_error($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

//close connection
curl_close($curl);

?>
A binary file was returned

You couldn't be authenticated

Success!

Headers

Content-Type
string
required

application/x-www-form-urlencoded or application/json. If you choose application/x-www-form-urlencoded, please remember to stringify your fields!

Authorization
string
required

bearer <API_TOKEN>

 

Make the following request to see if you have a valid API key.

Suggest Edits

Statuses

The statuses of MasterOrders and Packages

 

MasterOrder Statuses

A MasterOrder object has many Package objects.

id
name

1

New

This is a new order

2

Processing

The order is being processed

3

Complete

The order has been delivered or picked up by customer.

4

Canceled

The order is canceled and/or refunded if using a third party plugin such as Shopify or WooCommerce.

Package Statuses

A Package object belongs to one MasterOrder object.

id
name

9

New

This is a new order.

10

Processing

This order is being processed.

11

Ready

The order has finished processing

12

Shipped

The order has been shipped. (Only for "shipping" delivery type)

13

In Transit

The order has been picked up by the driver and is on the way to the customer.

14

Complete

The order has been delivered to customer or picked up by customer

15

Canceled

The order is canceled and/or refunded if using a third party plugin such as Shopify or WooCommerce.

Suggest Edits

/locations/create

Creates a new store location.

 
posthttps://api.pathover.com/v2/locations/create
curl -X POST https://api.pathover.com/v2/locations/create \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5" \
  -d @- << EOF
  {
    "active": true,
    "name": 'Grand Market',
    "email": 'gmarket@email.com',
    "phone": '+1234567890',
    "address": "{
      'address1': '444 North Wolfe Road',
      'address2': 'APT 200',
      'city': 'Sunnyvale',
      'state': 'CA',
      'postalCode': '94085',
      'countryCode': 'US'
    }",
    "pickUpOptionName": 'Pick Up At Grand Market',
    "scheduledOn": true,
    "shippingOn": true,
    "rushOn": true,
    "pickUpOn": true,
    "maintainsInventory": true,
    "stockWarningThreshold": 10,
    "batchTimes": [{
        'time': '15:00:00',
        'day': 'monday'
      }, {
        'time': '00:00:00',
        'day': 'tuesday'
      }],
    "deliveryWindowRange": 240,
    "deliveryWindowLeadTime": 60,
    "numWorkers": 10,
    "packagesPerHour": 20,
    "resourceRoutingRadiusLocalDelivery": 10000,
    "resourceRoutingRadiusLocalShipping": 20000000,
    "pickUpWaitTimeDefault": 60,
    "pickUpWaitTime": 45,
    "rushWaitTimeDefault": 60,
    "rushWaitTime": 45,
    "rushLeadTime": 15,
    "sortPickingListBy": 'Category',
    "driverPickUpInstructions": 'Go to front cashier to pick up packages.',
    "customerPickUpInstructions": 'Go to pick up area with your ID to pick up package'
  }
EOF
# Python

import requests # import third-party library "requests" package
import json # used for stringifying dict

API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5"

# request headers
headers = {
  "Content-Type": "application/x-www-form-urlencoded",
  "Authorization": "bearer " + API_TOKEN # put api token here
}

# request body payload
data = {
  "active": True,
  "name": "Grand Market",
  "email": "gmarket@email.com",
  "phone": "+1234567890",
  
  # address of the store
  "address": json.dumps({
    "address1": "440 North Wolfe Road",
    "address2": "APT 200",
    "city": "Sunnyvale",
    "state": "CA",
    "postalCode": "94085",
    "countryCode": "US"
  }),
  "pickUpOptionName": "Pick Up At Grand Market",
  "scheduledOn": True,
  "shippingOn": True,
  "rushOn": True,
  "pickUpOn": True,
  "maintainsInventory": True,
  "stockWarningThreshold": 10,
  
  # the scheduled delivery times
  "batchTimes": json.dumps([{
    "time": "15:00:00", # must match the store location's timezone
    "day": "thursday" # monday, tuesday, wednesday, thursday, friday, saturday, sunday
  }, {
    "time": "00:00:00", # must match the store location's timezone
    "day": "monday" # monday, tuesday, wednesday, thursday, friday, saturday, sunday
  }]),
  
  "deliveryWindowRange": 240,
  "deliveryWindowLeadTime": 60,
  "numWorkers": 10,
  "packagesPerHour": 20,
  "resourceRoutingRadiusLocalDelivery": 10000,
  "resourceRoutingRadiusLocalShipping": 20000000,
  "pickUpWaitTimeDefault": 60,
  "pickUpWaitTime": 45,
  "rushWaitTimeDefault": 60,
  "rushWaitTime": 45,
  "rushLeadTime": 15,
  "sortPickingListBy": "Category",
  "driverPickUpInstructions": "Go to front cashier to pick up packages.",
  "customerPickUpInstructions": "Go to pick up area with your ID to pick up package"
}

# make post request, the response get stored into result variable
result = requests.post("https://api.pathover.com/v2/locations/create", headers=headers, data=data)

# get result
result.text
// JavaScript

var request = require('request'); // require third-party library "request" node module
var API_TOKEN = 'PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5';

// make post request
request.post({
  url: 'https://api.pathover.com/v2/locations/create',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'bearer ' + API_TOKEN //put api token here
  }
  
  // post data goes here, remember to STRINGIFY any objects!
  form: {
    active: true,
    name: 'Grand Market',
    email: 'gmarket@email.com',
    phone: '+1234567890',
    address: JSON.stringify({
      address1: '440 North Wolfe Road',
      address2: 'APT 200',
      city: 'Sunnyvale',
      state: 'CA',
      postalCode: '94085',
      countryCode: 'US'
    }),
    pickUpOptionName: 'Pick Up At Grand Market',
    scheduledOn: true,
    shippingOn: true,
    rushOn: true,
    pickUpOn: true,
    maintainsInventory: true,
    stockWarningThreshold: 10,
    
    // the scheduled delivery times
    batchTimes: JSON.stringify([{
      time: '15:00:00', // must match the store location's timezone
      day: 'thursday' // monday, tuesday, wednesday, thursday, friday, saturday, sunday
    }, {
      time: '00:00:00', // must match the store location's timezone
      day: 'monday' // monday, tuesday, wednesday, thursday, friday, saturday, sunday
    }]),
             
    deliveryWindowRange: 240,
    deliveryWindowLeadTime: 60,
    numWorkers: 10,
    packagesPerHour: 20,
    resourceRoutingRadiusLocalDelivery: 10000,
    resourceRoutingRadiusLocalShipping: 20000000,
    pickUpWaitTimeDefault: 60,
    pickUpWaitTime: 45,
    rushWaitTimeDefault: 60,
    rushWaitTime: 45,
    rushLeadTime: 15,
    sortPickingListBy: 'Category',
    driverPickUpInstructions: 'Go to front cashier to pick up packages.',
    customerPickUpInstructions: 'Go to pick up area with your ID to pick up package'
  }
}, function(err, res, body) {
	// handle error
  if (err) { 
    throw err;
  }
  
  // response info
  console.log(res.statusCode); // statusCode
  console.log(res.body); // the body of the response
});
<?php

// IMPORTANT! In order for DECIMAL/FLOAT types to work, you must put 4.0 (with decimal point and trailing zero). It will not work if you just put 4 (without the decimal point and zero at the end)

// url
$URL = 'https://api.pathover.com/api/v2/locations/create';

// api key
$API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5";

$active = true;
$name = "Grand Market";
$email = "gmarket@email.com";
$phone = "+1234567890";

// customer shipping address
$address = array(
  "address1" => "440 N Wolfe Rd",
  "address2" => "",
  "city" => "Sunnyvale",
  "state" => "CA",
  "postalCode" => "94085",
  "countryCode" => "US"
);

$pickUpOptionName = "Pick Up At Grand Market";
$scheduledOn = true;
$shippingOn = true;
$rushO =: true;
$pickUpOn = true;
$maintainsInventory = true;
$stockWarningThreshold = 10;

// the scheduled delivery times
$batchTime = array(
  array(
    "time" => "15:00:00", // must match the store location's timezone
    "day" => "thursday" // monday, tuesday, wednesday, thursday, friday, saturday, sunday
  }, {
    "time" => '00:00:00', // must match the store location's timezone
    "day" => 'monday' // monday, tuesday, wednesday, thursday, friday, saturday, sunday
  })
);

$deliveryWindowRange = 240;
$deliveryWindowLeadTime = 60;
$numWorkers = 10;
$packagesPerHour = 20;
$resourceRoutingRadiusLocalDelivery = 10000;
$resourceRoutingRadiusLocalShipping = 20000000;
$pickUpWaitTimeDefault = 60;
$pickUpWaitTime = 45;
$rushWaitTimeDefault = 60;
$rushWaitTime = 45;
$rushLeadTime = 15;
$sortPickingListBy = "Category";
$driverPickUpInstructions = "Go to front cashier to pick up packages.";
$customerPickUpInstructions = "Go to pick up area with your ID to pick up package";

// set up curl
$curl = curl_init();

// make curl request
curl_setopt_array($curl, array(
  CURLOPT_URL => $URL, // url
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_SSL_VERIFYPEER => false,
  CURLOPT_SSL_VERIFYHOST => false,
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",

  // YOU HAVE TO PASS IN A STRING!!!
  CURLOPT_POSTFIELDS => "active=" . $active . "&name=" . $name . "&email=" . $email . "&phone=" . $phone . "&address=" . json_encode($address) . "&pickUpOptionName=" . $pickUpOptionName . "&scheduledOn=" . $scheduledOn . "&shippingOn=" . $shippingOn . "&rushOn=" . $rushOn . "&pickUpOn=" . $pickUpOn . "&maintainsInventory=" . $maintainsInventory . "&stockWarningThreshold=" . $stockWarningThreshold . "&batchTimes=" . json_encode($batchTimes) . "&deliveryWindowRange=" . $deliveryWindowRange . "&deliveryWindowLeadTime=" . $deliveryWindowLeadTime . "&numWorkers=" . $numWorkers . "&packagesPerHour=" . $packagesPerHour . "&resourceRoutingRadiusLocalDelivery=" . $resourceRoutingRadiusLocalDelivery . "&resourceRoutingRadiusLocalShipping=" . $resourceRoutingRadiusLocalShipping . "&pickUpWaitTimeDefault=" . $pickUpWaitTimeDefault . "&pickUpWaitTime=" . $pickUpWaitTime . "&rushWaitTimeDefault=" . $rushWaitTimeDefault . "&rushWaitTime=" . $rushWaitTime . "&rushLeadTime=" . $rushLeadTime . "&sortPickingListBy=" . $sortPickingListBy . "&driverPickUpInstructions=" . $driverPickUpInstructions . "&customerPickUpInstructions=" . $customerPickUpInstructions,
  CURLOPT_HTTPHEADER => array(
    "Authorization: bearer " . $API_TOKEN,
    "content-type: application/x-www-form-urlencoded"
  )
));

$response = curl_exec($curl);
$err = curl_error($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

//close connection
curl_close($curl);

?>
A binary file was returned

You couldn't be authenticated

{
  "message": "Location created.",
  "success": true,
  "location": {
    "id": 1,
    "doNotCallRushDriverIfAssignedCourierIdOrDriverId": false,
    "active": true,
    "noMoreCapacity": false,
    "noMoreCapacityStartTime": null,
    "noMoreCapacityTimeLimit": null,
    "name": "Pathover Market",
    "email": "bobwu@gmail.com",
    "phone": "+12496244953",
    "address": {
      "city": "CUPERTINO",
      "state": "CA",
      "address1": "11983 N WOLFE RD",
      "postalCode": "95014-0619",
      "countryCode": "US"
    },
    "geocode": {
      "lat": 37.3366394,
      "lng": -122.0154607
    },
    "pickUpOptionName": "Pick Up",
    "scheduledOn": true,
    "shippingOn": true,
    "rushOn": true,
    "pickUpOn": true,
    "maintainsInventory": false,
    "stockWarningThreshold": null,
    "batchTimes": [
      {
        "day": "sunday",
        "time": "18:45:00"
      },
      {
        "day": "friday",
        "time": "23:00:00"
      }
    ],
    "batchCreationDaysAhead": 7,
    "nextBatchTimes": null,
    "nextBatchTimesEffectiveDate": null,
    "prevBatchTimes": null,
    "batchTimesDatesUnavailable": null,
    "canEditBatchTimes": true,
    "deliveryWindowRange": 120,
    "deliveryWindowLeadTime": 60,
    "storeHours": [
      {
        "day": "monday",
        "open": "00:00:00",
        "duration": 720
      },
      {
        "day": "tuesday",
        "open": "10:00:00",
        "duration": 1020
      }
    ],
    "canEditStoreHours": true,
    "pickUpHours": [
      {
        "day": "monday",
        "open": "00:00:00",
        "duration": 720
      }
    ],
    "canEditPickUpHours": true,
    "numWorkers": 1,
    "packagesPerHour": 10,
    "resourceRoutingRadiusLocalDelivery": 1000,
    "resourceRoutingRadiusShipping": 5000,
    "dropOffTimeSecs": 20,
    "notificationSound": true,
    "pickUpWaitTimeDefault": null,
    "pickUpWaitTime": 60,
    "rushWaitTimeDefault": 60,
    "rushWaitTime": 60,
    "rushLeadTime": 15,
    "sortPickingListBy": "Aisle / Bin",
    "driverPickUpInstructions": "Pick up packages at back room 1",
    "customerPickUpInstructions": null,
    "createdAt": "2017-04-08T06:54:13.091Z",
    "updatedAt": "2017-04-08T06:57:27.912Z",
    "merchantId": 1,
    "timezoneId": 147,
    "assignedCourierId": 1,
    "assignedDriverId": null,
    "merchant": {
      "id": 1,
      "storeFrontUrl": null,
      "storeFrontActive": false,
      "billingCycle": "monthly",
      "billingMinimum": "0.00",
      "lastBillingDate": "2017-04-08T06:54:05.307Z",
      "scheduledRate": "0.75",
      "shippingRate": "0.75",
      "rushRate": "0.75",
      "pickUpRate": "0.75",
      "canceledRate": "0.75",
      "maxDistanceForLocalDelivery": 32200,
      "maxDistanceForShipping": 4828032,
      "maxDistanceForMultiplePickUp": 8050,
      "alwaysChooseClosestLocation": false,
      "neverSplitOrderDuringResourceRouting": false,
      "addUnknownProductsFromSubmitOrder": true,
      "maxNumSplitLocations": 3,
      "maxNumHoursInDeliveryWindow": null,
      "webhookUrl": null,
      "testWebhookUrl": null,
      "createdAt": "2017-04-08T06:54:10.039Z",
      "updatedAt": "2017-04-08T06:54:10.043Z",
      "companyId": 2,
      "defaultLocationId": null,
      "company": {
        "id": 2,
        "name": "Merchant Company 1",
        "email": "merchant2@email.com",
        "phone": "+12406206953",
        "active": true,
        "approved": "yes",
        "companyType": "merchant",
        "stripeCustomerId": null,
        "logoUrl": null,
        "rushOptionName": null,
        "shippingOptionName": null,
        "createdAt": "2017-04-08T06:54:09.965Z",
        "updatedAt": "2017-04-08T06:54:09.988Z",
        "courierId": null,
        "merchantId": 1
      }
    },
    "timezone": {
      "id": 147,
      "name": "America/Los_Angeles",
      "abbr": "PDT",
      "utcOffset": 420,
      "createdAt": "2017-04-08T06:54:09.213Z",
      "updatedAt": "2017-04-10T03:30:02.671Z"
    },
    "assignedCourier": {
      "id": 1,
      "paymentCycle": "monthly",
      "paymentMinimum": "0.00",
      "lastPaymentDate": "2017-04-08T06:54:05.305Z",
      "numDrivers": 5,
      "numDriversOccupied": 0,
      "vehicles": null,
      "zones": [
        "95014",
        "94040",
        "95035",
        "95131",
        "75006",
        "75023"
      ],
      "canEditZones": true,
      "pricing": [
        {
          "type": "per package",
          "model": [
            {
              "price": 20
            }
          ]
        }
      ],
      "nextPricing": null,
      "canEditPricing": true,
      "operatingHours": [
        {
          "day": "monday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "tuesday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "wednesday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "thursday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "friday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "saturday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "sunday",
          "open": "00:00:00",
          "duration": 1440
        }
      ],
      "canEditOperatingHours": true,
      "unavailability": [
        {
          "date": "****-12-25"
        },
        {
          "date": "2018-02-14"
        }
      ],
      "canEditUnavailability": true,
      "createdAt": "2017-04-08T06:54:10.011Z",
      "updatedAt": "2017-04-08T06:54:10.015Z",
      "companyId": 4,
      "timezoneId": 583
    },
    "assignedDriver": null
  }
}
Argument validation errors
Access denied.
Internal Server Error

Body Params

active
boolean

Indicates whether the location is active or not.

name
string
required

The name of the store location.

email
string
required

The store's email address.

phone
string
required

The store's phone number.

address
object
address.address1
string
required

The first line of the store's address. Part of the address object.

address.address2
string

The first line of the store's address. Part of the address object.

address.city
string
required

The city the store is located in. Part of the address object.

address.state
string
required

The state the store is located in. Part of the address object.

address.postalCode
string
required

The store's zip code. Part of the address object.

address.countryCode
string
required

The two-character ISO code for the country the store is located in. The only available value at this time is "US", which must be capitalized. Part of the address object.

pickUpOptionName
string

The name of the pick up option in the checkout page in third-party apps such as Shopify, Woocommerce, etc...

scheduledOn
boolean

Indicates whether the store allows scheduled orders.

shippingOn
boolean

Indicates whether the store allows shipping orders.

rushOn
boolean

Indicates whether the store allows rush (on-demand) orders.

pickUpOn
boolean

Indicates whether the store allows pick up orders.

maintainsInventory
boolean

Indicates whether the store maintains inventory.

stockWarningThreshold
int32

When the number of remaining items at this location reaches the value of this parameter, Pathover will notify the merchant. Setting a threshold will override location_inventory if location_inventory "stock_warning_threshold" is null.

batchTimes
object
batchTimes.time
string

What time the customer should place order by. Must be in 'HH:mm:ss' format and must match timezone of the store location

batchTimes.day
string

The day this batch time should be. Must be "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"

deliveryWindowRange
int32

The default span of time during which a delivery may arrive, in minutes. A delivery window of 7-9pm would equal 120 minutes, for example.

deliveryWindowLeadTime
int32

The lead time before the driver is expected to reach the store, in minutes.

numWorkers
int32

The total number of staff members working at this store location.

packagesPerHour
int32

The number of packages the location can process per hour.

resourceRoutingRadiusLocalDelivery
int32

The radius to consider when routing local deliveries, in meters.

resourceRoutingRadiusLocalShipping
int32

The radius to consider when routing shipments, in meters.

pickUpWaitTimeDefault
int32

The default wait time for customer in-store pickup, in minutes. Pathover will automatically reset pickUpWaitTime to this number each day.

pickUpWaitTime
int32

The current wait time for customer in-store pickup, in minutes. You can change the pickUpWaitTime as order volume increases and decreases.

rushWaitTimeDefault
int32

The default amount of time it takes for the customer to receive a rush order, in minutes. Pathover will automatically reset rushWaitTime to this number each day.

rushWaitTime
int32

How long the customer should expect to wait for a rush order to be delivered, in minutes. You can change rushWaitTime as order volume increases and decreases.

rushLeadTime
int32

The lead time before the rush driver is expected to reach the store, in minutes.

sortPickingListBy
string

Specifies how to sort the product list. Value may be "Aisle / Bin", "Category", or "Name".

driverPickUpInstructions
string

Specifies where the driver should pick up the order in the store (e.g., "Pick up at front, talk to cashier etc...").

customerPickUpInstructions
string

Specifies where the customer should pick up the order in the store (e.g., "Pick up at front, talk to cashier etc...").

Headers

Content-Type
string
required

application/x-www-form-urlencoded or application/json. If you choose application/x-www-form-urlencoded, please remember to stringify your fields!

Authorization
string
required

bearer <API_TOKEN>

 
Suggest Edits

/locations/read

Returns the details associated with a specific store location, based on a location ID.

 
posthttps://api.pathover.com/v2/locations/read
curl -X POST https://api.pathover.com/v2/locations/read \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5" \
  -d @- << EOF
  {
    "id": 1,
  }
EOF
# Python

import requests # import third-party library "requests" package
import json # used for stringifying dict

API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5"

# request headers
headers = {
  "Content-Type": "application/x-www-form-urlencoded",
  "Authorization": "bearer " + API_TOKEN # put api token here
}

# request body payload
data = {
  "id": 1, # location id
}

# make post request, the response get stored into result variable
result = requests.post("https://api.pathover.com/v2/locations/read", headers=headers, data=data)

# get result
result.text
// JavaScript

var request = require('request'); // require third-party library "request" node module
var API_TOKEN = 'PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5';

// make post request
request.post({
  url: 'https://api.pathover.com/v2/locations/read',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'bearer ' + API_TOKEN //put api token here
  }
  
  // post data goes here, remember to STRINGIFY any objects!
  form: {
    id: 1, // location id
  }
}, function(err, res, body) {
	// handle error
  if (err) { 
    throw err;
  }
  
  // response info
  console.log(res.statusCode); // statusCode
  console.log(res.body); // the body of the response
});
<?php

// IMPORTANT! In order for DECIMAL/FLOAT types to work, you must put 4.0 (with decimal point and trailing zero). It will not work if you just put 4 (without the decimal point and zero at the end)

// url
$URL = 'https://api.pathover.com/api/v2/locations/read';

// api key
$API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5";

// location id
$id = 1;

// set up curl
$curl = curl_init();

// make curl request
curl_setopt_array($curl, array(
  CURLOPT_URL => $URL, // url
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_SSL_VERIFYPEER => false,
  CURLOPT_SSL_VERIFYHOST => false,
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",

  // YOU HAVE TO PASS IN A STRING!!!
  CURLOPT_POSTFIELDS => "id=" . $id,
  CURLOPT_HTTPHEADER => array(
    "Authorization: bearer " . $API_TOKEN,
    "content-type: application/x-www-form-urlencoded"
  )
));

$response = curl_exec($curl);
$err = curl_error($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

//close connection
curl_close($curl);

?>
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "location": {
    "id": 1,
    "doNotCallRushDriverIfAssignedCourierIdOrDriverId": false,
    "active": true,
    "noMoreCapacity": false,
    "noMoreCapacityStartTime": null,
    "noMoreCapacityTimeLimit": null,
    "name": "Pathover Market",
    "email": "bobwu@gmail.com",
    "phone": "+12496244953",
    "address": {
      "city": "CUPERTINO",
      "state": "CA",
      "address1": "11983 N WOLFE RD",
      "postalCode": "95014-0619",
      "countryCode": "US"
    },
    "geocode": {
      "lat": 37.3366394,
      "lng": -122.0154607
    },
    "pickUpOptionName": "Pick Up",
    "scheduledOn": true,
    "shippingOn": true,
    "rushOn": true,
    "pickUpOn": true,
    "maintainsInventory": false,
    "stockWarningThreshold": null,
    "batchTimes": [
      {
        "day": "sunday",
        "time": "18:45:00"
      },
      {
        "day": "friday",
        "time": "23:00:00"
      }
    ],
    "batchCreationDaysAhead": 7,
    "nextBatchTimes": null,
    "nextBatchTimesEffectiveDate": null,
    "prevBatchTimes": null,
    "batchTimesDatesUnavailable": null,
    "canEditBatchTimes": true,
    "deliveryWindowRange": 120,
    "deliveryWindowLeadTime": 60,
    "storeHours": [
      {
        "day": "monday",
        "open": "00:00:00",
        "duration": 720
      },
      {
        "day": "tuesday",
        "open": "10:00:00",
        "duration": 1020
      }
    ],
    "canEditStoreHours": true,
    "pickUpHours": [
      {
        "day": "monday",
        "open": "00:00:00",
        "duration": 720
      }
    ],
    "canEditPickUpHours": true,
    "numWorkers": 1,
    "packagesPerHour": 10,
    "resourceRoutingRadiusLocalDelivery": 1000,
    "resourceRoutingRadiusShipping": 5000,
    "dropOffTimeSecs": 20,
    "notificationSound": true,
    "pickUpWaitTimeDefault": null,
    "pickUpWaitTime": 60,
    "rushWaitTimeDefault": 60,
    "rushWaitTime": 60,
    "rushLeadTime": 15,
    "sortPickingListBy": "Aisle / Bin",
    "driverPickUpInstructions": "Pick up packages at back room 1",
    "customerPickUpInstructions": null,
    "createdAt": "2017-04-08T06:54:13.091Z",
    "updatedAt": "2017-04-08T06:57:27.912Z",
    "merchantId": 1,
    "timezoneId": 147,
    "assignedCourierId": 1,
    "assignedDriverId": null,
    "merchant": {
      "id": 1,
      "storeFrontUrl": null,
      "storeFrontActive": false,
      "billingCycle": "monthly",
      "billingMinimum": "0.00",
      "lastBillingDate": "2017-04-08T06:54:05.307Z",
      "scheduledRate": "0.75",
      "shippingRate": "0.75",
      "rushRate": "0.75",
      "pickUpRate": "0.75",
      "canceledRate": "0.75",
      "maxDistanceForLocalDelivery": 32200,
      "maxDistanceForShipping": 4828032,
      "maxDistanceForMultiplePickUp": 8050,
      "alwaysChooseClosestLocation": false,
      "neverSplitOrderDuringResourceRouting": false,
      "addUnknownProductsFromSubmitOrder": true,
      "maxNumSplitLocations": 3,
      "maxNumHoursInDeliveryWindow": null,
      "webhookUrl": null,
      "testWebhookUrl": null,
      "createdAt": "2017-04-08T06:54:10.039Z",
      "updatedAt": "2017-04-08T06:54:10.043Z",
      "companyId": 2,
      "defaultLocationId": null,
      "company": {
        "id": 2,
        "name": "Merchant Company 1",
        "email": "merchant2@email.com",
        "phone": "+12406206953",
        "active": true,
        "approved": "yes",
        "companyType": "merchant",
        "stripeCustomerId": null,
        "logoUrl": null,
        "rushOptionName": null,
        "shippingOptionName": null,
        "createdAt": "2017-04-08T06:54:09.965Z",
        "updatedAt": "2017-04-08T06:54:09.988Z",
        "courierId": null,
        "merchantId": 1
      }
    },
    "timezone": {
      "id": 147,
      "name": "America/Los_Angeles",
      "abbr": "PDT",
      "utcOffset": 420,
      "createdAt": "2017-04-08T06:54:09.213Z",
      "updatedAt": "2017-04-10T03:30:02.671Z"
    },
    "assignedCourier": {
      "id": 1,
      "paymentCycle": "monthly",
      "paymentMinimum": "0.00",
      "lastPaymentDate": "2017-04-08T06:54:05.305Z",
      "numDrivers": 5,
      "numDriversOccupied": 0,
      "vehicles": null,
      "zones": [
        "95014",
        "94040",
        "95035",
        "95131",
        "75006",
        "75023"
      ],
      "canEditZones": true,
      "pricing": [
        {
          "type": "per package",
          "model": [
            {
              "price": 20
            }
          ]
        }
      ],
      "nextPricing": null,
      "canEditPricing": true,
      "operatingHours": [
        {
          "day": "monday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "tuesday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "wednesday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "thursday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "friday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "saturday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "sunday",
          "open": "00:00:00",
          "duration": 1440
        }
      ],
      "canEditOperatingHours": true,
      "unavailability": [
        {
          "date": "****-12-25"
        },
        {
          "date": "2018-02-14"
        }
      ],
      "canEditUnavailability": true,
      "createdAt": "2017-04-08T06:54:10.011Z",
      "updatedAt": "2017-04-08T06:54:10.015Z",
      "companyId": 4,
      "timezoneId": 583
    },
    "assignedDriver": null
  }
}
Argument validation errors
Location does not exist.
You do not have access to this location.
Internal Server Error
Access denied.

Body Params

id
int32
required

The unique ID for the location you want to retrieve.

Headers

Content-Type
string
required

application/x-www-form-urlencoded or application/json. If you choose application/x-www-form-urlencoded, please remember to stringify your fields!

Authorization
string
required

bearer <API_TOKEN>

 
Suggest Edits

/locations/query

API Endpoint to retrieve locations

 
posthttps://api.pathover.com/v2/locations/query
curl -X POST https://api.pathover.com/v2/locations/query \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5" \
  -d @- << EOF
  {
    "sort": "id,-name,createdAt",
    "page": 5,
    "limit": 10
  }
EOF
# Python

import requests # import third-party library "requests" package
import json # used for stringifying dict

API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5"

# request headers
headers = {
  "Content-Type": "application/x-www-form-urlencoded",
  "Authorization": "bearer " + API_TOKEN # put api token here
}

# request body payload
data = {
  "sort": "id,-name,createdAt", # sort by id ascending, then name descending, then createdAt ascending
  "page": 1, # page 1
  "limit": 10 # 10 elements per page
}

# make post request, the response get stored into result variable
result = requests.post("https://api.pathover.com/v2/locations/query", headers=headers, data=data)

# get result
result.text
// JavaScript

var request = require('request'); // require third-party library "request" node module
var API_TOKEN = 'PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5';

// make post request
request.post({
  url: 'https://api.pathover.com/v2/locations/query',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'bearer ' + API_TOKEN //put api token here
  }
  
  // post data goes here, remember to STRINGIFY any objects!
  form: {
    sort: 'id,-name,createdAt', // sort by id ascending, then name descending, then createdAt ascending
  	page: 1, // page 1
  	limit: 10 // 10 elements per page
  }
}, function(err, res, body) {
	// handle error
  if (err) { 
    throw err;
  }
  
  // response info
  console.log(res.statusCode); // statusCode
  console.log(res.body); // the body of the response
});
<?php

// IMPORTANT! In order for DECIMAL/FLOAT types to work, you must put 4.0 (with decimal point and trailing zero). It will not work if you just put 4 (without the decimal point and zero at the end)

// url
$URL = 'https://api.pathover.com/api/v2/locations/query';

// api key
$API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5";

// sort by id ascending, then name descending, then createdAt ascending
$sort = "id,-name,createdAt";
$page = 1; // page 1
$limit = 10; // 10 elements per page

// set up curl
$curl = curl_init();

// make curl request
curl_setopt_array($curl, array(
  CURLOPT_URL => $URL, // url
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_SSL_VERIFYPEER => false,
  CURLOPT_SSL_VERIFYHOST => false,
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",

  // YOU HAVE TO PASS IN A STRING!!!
  CURLOPT_POSTFIELDS => "sort=" . $sort . "&page=" . $page . "&limit=" . $limit,
  CURLOPT_HTTPHEADER => array(
    "Authorization: bearer " . $API_TOKEN,
    "content-type: application/x-www-form-urlencoded"
  )
));

$response = curl_exec($curl);
$err = curl_error($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

//close connection
curl_close($curl);

?>
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "locations": [
    {
      "id": 1,
      "doNotCallRushDriverIfAssignedCourierIdOrDriverId": false,
      "active": true,
      "noMoreCapacity": false,
      "noMoreCapacityStartTime": null,
      "noMoreCapacityTimeLimit": null,
      "name": "Pathover Market",
      "email": "bobwu@gmail.com",
      "phone": "+12496244953",
      "address": {
        "city": "CUPERTINO",
        "state": "CA",
        "address1": "11983 N WOLFE RD",
        "postalCode": "95014-0619",
        "countryCode": "US"
      },
      "geocode": {
        "lat": 37.3366394,
        "lng": -122.0154607
      },
      "pickUpOptionName": "Pick Up",
      "scheduledOn": true,
      "shippingOn": true,
      "rushOn": true,
      "pickUpOn": true,
      "maintainsInventory": false,
      "stockWarningThreshold": null,
      "batchTimes": [
        {
          "day": "sunday",
          "time": "18:45:00"
        },
        {
          "day": "friday",
          "time": "23:00:00"
        }
      ],
      "batchCreationDaysAhead": 7,
      "nextBatchTimes": null,
      "nextBatchTimesEffectiveDate": null,
      "prevBatchTimes": null,
      "batchTimesDatesUnavailable": null,
      "canEditBatchTimes": true,
      "deliveryWindowRange": 120,
      "deliveryWindowLeadTime": 60,
      "storeHours": [
        {
          "day": "monday",
          "open": "00:00:00",
          "duration": 720
        },
        {
          "day": "tuesday",
          "open": "10:00:00",
          "duration": 1020
        }
      ],
      "canEditStoreHours": true,
      "pickUpHours": [
        {
          "day": "monday",
          "open": "00:00:00",
          "duration": 720
        }
      ],
      "canEditPickUpHours": true,
      "numWorkers": 1,
      "packagesPerHour": 10,
      "resourceRoutingRadiusLocalDelivery": 1000,
      "resourceRoutingRadiusShipping": 5000,
      "dropOffTimeSecs": 20,
      "notificationSound": true,
      "pickUpWaitTimeDefault": null,
      "pickUpWaitTime": 60,
      "rushWaitTimeDefault": 60,
      "rushWaitTime": 60,
      "rushLeadTime": 15,
      "sortPickingListBy": "Aisle / Bin",
      "driverPickUpInstructions": "Pick up packages at back room 1",
      "customerPickUpInstructions": null,
      "createdAt": "2017-04-08T06:54:13.091Z",
      "updatedAt": "2017-04-08T06:57:27.912Z",
      "merchantId": 1,
      "timezoneId": 147,
      "assignedCourierId": 1,
      "assignedDriverId": null,
      "merchant": {
        "id": 1,
        "storeFrontUrl": null,
        "storeFrontActive": false,
        "billingCycle": "monthly",
        "billingMinimum": "0.00",
        "lastBillingDate": "2017-04-08T06:54:05.307Z",
        "scheduledRate": "0.75",
        "shippingRate": "0.75",
        "rushRate": "0.75",
        "pickUpRate": "0.75",
        "canceledRate": "0.75",
        "maxDistanceForLocalDelivery": 32200,
        "maxDistanceForShipping": 4828032,
        "maxDistanceForMultiplePickUp": 8050,
        "alwaysChooseClosestLocation": false,
        "neverSplitOrderDuringResourceRouting": false,
        "addUnknownProductsFromSubmitOrder": true,
        "maxNumSplitLocations": 3,
        "maxNumHoursInDeliveryWindow": null,
        "webhookUrl": null,
        "testWebhookUrl": null,
        "createdAt": "2017-04-08T06:54:10.039Z",
        "updatedAt": "2017-04-08T06:54:10.043Z",
        "companyId": 2,
        "defaultLocationId": null,
        "company": {
          "id": 2,
          "name": "Merchant Company 1",
          "email": "merchant2@email.com",
          "phone": "+12406206953",
          "active": true,
          "approved": "yes",
          "companyType": "merchant",
          "stripeCustomerId": null,
          "logoUrl": null,
          "rushOptionName": null,
          "shippingOptionName": null,
          "createdAt": "2017-04-08T06:54:09.965Z",
          "updatedAt": "2017-04-08T06:54:09.988Z",
          "courierId": null,
          "merchantId": 1
        }
      },
      "timezone": {
        "id": 147,
        "name": "America/Los_Angeles",
        "abbr": "PDT",
        "utcOffset": 420,
        "createdAt": "2017-04-08T06:54:09.213Z",
        "updatedAt": "2017-04-10T03:30:02.671Z"
      },
      "assignedCourier": {
        "id": 1,
        "paymentCycle": "monthly",
        "paymentMinimum": "0.00",
        "lastPaymentDate": "2017-04-08T06:54:05.305Z",
        "numDrivers": 5,
        "numDriversOccupied": 0,
        "vehicles": null,
        "zones": [
          "95014",
          "94040",
          "95035",
          "95131",
          "75006",
          "75023"
        ],
        "canEditZones": true,
        "pricing": [
          {
            "type": "per package",
            "model": [
              {
                "price": 20
              }
            ]
          }
        ],
        "nextPricing": null,
        "canEditPricing": true,
        "operatingHours": [
          {
            "day": "monday",
            "open": "00:00:00",
            "duration": 1440
          },
          {
            "day": "tuesday",
            "open": "00:00:00",
            "duration": 1440
          },
          {
            "day": "wednesday",
            "open": "00:00:00",
            "duration": 1440
          },
          {
            "day": "thursday",
            "open": "00:00:00",
            "duration": 1440
          },
          {
            "day": "friday",
            "open": "00:00:00",
            "duration": 1440
          },
          {
            "day": "saturday",
            "open": "00:00:00",
            "duration": 1440
          },
          {
            "day": "sunday",
            "open": "00:00:00",
            "duration": 1440
          }
        ],
        "canEditOperatingHours": true,
        "unavailability": [
          {
            "date": "****-12-25"
          },
          {
            "date": "2018-02-14"
          }
        ],
        "canEditUnavailability": true,
        "createdAt": "2017-04-08T06:54:10.011Z",
        "updatedAt": "2017-04-08T06:54:10.015Z",
        "companyId": 4,
        "timezoneId": 583
      },
      "assignedDriver": null
    }
  ],
  "page": 1,
  "limit": 50,
  "total": 1
}
Argument validation errors

Body Params

sort
string

A comma separated list of columns of a table, could have a '-' in front which means descending, ex. id,-name,createdAt

page
int32

The page number which must be greater than 0

limit
int32

The number of elements per page which must be greater than 0

Headers

Content-Type
string
required

application/x-www-form-urlencoded or application/json. If you choose application/x-www-form-urlencoded, please remember to stringify your fields!

Authorization
string
required

BEARER <API_TOKEN>

 
Suggest Edits

/locations/update

Creates a new store location.

 
posthttps://api.pathover.com/v2/locations/update
curl -X POST https://api.pathover.com/v2/locations/update \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5" \
  -d @- << EOF
  {
    "id": 1,
    "active": true,
    "name": 'Grand Market',
    "email": 'gmarket@email.com',
    "phone": '+1234567890',
    "address": "{
      'address1': '444 North Wolfe Road',
      'address2': 'APT 200',
      'city': 'Sunnyvale',
      'state': 'CA',
      'postalCode': '94085',
      'countryCode': 'US'
    }",
    "noMoreCapacity": true,
    "noMoreCapacityTimeLimit": 30,
    "pickUpOptionName": 'Pick Up At Grand Market',
    "scheduledOn": true,
    "shippingOn": true,
    "rushOn": true,
    "pickUpOn": true,
    "maintainsInventory": true,
    "stockWarningThreshold": 10,
    "batchCreationDaysAhead": 7,
    "nextBatchTimesEffectiveDate": '2017-03-12 14:00:00'
    "nextBatchTimes": [{
       'time': '15:00:00',
       'day': 'monday'
     }, {
       'time': '00:00:00',
       'day': 'tuesday'
     }],
    "batchTimesDatesUnavailable": [],
    "deliveryWindowRange": 240,
    "deliveryWindowLeadTime": 60,
    "numWorkers": 10,
    "packagesPerHour": 20,
    "resourceRoutingRadiusLocalDelivery": 10000,
    "resourceRoutingRadiusLocalShipping": 20000000,
    "pickUpWaitTimeDefault": 60,
    "pickUpWaitTime": 45,
    "rushWaitTimeDefault": 60,
    "rushWaitTime": 45,
    "rushLeadTime": 15,
    "sortPickingListBy": 'Category',
    "driverPickUpInstructions": 'Go to front cashier to pick up packages.',
    "customerPickUpInstructions": 'Go to pick up area with your ID to pick up package'
  }
EOF
# Python

import requests # import third-party library "requests" package
import json # used for stringifying dict

API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5"

# request headers
headers = {
  "Content-Type": "application/x-www-form-urlencoded",
  "Authorization": "bearer " + API_TOKEN # put api token here
}

# request body payload
data = {
  "id": 1, # id of the store location
  "active": True,
  "name": "Grand Market",
  "email": "gmarket@email.com",
  "phone": "+1234567890",
  
  # address of the store
  "address": json.dumps({
    "address1": "440 North Wolfe Road",
    "address2": "APT 200",
    "city": "Sunnyvale",
    "state": "CA",
    "postalCode": "94085",
    "countryCode": "US"
  }),
  
  "noMoreCapacity": true,
  "noMoreCapacityTimeLimit": 30,
  "pickUpOptionName": "Pick Up At Grand Market",
  "scheduledOn": True,
  "shippingOn": True,
  "rushOn": True,
  "pickUpOn": True,
  "maintainsInventory": True,
  "stockWarningThreshold": 10,
  "batchCreationDaysAhead": 7, # how many days the batches will be created ahead of time
  "nextBatchTimesEffectiveDate": "2017-03-12 14:00:00", # when the next batch times will override the current batch times
  
  # the next scheduled delivery times that will be updated at the nextBatchTimesEffectiveDate
  "nextBatchTimes": json.dumps([{
    "time": "15:00:00", # must match the store location's timezone
    "day": "thursday" # monday, tuesday, wednesday, thursday, friday, saturday, sunday
  }, {
    "time": "00:00:00", # must match the store location's timezone
    "day": "monday" # monday, tuesday, wednesday, thursday, friday, saturday, sunday
  }]),
  
  "batchTimesDatesUnavailable": json.dumps([]), # coming soon
  "deliveryWindowRange": 240,
  "deliveryWindowLeadTime": 60,
  "numWorkers": 10,
  "packagesPerHour": 20,
  "resourceRoutingRadiusLocalDelivery": 10000,
  "resourceRoutingRadiusLocalShipping": 20000000,
  "pickUpWaitTimeDefault": 60,
  "pickUpWaitTime": 45,
  "rushWaitTimeDefault": 60,
  "rushWaitTime": 45,
  "rushLeadTime": 15,
  "sortPickingListBy": "Category",
  "driverPickUpInstructions": "Go to front cashier to pick up packages.",
  "customerPickUpInstructions": "Go to pick up area with your ID to pick up package"
}

# make post request, the response get stored into result variable
result = requests.post("https://api.pathover.com/v2/locations/update", headers=headers, data=data)

# get result
result.text
// JavaScript

var request = require('request'); // require third-party library "request" node module
var API_TOKEN = 'PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5';

// make post request
request.post({
  url: 'https://api.pathover.com/v2/locations/update',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'bearer ' + API_TOKEN //put api token here
  }
  
  // post data goes here, remember to STRINGIFY any objects!
  form: {
    id: 1, // id of the store location
    active: true,
    name: 'Grand Market',
    email: 'gmarket@email.com',
    phone: '+1234567890',
    address: JSON.stringify({
      address1: '440 North Wolfe Road',
      address2: 'APT 200',
      city: 'Sunnyvale',
      state: 'CA',
      postalCode: '94085',
      countryCode: 'US'
    }),
    noMoreCapacity: true,
    noMoreCapacityTimeLimit: 30,
    pickUpOptionName: 'Pick Up At Grand Market',
    scheduledOn: true,
    shippingOn: true,
    rushOn: true,
    pickUpOn: true,
    maintainsInventory: true,
    stockWarningThreshold: 10,
    batchCreationDaysAhead: 7, // how many days the batches will be created ahead of time
    nextBatchTimesEffectiveDate: '2017-03-12 14:00:00', // when the next batch times will override the current batch times
      
    // the next scheduled delivery times that will be updated at the nextBatchTimesEffectiveDate
    nextBatchTimes: JSON.stringify([{
      time: '15:00:00', // must match the store location's timezone
      day: 'thursday' // monday, tuesday, wednesday, thursday, friday, saturday, sunday
    }, {
      time: '00:00:00', // must match the store location's timezone
      day: 'monday' // monday, tuesday, wednesday, thursday, friday, saturday, sunday
    }]),
    batchTimesDatesUnavailable: JSON.stringify([]), # coming soon
    
    deliveryWindowRange: 240,
    deliveryWindowLeadTime: 60,
    numWorkers: 10,
    packagesPerHour: 20,
    resourceRoutingRadiusLocalDelivery: 10000,
    resourceRoutingRadiusLocalShipping: 20000000,
    pickUpWaitTimeDefault: 60,
    pickUpWaitTime: 45,
    rushWaitTimeDefault: 60,
    rushWaitTime: 45,
    rushLeadTime: 15,
    sortPickingListBy: 'Category',
    driverPickUpInstructions: 'Go to front cashier to pick up packages.',
    customerPickUpInstructions: 'Go to pick up area with your ID to pick up package'
  }
}, function(err, res, body) {
	// handle error
  if (err) { 
    throw err;
  }
  
  // response info
  console.log(res.statusCode); // statusCode
  console.log(res.body); // the body of the response
});
<?php

// IMPORTANT! In order for DECIMAL/FLOAT types to work, you must put 4.0 (with decimal point and trailing zero). It will not work if you just put 4 (without the decimal point and zero at the end)

// url
$URL = 'https://api.pathover.com/api/v2/locations/update';

// api key
$API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5";

$id = 1; // id of store location
$active = true;
$name = "Grand Market";
$email = "gmarket@email.com";
$phone = "+1234567890";

// customer shipping address
$address = array(
  "address1" => "440 N Wolfe Rd",
  "address2" => "",
  "city" => "Sunnyvale",
  "state" => "CA",
  "postalCode" => "94085",
  "countryCode" => "US"
);

$noMoreCapacity = true;
$noMoreCapacityTimeLimit = 30;

$pickUpOptionName = "Pick Up At Grand Market";
$scheduledOn = true;
$shippingOn = true;
$rushO =: true;
$pickUpOn = true;
$maintainsInventory = true;
$stockWarningThreshold = 10;

$batchCreationDaysAhead = 7; // how many days the batches will be created ahead of time
$nextBatchTimesEffectiveDate = "2017-03-12 14:00:00"; // when the next batch times will override the current batch times

// the next scheduled delivery times that will be updated at the nextBatchTimesEffectiveDate
$nextBatchTimes = array(
  array(
    "time" => "15:00:00", // must match the store location's timezone
    "day" => "thursday" // monday, tuesday, wednesday, thursday, friday, saturday, sunday
  }, {
    "time" => '00:00:00', // must match the store location's timezone
    "day" => 'monday' // monday, tuesday, wednesday, thursday, friday, saturday, sunday
  })
);

$batchTimesDatesUnavailable = array(); # coming soon
$deliveryWindowRange = 240;
$deliveryWindowLeadTime = 60;
$numWorkers = 10;
$packagesPerHour = 20;
$resourceRoutingRadiusLocalDelivery = 10000;
$resourceRoutingRadiusLocalShipping = 20000000;
$pickUpWaitTimeDefault = 60;
$pickUpWaitTime = 45;
$rushWaitTimeDefault = 60;
$rushWaitTime = 45;
$rushLeadTime = 15;
$sortPickingListBy = "Category";
$driverPickUpInstructions = "Go to front cashier to pick up packages.";
$customerPickUpInstructions = "Go to pick up area with your ID to pick up package";

// set up curl
$curl = curl_init();

// make curl request
curl_setopt_array($curl, array(
  CURLOPT_URL => $URL, // url
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_SSL_VERIFYPEER => false,
  CURLOPT_SSL_VERIFYHOST => false,
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",

  // YOU HAVE TO PASS IN A STRING!!!
  CURLOPT_POSTFIELDS => "id" . $id . "&active=" . $active . "&name=" . $name . "&email=" . $email . "&phone=" . $phone . "&address=" . json_encode($address) . "&noMoreCapacity=" . $noMoreCapacity . "&noMoreCapacityTimeLimit=" . $noMoreCapacityTimeLimit . "&pickUpOptionName=" . $pickUpOptionName . "&scheduledOn=" . $scheduledOn . "&shippingOn=" . $shippingOn . "&rushOn=" . $rushOn . "&pickUpOn=" . $pickUpOn . "&maintainsInventory=" . $maintainsInventory . "&stockWarningThreshold=" . $stockWarningThreshold . "&batchCreationDaysAhead=" . $batchCreationDaysAhead . "&nextBatchTimesEffectiveDate=" . $nextBatchTimesEffectiveDate . "&batchTimes=" . json_encode($nextBatchTimes) . "&batchTimesDatesUnavailable=" . json_encode($batchTimesDatesUnavailable) . "&deliveryWindowRange=" . $deliveryWindowRange . "&deliveryWindowLeadTime=" . $deliveryWindowLeadTime . "&numWorkers=" . $numWorkers . "&packagesPerHour=" . $packagesPerHour . "&resourceRoutingRadiusLocalDelivery=" . $resourceRoutingRadiusLocalDelivery . "&resourceRoutingRadiusLocalShipping=" . $resourceRoutingRadiusLocalShipping . "&pickUpWaitTimeDefault=" . $pickUpWaitTimeDefault . "&pickUpWaitTime=" . $pickUpWaitTime . "&rushWaitTimeDefault=" . $rushWaitTimeDefault . "&rushWaitTime=" . $rushWaitTime . "&rushLeadTime=" . $rushLeadTime . "&sortPickingListBy=" . $sortPickingListBy . "&driverPickUpInstructions=" . $driverPickUpInstructions . "&customerPickUpInstructions=" . $customerPickUpInstructions,
  CURLOPT_HTTPHEADER => array(
    "Authorization: bearer " . $API_TOKEN,
    "content-type: application/x-www-form-urlencoded"
  )
));

$response = curl_exec($curl);
$err = curl_error($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

//close connection
curl_close($curl);

?>
A binary file was returned

You couldn't be authenticated

{
  "msg": "Location updated.",
  "success": true,
  "location": {
    "id": 1,
    "doNotCallRushDriverIfAssignedCourierIdOrDriverId": false,
    "active": true,
    "noMoreCapacity": false,
    "noMoreCapacityStartTime": null,
    "noMoreCapacityTimeLimit": null,
    "name": "Pathover Market",
    "email": "bobwu@gmail.com",
    "phone": "+12496244953",
    "address": {
      "city": "CUPERTINO",
      "state": "CA",
      "address1": "11983 N WOLFE RD",
      "postalCode": "95014-0619",
      "countryCode": "US"
    },
    "geocode": {
      "lat": 37.3366394,
      "lng": -122.0154607
    },
    "pickUpOptionName": "Pick Up",
    "scheduledOn": true,
    "shippingOn": true,
    "rushOn": true,
    "pickUpOn": true,
    "maintainsInventory": false,
    "stockWarningThreshold": null,
    "batchTimes": [
      {
        "day": "sunday",
        "time": "18:45:00"
      },
      {
        "day": "friday",
        "time": "23:00:00"
      }
    ],
    "batchCreationDaysAhead": 7,
    "nextBatchTimes": null,
    "nextBatchTimesEffectiveDate": null,
    "prevBatchTimes": null,
    "batchTimesDatesUnavailable": null,
    "canEditBatchTimes": true,
    "deliveryWindowRange": 120,
    "deliveryWindowLeadTime": 60,
    "storeHours": [
      {
        "day": "monday",
        "open": "00:00:00",
        "duration": 720
      },
      {
        "day": "tuesday",
        "open": "10:00:00",
        "duration": 1020
      }
    ],
    "canEditStoreHours": true,
    "pickUpHours": [
      {
        "day": "monday",
        "open": "00:00:00",
        "duration": 720
      }
    ],
    "canEditPickUpHours": true,
    "numWorkers": 1,
    "packagesPerHour": 10,
    "resourceRoutingRadiusLocalDelivery": 1000,
    "resourceRoutingRadiusShipping": 5000,
    "dropOffTimeSecs": 20,
    "notificationSound": true,
    "pickUpWaitTimeDefault": null,
    "pickUpWaitTime": 60,
    "rushWaitTimeDefault": 60,
    "rushWaitTime": 60,
    "rushLeadTime": 15,
    "sortPickingListBy": "Aisle / Bin",
    "driverPickUpInstructions": "Pick up packages at back room 1",
    "customerPickUpInstructions": null,
    "createdAt": "2017-04-08T06:54:13.091Z",
    "updatedAt": "2017-04-08T06:57:27.912Z",
    "merchantId": 1,
    "timezoneId": 147,
    "assignedCourierId": 1,
    "assignedDriverId": null,
    "merchant": {
      "id": 1,
      "storeFrontUrl": null,
      "storeFrontActive": false,
      "billingCycle": "monthly",
      "billingMinimum": "0.00",
      "lastBillingDate": "2017-04-08T06:54:05.307Z",
      "scheduledRate": "0.75",
      "shippingRate": "0.75",
      "rushRate": "0.75",
      "pickUpRate": "0.75",
      "canceledRate": "0.75",
      "maxDistanceForLocalDelivery": 32200,
      "maxDistanceForShipping": 4828032,
      "maxDistanceForMultiplePickUp": 8050,
      "alwaysChooseClosestLocation": false,
      "neverSplitOrderDuringResourceRouting": false,
      "addUnknownProductsFromSubmitOrder": true,
      "maxNumSplitLocations": 3,
      "maxNumHoursInDeliveryWindow": null,
      "webhookUrl": null,
      "testWebhookUrl": null,
      "createdAt": "2017-04-08T06:54:10.039Z",
      "updatedAt": "2017-04-08T06:54:10.043Z",
      "companyId": 2,
      "defaultLocationId": null,
      "company": {
        "id": 2,
        "name": "Merchant Company 1",
        "email": "merchant2@email.com",
        "phone": "+12406206953",
        "active": true,
        "approved": "yes",
        "companyType": "merchant",
        "stripeCustomerId": null,
        "logoUrl": null,
        "rushOptionName": null,
        "shippingOptionName": null,
        "createdAt": "2017-04-08T06:54:09.965Z",
        "updatedAt": "2017-04-08T06:54:09.988Z",
        "courierId": null,
        "merchantId": 1
      }
    },
    "timezone": {
      "id": 147,
      "name": "America/Los_Angeles",
      "abbr": "PDT",
      "utcOffset": 420,
      "createdAt": "2017-04-08T06:54:09.213Z",
      "updatedAt": "2017-04-10T03:30:02.671Z"
    },
    "assignedCourier": {
      "id": 1,
      "paymentCycle": "monthly",
      "paymentMinimum": "0.00",
      "lastPaymentDate": "2017-04-08T06:54:05.305Z",
      "numDrivers": 5,
      "numDriversOccupied": 0,
      "vehicles": null,
      "zones": [
        "95014",
        "94040",
        "95035",
        "95131",
        "75006",
        "75023"
      ],
      "canEditZones": true,
      "pricing": [
        {
          "type": "per package",
          "model": [
            {
              "price": 20
            }
          ]
        }
      ],
      "nextPricing": null,
      "canEditPricing": true,
      "operatingHours": [
        {
          "day": "monday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "tuesday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "wednesday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "thursday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "friday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "saturday",
          "open": "00:00:00",
          "duration": 1440
        },
        {
          "day": "sunday",
          "open": "00:00:00",
          "duration": 1440
        }
      ],
      "canEditOperatingHours": true,
      "unavailability": [
        {
          "date": "****-12-25"
        },
        {
          "date": "2018-02-14"
        }
      ],
      "canEditUnavailability": true,
      "createdAt": "2017-04-08T06:54:10.011Z",
      "updatedAt": "2017-04-08T06:54:10.015Z",
      "companyId": 4,
      "timezoneId": 583
    },
    "assignedDriver": null
  }
}
Argument validation errors
The next batch times effective date can only be valid after today.
Access denied.
You do not have access to this location.
Cannot edit fields that are restricted from your role.
You do not have permission to edit batch times.
Location id does not exist.
You do not have permission to edit store hours.
You do not have permission to edit pick up hours.
Internal Server Error

Body Params

id
int32
required

The ID for the location you want to update.

active
boolean

Indicates whether the location is active or not.

name
string

The name of the store location.

email
string

The store's email address.

phone
string

The store's phone number.

address
object
address.address1
string

The first line of the store's address. Part of the address object.

address.address2
string

The first line of the store's address. Part of the address object.

address.city
string

The city the store is located in. Part of the address object.

address.state
string

The state the store is located in. Part of the address object.

address.postalCode
string

The store's zip code. Part of the address object.

address.countryCode
string

The two-character ISO code for the country the store is located in. The only available value at this time is "US", which must be capitalized. Part of the address object.

noMoreCapacity
boolean

Setting this value to true will prevent Pathover from sending new orders to this location.

noMoreCapacityTimeLimit
int32

The amount of time Pathover should wait before automatically switching the noMoreCapacity parameter back to false. If noMoreCapacityTimeLimit is null and noMoreCapacity is true, noMoreCapacity will remain true indefinitely.

pickUpOptionName
string

The name of the pick up option in the checkout page in third-party apps such as Shopify, Woocommerce, etc...

scheduledOn
boolean

Indicates whether the store allows scheduled orders.

shippingOn
boolean

Indicates whether the store allows shipping orders.

rushOn
boolean

Indicates whether the store allows rush (on-demand) orders.

pickUpOn
boolean

Indicates whether the store allows pick up orders.

maintainsInventory
boolean

Indicates whether the store maintains inventory.

stockWarningThreshold
int32

When the number of remaining items at this location reaches the value of this parameter, Pathover will notify the merchant. Setting a threshold will override location_inventory if location_inventory "stock_warning_threshold" is null.

batchCreationDaysAhead
string

How many days in advance Pathover should create scheduled delivery times. If 2, for example, then the store will create all batches for the next two days.

nextBatchTimesEffectiveDate
string

The next scheduled day for batching orders, in UTC format (YYYY-MM-DD HH:mm:ss).

nextBatchTimes
object
nextBatchTimes.time
string

What time the customer should place order by. Must be in 'HH:mm:ss' format and must match timezone of the store location

nextBatchTimes.day
string

The day this batch time should be. Must be "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"

batchTimesDatesUnavailable
array of strings

A JSON array of strings indicating when the location is unable to batch orders. Format is [{ date: '12-06-2016', startTime: '1:00:00', duration: 100 }] . The unavailable period in this example begins at 1:00 and continues for 100 minutes.

deliveryWindowRange
int32

The default span of time during which a delivery may arrive, in minutes. A delivery window of 7-9pm would equal 120 minutes, for example.

deliveryWindowLeadTime
int32

The lead time before the driver is expected to reach the store, in minutes.

numWorkers
int32

The total number of staff members working at this store location.

packagesPerHour
int32

The number of packages the location can process per hour.

resourceRoutingRadiusLocalDelivery
int32

The radius to consider when routing local deliveries, in meters.

resourceRoutingRadiusLocalShipping
int32

The radius to consider when routing shipments, in meters.

pickUpWaitTimeDefault
int32

The default wait time for customer in-store pickup, in minutes. Pathover will automatically reset pickUpWaitTime to this number each day.

pickUpWaitTime
int32

The current wait time for customer in-store pickup, in minutes. You can change the pickUpWaitTime as order volume increases and decreases.

rushWaitTimeDefault
int32

The default amount of time it takes for the customer to receive a rush order, in minutes. Pathover will automatically reset rushWaitTime to this number each day.

rushWaitTime
int32

How long the customer should expect to wait for a rush order to be delivered, in minutes. You can change rushWaitTime as order volume increases and decreases.

rushLeadTime
int32

The lead time before the rush driver is expected to reach the store, in minutes.

sortPickingListBy
string

Specifies how to sort the product list. Value may be "Aisle / Bin", "Category", or "Name".

driverPickUpInstructions
string

Specifies where the driver should pick up the order in the store (e.g., "Pick up at front, talk to cashier etc...").

customerPickUpInstructions
string

Specifies where the customer should pick up the order in the store (e.g., "Pick up at front, talk to cashier etc...").

Headers

Content-Type
string
required

application/x-www-form-urlencoded or application/json. If you choose application/x-www-form-urlencoded, please remember to stringify your fields!

Authorization
string
required

bearer <API_TOKEN>

 
Suggest Edits

/masterorders/create

This endpoint submits an order. Pathover may break this order down into packages if a single store is unable to fill all items.

 
posthttps://api.pathover.com/v2/masterorders/create
curl -X POST https://api.pathover.com/v2/masterorders/create \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5" \
  -d @- << EOF
  {
    "locationId": 1,
    "isTestOrder": false,
    "deliveryType": "scheduled",
    "customer": "{
      'name': 'Jonathan Chen',
      'phone': '4087289482',
      'email': 'superman@yahoo.com'
    }",
    "shippingAddress": "{
      'address1': '440 North Wolfe Road',
      'address2': 'APT 200',
      'city': 'Sunnyvale',
      'state': 'CA',
      'postalCode': '94085',
      'countryCode': 'US'
    }",
    "billingAddress": "{
      'address1': '440 North Wolfe Road',
      'address2': 'APT 200',
      'city': 'Sunnyvale',
      'state': 'CA',
      'postalCode': '94085',
      'countryCode': 'US'
    }",
    "order": "{
      'orderNum': '1234567890',
      'subtotal': 25.00, 
      'salesTax': 5.00, 
      'deliveryFee': 5.00, 
      'miscFee': 3.00, 
      'pickUpFee': 0.00, 
      'total': 38.00, 
      'msgToStore': 'No Brown Bananas', 
      'msgToDriver': 'Drop off front porch, I am not home.', 
      'metadata': {
        'stuff': 'anything'
      },
      'lineItems': [{
        'sku': '92018173',
        'name': 'Apple',
        'qty': 4, 
        'upc': '79181173475', 
        'weight': 6.9, 
        'weightUnit': 'oz',
        'imageUrl': 'https://your.image.url',
        'temperatureControl': 'none', 
        'sortCategory': 'Fruit', 
        'price': 0.99, 
        'aisle':'10A', 
        'bin': 'Row 6' 
      }, {
        'sku': '20928502',
        'name': 'Ice Cream',
        'qty': 2,
        'upc': '9872569625',
        'weight': 8.9,
        'weightUnit': 'oz',
        'imageUrl': 'https://your.image.url',
        'temperatureControl': 'frozen',
        'sortCategory': 'Dessert',
        'price': 2.99,
        'aisle': '9C',
        'bin': 'Row 2'
      }]
    }"
  }
EOF
# Python

import requests # import third-party library "requests" package
import json # used for stringifying dict

API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5"

# request headers
headers = {
  "Content-Type": "application/x-www-form-urlencoded",
  "Authorization": "bearer " + API_TOKEN # put api token here
}

# request body payload
data = {
  "locationId": 1, # the location the order goes to, this is required if deliveryType is pickup
  "isTestOrder": false, # whether this is a test order for testing or not
  "deliveryType": "scheduled", # the type of delivery. 'scheduled', 'pickup', 'ondemand', 'shipping'
  
  # remember to stringify this array because of 'application/x-www-form-urlencoded'
  "customer": json.dumps({
    "name": "Jonathan Chen",
    "phone": "4087289482",
    "email": "superman@yahoo.com"
  }),
  
  # Where this package is being shipped to, this is optional if deliveryType is pickup
  "shippingAddress": json.dumps({
    "address1": "440 North Wolfe Road",
    "address2": "APT 200", # optional
    "city": "Sunnyvale",
    "state": "CA",
    "postalCode": "94085",
    "countryCode": "US"
  }),
      
  # Billing address, could be same as shippingAddress, this is optional
  "billingAddress": json.dumps({
    "address1": "440 North Wolfe Road",
    "address2": "APT 200", # optional
    "city": "Sunnyvale",
    "state": "CA",
    "postalCode": "94085",
    "countryCode": "US"
  }),
    
  # place order details here
  "order": json.dumps({
    "orderNum": "1234567890", # order number that matches your system
    "subtotal": 25.00, # subtotal for your order
    "salesTax": 5.00, # sales tax of your order
    "deliveryFee": 5.00, # delivery fee for your order
    "miscFee": 3.00, # any extra fee for your order
    "pickUpFee": 0.00, # any pick up fee for your order if deliveryType is pickup
    "total": 38.00, # total amount of your order
    "msgToStore": "No Brown Bananas", # a message you want to send to the store
    "msgToDriver": "Drop off front porch, I am not home.", # a message you want to send to the driver
    "metadata": {
      "stuff": "anything"
    }, # any extra data you want to store, this is complete optional
      
    # these are the products that are being ordered
    "lineItems": [{
      "sku": "92018173", # this is the id or reference number/string that uniquely identifies your product in your system/app and Pathover uses it to match and find your product in our system
      "name": "Apple", # the name of the product ordered
      "qty": 4, # how many of the product is ordered
      "upc": "79181173475", # the UPC of the product
      "weight": 6.9, # the weight of the product
      "weightUnit": "oz", # the unit measure for the weight
      "imageUrl": "https://your.image.url", # the image of this product
      "temperatureControl": "none", # whether this is 'refrigereated', 'frozen, or 'none'
      "sortCategory": "Fruit", # the category of the product you want to sort by
      "price": 0.99, # the price of the product
      "aisle":"10A", # the aisle the product is placed in your store
      "bin": "Row 6" # the bin or row this product is placed in the corresponding aisle
    }, {
      "sku": "20928502",
      "name": "Ice Cream",
      "qty": 2,
      "upc": "9872569625",
      "weight": 8.9,
      "weightUnit": "oz",
      "imageUrl": "https://your.image.url", # the image of this product
      "temperatureControl": "frozen", # whether this is 'refrigereated', 'frozen, or 'none'
      "sortCategory": "Dessert",
      "price": 2.99, # the price of the product
      "aisle": "9C", # the aisle the product is placed in your store
      "bin": "Row 2" # the bin or row this product is placed in the corresponding aisle
    }]
  })
}

# make post request, the response get stored into result variable
result = requests.post("https://api.pathover.com/v2/masterorders/create", headers=headers, data=data)

# get result
result.text
// JavaScript

var request = require('request'); // require third-party library "request" node module
var API_TOKEN = 'PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5';

// make post request
request.post({
  url: 'https://api.pathover.com/v2/masterorders/create',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'bearer ' + API_TOKEN //put api token here
  }
  
  // post data goes here, remember to STRINGIFY any objects!
  form: {
    locationId: 1, // the location the order goes to, this is required if deliveryType is pickup
    isTestOrder: false, // whether this is a test order for testing or not
    deliveryType: 'scheduled', // the type of delivery. 'scheduled', 'pickup', 'ondemand', 'shipping'
  
    // remember to stringify this array because of 'application/x-www-form-urlencoded'
    customer: JSON.stringify({
      name: 'Jonathan Chen',
      phone: '4087289482',
      email: 'superman@yahoo.com'
    }),
  
    // Where this package is being shipped to, this is optional if deliveryType is pickup
    shippingAddress: JSON.stringify({
      address1: '440 North Wolfe Road',
      address2: 'APT 200', // optional
      city: 'Sunnyvale',
      state: 'CA',
      postalCode: '94085',
      countryCode: 'US'
    }),
      
    // Billing address, could be same as shippingAddress, this is optional
    billingAddress: JSON.stringify({
      address1: '440 North Wolfe Road',
      address2: 'APT 200', // optional
      city: 'Sunnyvale',
      state: 'CA',
      postalCode: '94085',
      countryCode: 'US'
    }),
    
    // place order details here
    order: JSON.stringify({
      orderNum: '1234567890', // order number that matches your system
      subtotal: 25.00, // subtotal for your order
      salesTax: 5.00, // sales tax of your order
      deliveryFee: 5.00, // delivery fee for your order
      miscFee: 3.00, // any extra fee for your order
      pickUpFee: 0.00, // any pick up fee for your order if deliveryType is pickup
      total: 38.00, // total amount of your order
      msgToStore: 'No Brown Bananas', // a message you want to send to the store
      msgToDriver: 'Drop off front porch, I am not home.', // a message you want to send to the driver
      metadata: {
        stuff: 'anything'
      }, // any extra data you want to store, this is complete optional
      
      // these are the products that are being ordered
      lineItems: [{
        sku: '92018173', // this is the id or reference number/string that uniquely identifies your product in your system/app and Pathover uses it to match and find your product in our system
        name: 'Apple', // the name of the product ordered
        qty: 4, // how many of the product is ordered
        upc: '79181173475', // the UPC of the product
        weight: 6.9, // the weight of the product
        weightUnit: 'oz',// the unit measure for the weight
        imageUrl: 'https://your.image.url', // the image of this product
        temperatureControl: 'none', // whether this is 'refrigereated', 'frozen, or 'none'
        sortCategory: 'Fruit', // the category of the product you want to sort by
        price: 0.99, // the price of the product
        aisle: '10A', // the aisle the product is placed in your store
        bin: 'Row 6' // the bin or row this product is placed in the corresponding aisle
      }, {
        sku: '20928502',
        name: 'Ice Cream',
        qty: 2,
        upc: '9872569625',
        weight: 8.9,
        weightUnit: 'oz',
        imageUrl: 'https://your.image.url', // the image of this product
        temperatureControl: 'frozen', // whether this is 'refrigereated', 'frozen, or 'none'
        sortCategory: 'Dessert',
        price: 2.99, // the price of the product
        aisle: '9C', // the aisle the product is placed in your store
        bin: 'Row 2' // the bin or row this product is placed in the corresponding aisle
      }]
    })
  }
}, function(err, res, body) {
	// handle error
  if (err) { 
    throw err;
  }
  
  // response info
  console.log(res.statusCode); // statusCode
  console.log(res.body); // the body of the response
});
<?php

// IMPORTANT! In order for DECIMAL/FLOAT types to work, you must put 4.0 (with decimal point and trailing zero). It will not work if you just put 4 (without the decimal point and zero at the end)

// url
$URL = 'https://api.pathover.com/api/v2/masterorders/create';

// api key
$API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5";

// the location the order goes to, this is required if deliveryType is pickup
$locationId = 1;

// whether this is a test order for testing or not
$isTestOrder = false;

// the type of delivery. 'scheduled', 'pickup', 'ondemand', 'shipping'
$deliveryType = "scheduled";

// customer data
$customer = array(
  "name" => "John Doe",
  "phone" => "3012840610",
  "email" => "support@pathover.com"
);

// customer shipping address
$shippingAddress = array(
  "address1" => "440 N Wolfe Rd",
  "address2" => "",
  "city" => "Sunnyvale",
  "state" => "CA",
  "postalCode" => "94085",
  "countryCode" => "US"
);

// customer billing address
$billingAddress = array(
  "address1" => "440 N Wolfe Rd",
  "address2" => "",
  "city" => "Sunnyvale",
  "state" => "CA",
  "postalCode" => "94085",
  "countryCode" => "US"
);

// the order information
$order = array(
  "orderNum" => "1234567890",
  "subtotal" => 25.00, // subtotal for your order
  "salesTax" => 5.00, // sales tax of your order
  "deliveryFee" => 5.00, // delivery fee for your order
  "miscFee" => 3.00, // any extra fee for your order
  "pickUpFee" => 0.00, // any pick up fee for your order if deliveryType is pickup
  "total" => 38.00, // total amount of your order
  "msgToStore" => "No Brown Bananas", // a message you want to send to the store
  "msgToDriver" => "Drop off front porch, I am not home.", // a message you want to send to
  "metadata" => array(
	  "stuff" => "anything"
  ),
  "lineItems" => array(
    array(
      "sku" => "92018173", // this is the id or reference number/string that uniquely identifies your product in your system/app and Pathover uses it to match and find your product in our system
      "name" => "Apple", // the name of the product ordered
      "qty" = >4, // how many of the product is ordered
      "upc" => "79181173475", // the UPC of the product
      "weight" = >6.9, // the weight of the product
      "weightUnit" => "oz",// the unit measure for the weight
      "imageUrl" => "https://your.image.url", // the image of this product
      "temperatureControl" => "none", // whether this is 'refrigereated', 'frozen, or 'none'
      "sortCategory" => "Fruit", // the category of the product you want to sort by
      "price" = >0.99, // the price of the product
      "aisle" => "10A", // the aisle the product is placed in your store
      "bin" => "Row 6" // the bin or row this product is placed in the corresponding aisle
    ),
    array(
      "sku" => "20928502",
      "name" => "Ice Cream",
      "qty" = >2,
      "upc" => "9872569625",
      "weight" = >8.9,
      "weightUnit" => "oz",
      "temperatureControl" => "frozen", // whether this is 'refrigereated', 'frozen, or 'none'
      "sortCategory" => "Dessert",
      "price" = >0.99, // the price of the product
      "aisle" => "9C", // the aisle the product is placed in your store
      "bin" => "Row 2" // the bin or row this product is placed in the corresponding aisle
    )
  )
);

// set up curl
$curl = curl_init();

// make curl request
curl_setopt_array($curl, array(
  CURLOPT_URL => $URL, // url
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_SSL_VERIFYPEER => false,
  CURLOPT_SSL_VERIFYHOST => false,
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",

  // YOU HAVE TO PASS IN A STRING!!!
  CURLOPT_POSTFIELDS => "locationId=" . $locationId . "&isTestOrder=" . $isTestOrder . "&deliveryType=" . $delivery_type . "&customer=".json_encode($customer) . "&shippingAddress=" . json_encode($shippingAddress) . "&billingAddress=" . json_encode($billingAddress) . "&order=" . json_encode($order,JSON_PRESERVE_ZERO_FRACTION),
  CURLOPT_HTTPHEADER => array(
    "Authorization: bearer " . $API_TOKEN,
    "content-type: application/x-www-form-urlencoded"
  )
));

$response = curl_exec($curl);
$err = curl_error($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

//close connection
curl_close($curl);

?>
A binary file was returned

You couldn't be authenticated

{
  "message": "Order submitted successfully.",
  "success": true,
  "masterOrderId": 63,

  // the order that was created
  "masterOrder": {
    "id": 1,
		"merchantId": 1,
		"statusId": 1,
		"masterOrderNum": "1234567890", // the original order number you sent in request. order.orderNum
		"isTestOrder": false,
		"customerName": "Jonathan Chen",
		"customerEmail": "superman@yahoo.com",
		"customerPhone": "+14087289482",
		"msgToStore": "No Brown Bananas",
		"msgToDriver": "Drop off front porch, I am not home.",
		"shippingAddress": {
      "address1": "440 North Wolfe Road",
      "address2": "APT 200",
      "city": "Sunnyvale",
      "state": "CA",
      "postalCode": "94085",
      "countryCode": "US"
    },
		"shippingGeocode": { "lat": 37.3839198 , "lng": -122.0128444 },
		"billingAddress": {
      "address1": "440 North Wolfe Road",
      "address2": "APT 200",
      "city": "Sunnyvale",
      "state": "CA",
      "postalCode": "94085",
      "countryCode": "US"
    },
		"billingGeocode": { "lat": 37.3839198 , "lng": -122.0128444 },
		"sourceName": "pathover-api", // you submitted through the pathover-api
		"sourceOrder": {}, // the original request you sent
		"sourceOrderNum": "1234567890", // the original order number you sent in request. order.orderNum
		"sourceOrderId": "1234567890", // the original order number you sent in request. order.orderNum
		"subtotal": 25.00,
		"salesTax": 5.00,
		"deliveryFee": 5.00,
		"pickUpFee": 3.00,
		"miscFee": 0.00,
		"total": 38.00,
		"confirmationResponse": null,
		"feedbackResponse": null,
		"createdAt": "2017-04-27T06:39:23.145Z",
		"updatedAt": "2017-04-27T06:39:23.145Z",
  }
}
Argument validation errors
There are no locations currently available to process this order.
Access denied.
Internal Server Error
You do not have access the location id passed in. Please try another location id that belongs to your company.
Invalid address.
There are no upcoming batches available. Please make sure there are batches available before submitting an order.

Body Params

locationId
int32

The store location that should fill the order. If not passed in, the API will determine the best location. REQUIRED if "delivery_type" = "pickup".

isTestOrder
boolean

Indicates whether the order is a test order. If true, Pathover will not dispatch a driver.

deliveryType
string
required

Value can be "scheduled" (for local delivery), "pickup" (for customer pickup at store -- if true, locationId is REQUIRED and shipping address is OPTIONAL), "ondemand" (for rush delivery), and "shipping" (for non-local delivery via FedEx, etc.).

customer
object
customer.name
string
required

The customer's name. Part of the customer object.

customer.phone
string
required

The customer's phone number. Part of the customer object.

customer.email
string
required

The customer's email address. Part of the customer object.

shippingAddress
object
shippingAddress.address1
string

The first line of the customer's shipping address. Part of the shipping address object. REQUIRED for all non-pickup deliveries.

shippingAddress.address2
string

The second line of the customer's shipping address. Part of the shipping address object.

shippingAddress.city
string

The city the order will be shipped to. Part of the shipping address object. REQUIRED for all non-pickup deliveries.

shippingAddress.state
string

The state the order will be shipped to. Part of the shipping address object. REQUIRED for all non-pickup deliveries.

shippingAddress.postalCode
string

The zip code the order will be shipped to. Part of the shipping address object. REQUIRED for all non-pickup deliveries.

shippingAddress.countryCode
string
required

The country the order will be shipped to. The only available value at this time is "US", which must be capitalized. Part of the shipping address object. REQUIRED for all non-pickup deliveries.

billingAddress
object
billingAddress.address1
string

The first line of the customer's billing address. Part of the billing address object. REQUIRED if submitting a billing address.

billingAddress.address2
string

The first line of the customer's billing address. Can be null or ' '. Part of the billing address object.

billingAddress.city
string

The city associated with the customer's billing address. Part of the billing address object. REQUIRED if submitting a billing address.

billingAddress.state
string

The state associated with the customer's billing address. Part of the billing address object. REQUIRED if submitting a billing address.

billingAddress.postalCode
string

The zip code associated with the customer's billing address. Part of the billing address object. REQUIRED if submitting a billing address.

billingAddress.countryCode
string

The country code associated with the customer's billing address. The only available value at this time is "US", which must be capitalized. Part of the billing address object. REQUIRED if submitting a billing address.

order
object
order.orderNum
string
required

The merchant's unique ID for the order. Part of the order object.

order.subtotal
float

The total cost of all of the products in the order, before tax. Part of the order object.

order.salesTax
float

The amount of tax on the order. Part of the order object.

order.deliveryFee
float

The delivery fee the merchant has charged the customer. Part of the order object.

order.pickUpFee
float

The pickup fee the merchant has charged the customer. Part of the order object.

order.miscFee
float

Any other fee the merchant has charged the customer. Part of the order object.

order.total
float

The total cost of the order, including taxes and fees. Part of the order object.

order.msgToStore
string

The customer's instructions to the store (e.g., "No brown bananas"). Part of the order object.

order.msgToDriver
string

The customer's instructions to the driver (e.g., "Leave at doorstep"). Part of the order object.

order.metadata
string

Anything you'd like to add for your own notes. Part of the order object.

lineItems
object
lineItems.sku
string
required

The unique identifier that matches a product in Pathover's system with your system.

lineItems.name
string
required

The name of the product

lineItems.qty
int32
required

The quantity of this product being ordered.

lineItems.upc
string

The UPC of the product. Can be the same as sku or not.

lineItems.weight
double

The weight of the product. Must be greater than or equal to 0.

lineItems.weightUnit
string

The weight unit corresponding to the weight. Must be 'oz', 'g', 'kg', 'lb', 'lbs', 'fl oz'

lineItems.imageUrl
string

The link to the image of this product.

lineItems.temperatureControl
string

Whether this is 'frozen', 'refrigerated', or 'none'.

lineItems.sortCategory
string

The category to sort the product view list by.

lineItems.price
double

How much the product costs.

lineItems.aisle
string

The aisle in the store location where this product can be found.

lineItems.bin
string

The bin / row in the store location aisle where this product can be found.

Headers

Content-Type
string
required

application/x-www-form-urlencoded or application/json. If you choose application/x-www-form-urlencoded, please remember to stringify your fields!

Authorization
string
required

bearer <API_TOKEN>

 
Suggest Edits

/masterorders/read

This endpoint that gets a master order

 
posthttps://api.pathover.com/v2/masterorders/read
curl -X POST https://api.pathover.com/v2/masterorders/read \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5" \
  -d @- << EOF
  {
    "id": 1,
  }
EOF
# Python

import requests # import third-party library "requests" package
import json # used for stringifying dict

API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5"

# request headers
headers = {
  "Content-Type": "application/x-www-form-urlencoded",
  "Authorization": "bearer " + API_TOKEN # put api token here
}

# request body payload
data = {
  "id": 1 # the id of the master order
}

# make post request, the response get stored into result variable
result = requests.post("https://api.pathover.com/v2/masterorders/read", headers=headers, data=data)

# get result
result.text
// JavaScript

var request = require('request'); // require third-party library "request" node module
var API_TOKEN = 'PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5';

// make post request
request.post({
  url: 'https://api.pathover.com/v2/masterorders/read',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'bearer ' + API_TOKEN //put api token here
  }
  
  // post data goes here, remember to STRINGIFY any objects!
  form: {
    id: 1 // the id of the master order
  }
}, function(err, res, body) {
	// handle error
  if (err) { 
    throw err;
  }
  
  // response info
  console.log(res.statusCode); // statusCode
  console.log(res.body); // the body of the response
});
<?php

// IMPORTANT! In order for DECIMAL/FLOAT types to work, you must put 4.0 (with decimal point and trailing zero). It will not work if you just put 4 (without the decimal point and zero at the end)

// url
$URL = 'https://api.pathover.com/api/v2/masterorders/read';

// api key
$API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5";

// the id of the master order
$id = 1;

// set up curl
$curl = curl_init();

// make curl request
curl_setopt_array($curl, array(
  CURLOPT_URL => $URL, // url
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_SSL_VERIFYPEER => false,
  CURLOPT_SSL_VERIFYHOST => false,
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",

  // YOU HAVE TO PASS IN A STRING!!!
  CURLOPT_POSTFIELDS => "id=" . $id,
  CURLOPT_HTTPHEADER => array(
    "Authorization: bearer " . $API_TOKEN,
    "content-type: application/x-www-form-urlencoded"
  )
));

$response = curl_exec($curl);
$err = curl_error($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

//close connection
curl_close($curl);

?>
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "masterOrder": {
    "id": 1,
    "masterOrderNum": "11076",
    "isTestOrder": false,
    "customerName": "Gunner Wolf",
    "customerEmail": "bobwu@gmail.com",
    "msgToStore": "Sunt incidunt qui aliquid.",
    "msgToDriver": "Vel atque omnis natus quis voluptas quis quod.",
    "customerPhone": "+12456246953",
    "shippingAddress": {
      "city": "SAN JOSE",
      "state": "CA",
      "address1": "4221 NORWALK DR APT E110",
      "postalCode": "95129-1772",
      "countryCode": "US"
    },
    "shippingGeocode": {
      "lat": 37.3188556,
      "lng": -121.9763295
    },
    "billingAddress": {
      "city": "SAN JOSE",
      "state": "CA",
      "address1": "4221 NORWALK DR APT E110",
      "postalCode": "95129-1772",
      "countryCode": "US"
    },
    "billingGeocode": {
      "lat": 37.3188556,
      "lng": -121.9763295
    },
    "sourceName": "pathover-api",
    "sourceOrder": {
      "order": {
        "total": 599,
        "miscFee": 778,
        "orderId": "99732",
        "metadata": {
          "meta": "data"
        },
        "orderNum": "11076",
        "salesTax": 105,
        "subtotal": 925,
        "lineItems": [
          {
            "id": 1,
            "bin": "5",
            "qty": 1,
            "sku": "1000",
            "name": "Apple",
            "aisle": "10C",
            "price": 0.99,
            "weight": 10,
            "imageUrl": "http://www.superactivemommy.com/wp-content/uploads/2012/11/benefits-of-apple-330x297.jpg",
            "weightUnit": "oz",
            "sortCategory": "Produce",
            "totalDiscount": 0,
            "temperatureControl": "none"
          },
          {
            "id": 2,
            "bin": "1",
            "qty": 1,
            "sku": "46605",
            "upc": "88573",
            "name": "Banana",
            "aisle": "10C",
            "price": 925,
            "weight": 23,
            "imageUrl": "https://saltmarshrunning.com/wp-content/uploads/2014/09/bananasf.jpg",
            "weightUnit": "oz",
            "sortCategory": "Produce",
            "totalDiscount": 0,
            "temperatureControl": "frozen"
          },
          {
            "id": 3,
            "bin": "4",
            "qty": 4,
            "sku": "103334",
            "upc": "36112",
            "name": "Coca Cola 2 Liter",
            "aisle": "9A",
            "price": 147,
            "weight": 67.628,
            "imageUrl": "https://happyspeedy.com/sites/default/files/styles/product_display_node_large/public/coke-2-l-b1121112.jpg?itok=ACcLPnGO",
            "weightUnit": "oz",
            "sortCategory": "Beverage",
            "totalDiscount": 0,
            "temperatureControl": "refrigerated"
          }
        ],
        "pickUpFee": 463,
        "msgToStore": "Sunt incidunt qui aliquid.",
        "deliveryFee": 72,
        "msgToDriver": "Vel atque omnis natus quis voluptas quis quod.",
        "totalDiscounts": 0
      },
      "customer": {
        "name": "Gunner Wolf",
        "email": "jchaochin@gmail.com",
        "phone": "+12406206953"
      },
      "sourceName": "pathover-api",
      "isTestOrder": false,
      "deliveryType": "scheduled",
      "billingAddress": {
        "city": "SAN JOSE",
        "state": "CA",
        "address1": "4221 NORWALK DR APT E110",
        "postalCode": "95129-1772",
        "countryCode": "US"
      },
      "billingGeocode": {
        "lat": 37.3188556,
        "lng": -121.9763295
      },
      "billingTimezone": {
        "id": 147,
        "abbr": "PDT",
        "name": "America/Los_Angeles",
        "createdAt": "2017-04-08T06:54:09.213Z",
        "updatedAt": "2017-04-10T02:00:03.034Z",
        "utcOffset": 420
      },
      "shippingAddress": {
        "city": "SAN JOSE",
        "state": "CA",
        "address1": "4221 NORWALK DR APT E110",
        "postalCode": "95129-1772",
        "countryCode": "US"
      },
      "shippingGeocode": {
        "lat": 37.3188556,
        "lng": -121.9763295
      },
      "shippingTimezone": {
        "id": 147,
        "abbr": "PDT",
        "name": "America/Los_Angeles",
        "createdAt": "2017-04-08T06:54:09.213Z",
        "updatedAt": "2017-04-10T02:00:03.034Z",
        "utcOffset": 420
      }
    },
    "sourceOrderNum": "11076",
    "sourceOrderId": "99732",
    "subtotal": "925.00",
    "salesTax": "105.00",
    "deliveryFee": "72.00",
    "pickUpFee": "463.00",
    "miscFee": "778.00",
    "total": "599.00",
    "confirmationResponse": null,
    "createdAt": "2017-04-10T02:01:36.354Z",
    "updatedAt": "2017-04-10T02:01:51.550Z",
    "merchantId": 1,
    "statusId": 2,
    "status": {
      "id": 2,
      "name": "Processing"
    },
    "packages": [
      {
        "id": 1,
        "isTestPackage": false,
        "printedPickingList": false,
        "printedPackageInfo": true,
        "labelUrl": null,
        "trackingNumber": null,
        "deliveryId": null,
        "deliveryType": "scheduled",
        "deliveryService": null,
        "deliveryCost": null,
        "originalDeliveryCost": null,
        "apiCourierDetails": {
          "phone": "+1234567890",
					"name": "Bob Nathan",
					"vehicle": "Toyota Camry",
        },
        "recallApiCourierIfFailed": true,
        "letter": null,
        "priority": null,
        "bags": 1,
        "pictureProofUrl": "https://s3-us-west-1.amazonaws.com/pathover-api-storage/proofs/proof-1491443956238-121.png",
        "msgToCustomer": "",
        "inDispute": false,
        "disputeReason": null,
        "notesFromMerchant": null,
        "notesFromDriver": null,
        "notesFromPathover": null,
        "callRushDriverAt": null,
        "callRushDriverNumTries": 1,
        "driverEnroute": false,
        "pickedUpAt": null,
        "deliveredAt": null,
        "shippedAt": null,
        "canceledAt": null,
        "noDriversAvailable": false,
        "rate": "0.75",
        "coordinates": {
          "lat": 37.3188556,
          "lng": -121.9763295,
          "alt": null,
          "createdAt": "2017-04-10T02:01:36.393Z"
        },
        "createdAt": "2017-04-10T02:01:36.393Z",
        "updatedAt": "2017-04-10T02:45:03.545Z",
        "masterOrderId": 1,
        "orderId": 1,
        "locationId": 1,
        "tripId": null,
        "stopId": null,
        "batchId": 13,
        "boxId": null,
        "timezoneId": 147,
        "statusId": 10,
        "statusIdWhenCanceled": null,
        "status": {
          "id": 10,
          "name": "Processing"
        }
      }
    ]
  }
}
Master order does not exist.
You do not have access to this package.
Argument validation errors

Body Params

id
int32

The id of the master order

Headers

Content-Type
string
required

application/x-www-form-urlencoded or application/json. If you choose application/x-www-form-urlencoded, please remember to stringify your fields!

Authorization
string
required

bearer <API_TOKEN>

 
Suggest Edits

/routes/create

This endpoint takes in addresses and plans an optimized route for either the shortest travel time or shortest distance.

 
posthttps://api.pathover.com/v2/routes/create
curl -X POST https://api.pathover.com/v2/routes/create \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5" \
  -d @- << EOF
  {
    "startTime": "2016-03-12 12:00:00",
    "originAddressId": "ID-1",
    "returnToOrigin": true,
    "transportationMode": "driving",
    "trafficModel": "best_guess",
    "measurementModel": "duration",
    "processingTime": 30,
    "responseUrl": "https://your.url.com",
    "addresses": "[{
      'addressId': 'ID-1',
      'address1': '440 North Wolfe Road',
      'address2': 'APT 200',
      'city': 'Sunnyvale',
      'state': 'CA',
      'postalCode': '94085',
      'countryCode': 'US'
    }, {
      'addressId': 'ID-2',
      'address1': '10425 S De Anza Blvd',
      'city': 'Cupertino',
      'state': ' CA',
      'postalCode': '95014',
      'countryCode': 'US'
    }]"
  }
EOF
# Python

import requests # import third-party library "requests" package
import json # used for stringifying dict

API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5"

# request headers
headers = {
  "Content-Type": "application/x-www-form-urlencoded",
  "Authorization": "bearer " + API_TOKEN # put api token here
}

# request body payload
data = {
  startTime: "2016-03-12 12:00:00", # must be UTC time
  originAddressId: "ID-1", # must match an "addressId" in addresses array
  returnToOrigin: true,
  transportationMode: "driving",
  trafficModel: "best_guess",
  measurementModel: "duration", # this is in seconds
  processingTime: 30, # this is in seconds
  responseUrl: "https://your.url.com", # we will post result to this url

  # remember to stringify this array because of 'application/x-www-form-urlencoded'
  addresses: json.dumps([{
    addressId: "ID-1", # this is the starting address
    address1: "440 North Wolfe Road",
    address2: "APT 200", # optional
    city: "Sunnyvale",
    state: "CA",
    postalCode: "94085",
    countryCode: "US"
  }, {
    addressId: "ID-2",
    address1: "10425 S De Anza Blvd",
    # address2: "APT 404", omit this if there is no address2
    city: "Cupertino",
    state: "CA",
    postalCode: "95014",
    countryCode: "US"
  }])
}

# make post request, the response get stored into result variable
result = requests.post("https://api.pathover.com/v2/routes/create", headers=headers, data=data)

# get result
result.text
// JavaScript

var request = require('request'); // require third-party library "request" node module
var API_TOKEN = 'PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5';

// make post request
request.post({
  url: 'https://api.pathover.com/v2/routes/create',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'bearer ' + API_TOKEN //put api token here
  }
  
  // post data goes here, remember to STRINGIFY any objects!
  form: {
    startTime: '2016-03-12 12:00:00', // must be UTC time
    originAddressId: 'ID-1', // must match an "addressId" in addresses array
    returnToOrigin: true,
    transportationMode: 'driving',
    trafficModel: 'best_guess',
    measurementModel: 'duration', // this is in seconds
    processingTime: 30, // this is in seconds
    responseUrl: 'https://your.url.com', // we will post result to this url

    // remember to stringify this array because of 'application/x-www-form-urlencoded'
    addresses: JSON.stringify([{
      addressId: 'ID-1', // this is the starting address
      address1: '440 North Wolfe Road',
      address2: 'APT 200', // optional
      city: 'Sunnyvale',
      state: 'CA',
      postalCode: '94085',
      countryCode: 'US'
    }, {
      addressId: 'ID-2',
      address1: '10425 S De Anza Blvd',
      // address2: 'APT 404', omit this if there is no address2
      city: 'Cupertino',
      state: 'CA',
      postalCode: '95014',
      countryCode: 'US'
    }])
  }
}, function(err, res, body) {
	// handle error
  if (err) { 
    throw err;
  }
  
  // response info
  console.log(res.statusCode); // statusCode
  console.log(res.body); // the body of the response
});
A binary file was returned

You couldn't be authenticated

// We will post this to the responseUrl as well

{
	"success": true,
  "routeId": 1,
  "route": {
    "startTime": "2020-01-10 20:00:00",
    "endTime": "2020-01-10 20:24:40",
    "totalDistance": 14910,
    "totalDuration": 1480,
    "distanceUnit": "meters",
    "durationUnit": "seconds",
    "route": [{
      "id": "ID-1",
      "address": {
        "address1": "440 NORTH WOLFE ROAD",
        "address2": "APT 200",
        "city": "SUNNYVALE",
        "state": "CA",
        "postalCode": "94085",
        "countryCode": "US"
      },
      "geocode": {
        "lat": 39.086304,
        "lng": -77.239784
      },
      "msgToDriver": null,
      "processingTimeUnit": "seconds",
      "distanceUnit": "meters",
      "durationUnit": "seconds",
      "processingTime": 60,
      "distanceFromPrevStop": 0,
      "durationFromPrevStop": 0,
      "distanceFromOrigin": 0,
      "durationFromOrigin": 0,
      "arrivalTime": "2020-01-10 20:00:00",
      "departureTime": "2020-01-10 20:01:00"
    }, {
      "id": "ID-2",
      "address": {
        "address1": "10425 S DE ANZA BLVD",
        "city": "CUPERTINO",
        "state": "CA",
        "postalCode": "95014",
        "countryCode": "US"
      },
      "geocode": {
        "lat": 39.077026,
        "lng": -77.18316
      },
      "msgToDriver": null,
      "processingTimeUnit": "seconds",
      "distanceUnit": "meters",
      "durationUnit": "seconds",
      "processingTime": 30,
      "distanceFromPrevStop": 7351,
      "durationFromPrevStop": 625,
      "distanceFromOrigin": 7351,
      "durationFromOrigin": 625,
      "arrivalTime": "2020-01-10 20:11:25",
      "departureTime": "2020-01-10 20:11:55"
    }, {
      "id": "ID-1",
      "address": {
        "address1": "440 NORTH WOLFE ROAD",
        "address2": "APT 200",
        "city": "SUNNYVALE",
        "state": "CA",
        "postalCode": "94085",
        "countryCode": "US"
      },
      "geocode": {
        "lat": 39.086304,
        "lng": -77.239784
      },
      "msgToDriver": null,
      "processingTimeUnit": "seconds",
      "distanceUnit": "meters",
      "durationUnit": "seconds",
      "processingTime": 30,
      "distanceFromPrevStop": 7559,
      "durationFromPrevStop": 735,
      "distanceFromOrigin": 0,
      "durationFromOrigin": 0,
      "arrivalTime": "2020-01-10 20:24:10",
      "departureTime": "2020-01-10 20:24:40"
    }]
  }
}
Invalid Argument Errors
Duplicate AddressIds
Unauthorized
Internal Server Error
// This is what is returned immedietly when you include a responseUrl

{
  "success": true,
  "message": 'We are optimizing your route. We will send a POST request to https://your.url.com when we are finished processing. Or you can check the status of this job by submitting a GET request to https://api.pathover.com/v2/routes/read?id=1',
	"routeId": 1,
}
Origin AddressId not found
// if you have invalid addresses

{
  "message": "You have invalid addresses. Please see \"addresses\" returned and their \"invalidReason\" and correct any invalid addreses you might have.",
  "addresses": [
    "addressId": 'ID-1', // this is the starting address
    "address1": '440 North Wolfe Road',
    "address2": 'APT 200',
    "city": 'Sunnyvale',
    "state": ' PP',
    "postalCode": '94085',
    "countryCode": 'US',
    "invalidReason": "\"state\" is invalid"
  ]
}

Body Params

startTime
string

The date time you want this route to start at. Format is "YYYY-MM-DD HH:mm:ss". Must be UTC Time

originAddressId
string
required

The "addressId" of the starting location. This MUST match an "addressId" in the addresses array below.

returnToOrigin
boolean

Indicates whether to return to the start address at the end of the route.

transportationMode
string

Indicate the mode of transportation. Value may be "driving", "bicycling", or "walking".

trafficModel
string

Indicate how much we should take traffic into account. Value may be "best_guess", "pessimistic", or "optimistic".

measurementModel
string

Find best path based on "duration" or "distance"? Value may be either "duration" or "distance".

processingTime
int32

The estimated amount of time the driver will spend at each stop. This is in seconds.

responseUrl
string

A URL for Pathover to POST the optimized route to. Consider using this argument for routes containing 8 addresses or more, which take longer to process. Providing a URL for Pathover to POST the result to prevents the request from timing out and throwing an error.

addresses
object
addresses.i
object
addresses.i.addressId
string
required

A unique identifier for this address to differentiate this addresses from the other addresses in this array.

addresses.i.address1
string
required

The street address

addresses.i.address2
string

The APT, SUITE, etc...

addresses.i.city
string
required

The city of the address

addresses.i.state
string
required

The state of the address. Must be 2 characters. Ex. "CA"

addresses.i.postalCode
string
required

The postal code of the address.

addresses.i.countryCode
string
required

The country code of the address. Must be 2 characters. Ex. "US"

Headers

Content-Type
string
required

application/x-www-form-urlencoded or application/json. If you choose application/x-www-form-urlencoded, please remember to stringify your fields!

Authorization
string
required

bearer API_TOKEN

 
Suggest Edits

/routes/read

Takes in a route ID and returns details about the route.

 
posthttps://api.pathover.com/v2/routes/read
curl -X POST https://api.pathover.com/v2/routes/read \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5" \
  -d '{"id":1}'
# Python

import requests # import third-party library "requests" package
import json # used for stringifying dict

API_TOKEN = "PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5"

# request headers
headers = {
  "Content-Type": "application/x-www-form-urlencoded",
  "Authorization": "bearer " + API_TOKEN # put api token here
}

# request body payload
data = {
  "id": 1
}

# make post request, the response get stored into result variable
result = requests.post("https://api.pathover.com/v2/routes/read", headers=headers, data=data)

# get result
result.text
// JavaScript

var request = require('request'); // require third-party library "request" node module
var API_TOKEN = 'PO_ER4A2UONJQY0LULAFLAG4RDXEKGTGBDGMP4GCJEIO4OJAAUEO5JKQZKLXVWT5';

// make post request
request.post({
  url: 'https://api.pathover.com/v2/routes/read',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'bearer ' + API_TOKEN //put api token here
  }
  
  // post data goes here, remember to STRINGIFY any objects!
  form: {
    id: 1
  }
}, function(err, res, body) {
  // handle error
  if (err) { 
    throw err;
  }
  
  // response info
  console.log(res.statusCode); // statusCode
  console.log(res.body); // the body of the response
});
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "route": {
    "id": 1,
    "userId": 1,
    "status": "success", // "processing", "success", "failed"
    "calculationTime": 0.001, // in seconds
    "startTime": "2020-01-01 12:00:00", // UTC time
    "originAddressId": "ID-1",
    "returnToOrigin": true,
    "transportationMode": "driving",
    "trafficModel": "best_guess",
    "measurementModel": "duration",
    "responseUrl": "https://your.url.com",
		"addresses": [{
      "addressId": "ID-1", // this is the starting address
      "address1": "440 North Wolfe Road",
      "address2": "APT 200", // optional
      "city": "Sunnyvale",
      "state": " CA",
      "postalCode": "94085",
      "countryCode": "US"
    }, {
      "addressId": "ID-2",
      "address1": "10425 S De Anza Blvd",
      // address2: 'APT 404', omit this if there is no address2
      "city": "Cupertino",
      "state": " CA",
      "postalCode": "95014",
      "countryCode": "US"
    }]
    "numAddresses": 2,
    "route": {
      "startTime": "2020-01-10 20:00:00",
      "endTime": "2020-01-10 20:24:40",
      "totalDistance": 14910,
      "totalDuration": 1480,
      "distanceUnit": "meters",
      "durationUnit": "seconds",
      "route": [{
        "id": "ID-1",
        "address": {
          "address1": "440 NORTH WOLFE ROAD",
          "address2": "APT 200",
          "city": "SUNNYVALE",
          "state": "CA",
          "postalCode": "94085",
          "countryCode": "US"
        },
        "geocode": {
          "lat": 39.086304,
          "lng": -77.239784
        },
        "msgToDriver": null,
        "processingTimeUnit": "seconds",
        "distanceUnit": "meters",
        "durationUnit": "seconds",
        "processingTime": 60,
        "distanceFromPrevStop": 0,
        "durationFromPrevStop": 0,
        "distanceFromOrigin": 0,
        "durationFromOrigin": 0,
        "arrivalTime": "2020-01-10 20:00:00",
        "departureTime": "2020-01-10 20:01:00"
      }, {
        "id": "ID-2",
        "address": {
          "address1": "10425 S DE ANZA BLVD",
          "city": "CUPERTINO",
          "state": "CA",
          "postalCode": "95014",
          "countryCode": "US"
        },
        "geocode": {
          "lat": 39.077026,
          "lng": -77.18316
        },
        "msgToDriver": null,
        "processingTimeUnit": "seconds",
        "distanceUnit": "meters",
        "durationUnit": "seconds",
        "processingTime": 30,
        "distanceFromPrevStop": 7351,
        "durationFromPrevStop": 625,
        "distanceFromOrigin": 7351,
        "durationFromOrigin": 625,
        "arrivalTime": "2020-01-10 20:11:25",
        "departureTime": "2020-01-10 20:11:55"
      }, {
        "id": "ID-1",
        "address": {
          "address1": "440 NORTH WOLFE ROAD",
          "address2": "APT 200",
          "city": "SUNNYVALE",
          "state": "CA",
          "postalCode": "94085",
          "countryCode": "US"
        },
        "geocode": {
          "lat": 39.086304,
          "lng": -77.239784
        },
        "msgToDriver": null,
        "processingTimeUnit": "seconds",
        "distanceUnit": "meters",
        "durationUnit": "seconds",
        "processingTime": 30,
        "distanceFromPrevStop": 7559,
        "durationFromPrevStop": 735,
        "distanceFromOrigin": 0,
        "durationFromOrigin": 0,
        "arrivalTime": "2020-01-10 20:24:10",
        "departureTime": "2020-01-10 20:24:40"
      }],

      "graph": {} // distance matrix
    }
  }
}
Invalid Argument Errors
Route does not exist.
Unauthorized
{
    "message": "Sequelize Error.",
    "success": false
}
Internal Server Error

Body Params

id
int32
required

The unique ID for the route.

Headers

Content-Type
string
required

application/x-www-form-urlencoded or application/json. If you choose application/x-www-form-urlencoded, please remember to stringify your fields!

Authorization
string
required

bearer API_TOKEN