Get a merchant’s business and delivery hours. Notes:

  • There may be multiple open and close times in a single day if the merchant closes during and reopens during the day.
  • A close time may be earlier than open time, in which case the close time is in the morning of the next day.

Request

HTTP Request

GET /merchant/{merchant_id}/hours

Parameters

Parameter Name Value Description
Required Parameters
merchant_id Integer The id of the merchant from the Search endpoint.
Optional Parameters
utc true|false Whether or not to return times in UTC. By default, times are returned in the local timezone of the merchant.
iso true|false Whether or not to return times in ISO8601 format. Default is H:i (e.g. ’18:30′ represents 6:30pm). This only applies to the “current_schedule.”

Request Body

Do not supply a request body with this method.

Responses

Success

HTTP 200 OK

Example

{
    "message": [],
    "merchant_id": "64994",
    "merchant_name": "Kestane Kebab",
    "standard_schedule": {
        "business": {
            "sunday": {
                "times_open": [
                    {
                        "start": "00:00",
                        "end": "00:30"
                    },
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ]
            },
            "monday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ]
            },
            "tuesday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ]
            },
            "wednesday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ]
            },
            "thursday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "00:00"
                    }
                ]
            },
            "friday": {
                "times_open": [
                    {
                        "start": "00:00",
                        "end": "00:30"
                    },
                    {
                        "start": "11:00",
                        "end": "00:00"
                    }
                ]
            },
            "saturday": {
                "times_open": [
                    {
                        "start": "00:00",
                        "end": "00:30"
                    },
                    {
                        "start": "11:00",
                        "end": "00:00"
                    }
                ]
            }
        },
        "delivery": {
            "sunday": {
                "times_open": [
                    {
                        "start": "00:00",
                        "end": "00:30"
                    },
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ]
            },
            "monday": {
                "times_open": []
            },
            "tuesday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ]
            },
            "wednesday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ]
            },
            "thursday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "00:00"
                    }
                ]
            },
            "friday": {
                "times_open": [
                    {
                        "start": "00:00",
                        "end": "00:30"
                    },
                    {
                        "start": "11:00",
                        "end": "00:00"
                    }
                ]
            },
            "saturday": {
                "times_open": [
                    {
                        "start": "00:00",
                        "end": "00:30"
                    },
                    {
                        "start": "11:00",
                        "end": "00:00"
                    }
                ]
            }
        }
    },
    "current_schedule": {
        "business": {
            "thursday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "00:00"
                    }
                ],
                "date": "2014-02-13"
            },
            "friday": {
                "times_open": [],
                "date": "2014-02-14"
            },
            "saturday": {
                "times_open": [
                    {
                        "start": "09:00",
                        "end": "17:00"
                    }
                ],
                "date": "2014-02-15"
            },
            "sunday": {
                "times_open": [
                    {
                        "start": "00:00",
                        "end": "00:30"
                    },
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ],
                "date": "2014-02-16"
            },
            "monday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ],
                "date": "2014-02-17"
            },
            "tuesday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ],
                "date": "2014-02-18"
            },
            "wednesday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ],
                "date": "2014-02-19"
            }
        },
        "delivery": {
            "thursday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "00:00"
                    }
                ],
                "date": "2014-02-13"
            },
            "friday": {
                "times_open": [],
                "date": "2014-02-14"
            },
            "saturday": {
                "times_open": [
                    {
                        "start": "09:00",
                        "end": "17:00"
                    }
                ],
                "date": "2014-02-15"
            },
            "sunday": {
                "times_open": [
                    {
                        "start": "00:00",
                        "end": "00:30"
                    },
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ],
                "date": "2014-02-16"
            },
            "monday": {
                "times_open": [],
                "date": "2014-02-17"
            },
            "tuesday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ],
                "date": "2014-02-18"
            },
            "wednesday": {
                "times_open": [
                    {
                        "start": "11:00",
                        "end": "23:30"
                    }
                ],
                "date": "2014-02-19"
            }
        },
        "availability": {
            "pickup": true,
            "delivery": true
        }
    }
}
Property Name Value Description
merchant_name String Merchant name.
standard_schedule Object The regular operating schedule of this merchant.
standard_schedule.business Object[] The business hours of the merchant. If they accept pickup orders, these are also the hours that the merchant is available for pickup orders. If they’re closed on a Sunday, Sunday is omitted.
day String The day of week in the format “sunday”.
start String Time they open. If utc is false, the format is 07:00. If utc is true, the format is 2014-01-26T12:00:00+0000
end String Time they close. Same format as open.
standard_schedule.delivery Object[] The delivery hours of the merchant. Same format as business hours. If they don’t deliver on a Sunday, Sunday is omitted.
current_schedule Object The operating schedule of this merchant for this particular week. The merchant could be closed on a day that they’re usually open due to a holiday or bad weather.
date String The date for each day’s hours. Format is YYYY-MM-DD.
current_schedule.availability.pickup true|false Whether or not this merchant is accepting pickup orders.
current_schedule.availability.delivery true|false Whether or not this merchant is accepting delivery orders.

Merchant Deactivated

This is returned when a merchant isn’t currently accepting orders from delivery.com.
HTTP 400 Bad Request

Example

{
    "message": [
        { "code" : "deactivated",     "user_msg" : "The merchant requested has been deactivated." },
    ]
}

Invalid Merchant Id

This is returned when an invalid merchant id is passed.
HTTP 400 Bad Request

Example

{
    "message": [
        { "code" : "bad_id",     "user_msg" : "Sorry, we weren't able to find the merchant." },
    ]
}

Schedule not found

This is returned when a schedule can’t be found for this merchant. TODO: WHY?
HTTP 400 Bad Request

Example

{
    "message": [
        { "code" : "not_found",     "user_msg" : "Sorry, we could not find a schedule for that merchant." }
    ]
}