To create a merchant, a number of values must be set.

A sample creation call:
POST /merchant/admin/info

{
"location" : {
 "city" : "NEW YORK",
 "state" : "NY",
 "street" : "239 PARK S AVE",
 "unit" : "19th & 20th Street",
 "zipCode" : "10003",
 },
 "confirmPhone" : "5555555555",
 "contactName" : "Jane Doe",
 "cuisines" : [
 "Japanese"
 ],
 "fax" : "5555555555",
 "name" : "Delivering Dots",
 "phone" : "5555555555",
 "timeNeeded" : 30,
 "type" : "R",
 "groupId" : 1,
 "delivery" : true,
 "pickup" : true,
 "description" : ""
}

A successful return will give the new id.

{
"merchantId" : 1234
}

In case of failure, reasons will be delivered in the messages.  Reasons will most likely be limited to validation or address verification errors.

Property Name Value Description
location Object The address of the merchant
location.street string Required
location.city string Required without zipCode
location.state string Required without zipCode
location.zipCode string Required without city/state
location.unit string Additional info such as cross street
name string Required – The name of the merchant
cuisine array Array of cuisines the merchant offers – at least 1 is required
phone string Required – Merchant phone number
fax string Fax number for order confirmation -required if using fax confirmation
confirmPhone string Required – Phone number for order confirmation
description String Description generated by the merchant
type R|C|F|I|W|U|P|Z Required – Type of merchant. See Merchant Search.
timeNeeded integer The number of minutes estimated before an order will be delivered
groupId integer Required – The groupId given to you by your account manager
convenienceFee float A percentage value that will be charged on each order separately from the delivery fee (ex: 2.5 adds an extra 2.5% of the order subtotal to the total)

An update call is made with a PUT call, the only difference being that the only required field is the merchantId.  For simplicity, since all calls relevant to a merchant (ex: menu, delivery range, etc) use the ‘merchantId’ key, the id in the merchant info calls will also use ‘merchantId’ as the key rather than ‘id’.  For all other data sets, the id key will be ‘id’.

To get existing information about a merchant, use a GET request:

GET /merchant/admin/info?merchantId=1234

In GET calls, an ‘active’ value is returned indicating whether the merchant is active on our site.  The POST and PUT calls do not have direct access to this value.  Instead there are activate and deactivate calls.  When the activation call is made, a set of sanity checks are ran.  If any of the sanity checks fail, a 400 response will be given with messages indicating the reason.  If there are no problems, the merchant will be submitted for final review by a member of our staff.

Example activate call:

POST /merchant/admin/activate

{
"merchantId": 1234
}

When deactivating, we require a deactivation type to be selected.

Example deactivate call:

POST /merchant/admin/deactivate

{
"merchantId": 1234,
"deactivationId": 220
}
Deactivation Id Description
220 Temporary Removal
221 Permanent Removal

The above mentioned sanity checks include:

  • The menu structure should not be empty
  • No menu in the menu structure should be empty
  • Items/Options should not have more than one price group
  • Items that have a price of 0 should have a price group
  • Radio option groups and price groups should have more than one option
  • Radio option groups should have at least one option with a price of 0
  • Min/max selection for option groups should be valid for the number of children (ex: min selection of 5 is invalid when only 3 options are present)
  • The merchant should have at least one cuisine
  • The merchant should have an order type available (pickup and/or delivery)
  • The merchant should have at least one delivery zone
  • Business and delivery hours should be populated
  • There should be no time where no menu is available during operation hours (ex: a merchant is open from 10am to 10pm, has a lunch menu of 11am-1pm and a dinner menu of 5pm-8pm, but no standard menu for the rest of the day)