Merchants Endpoint: Determining when merchants are available for ordering

94 views
Skip to first unread message

Cindy Tran

unread,
Sep 26, 2018, 4:33:09 PM9/26/18
to deliverydotcom API V2

Hello,

I had a few questions regarding the responses from the GET merchant/all endpoint and from the GET merchant/{merchant_id}. Overall goal is determine when a merchant is be available for ordering.

Questions on GET /merchant/all endpoint:

1. How are merchants that are permanently no longer available (i.e., permanently closed) handled? Would they simply not be returned in the response or is there a flag for this?

2. Are there any other cases where a merchant that was previously being returned but no longer being returned? If so, what are those cases?


Questions on GET /merchant/{merchant_id} endpoint:

3. In the merchants response -> 'ordering' hash -> 'availability' hash, is the 'active' value dependent on business hours? For example, if the store isn't opened yet for the day would this be false? How are temporary closures (e.g., closed because of repairs) handled?

4. Also in the 'availability' hash, what is the difference between 'pickup' and 'pickup_supported'? Is 'pickup_supported' whether or not it's supported overall, and 'pickup' whether it's currently available?

Thank you,
Cindy

deliverydotcom API V2

unread,
Sep 27, 2018, 3:28:34 PM9/27/18
to deliverydotcom API V2
Hi Cindy,

Questions on GET /merchant/all endpoint:

1. How are merchants that are permanently no longer available (i.e., permanently closed) handled? Would they simply not be returned in the response or is there a flag for this?
By default, merchants that are no longer available are not returned in the response.  For the direct calls on a specific merchant (/merchant/{merchant_id}), we provide field called display_status.  If a display_status.code != 1 that means the merchant is closed.  We include a message as the reason why the merchant is closed in that object.


2. Are there any other cases where a merchant that was previously being returned but no longer being returned? If so, what are those cases?
Closures (temporary or permanent) are the only reason why a merchant would not be present in the response.

Questions on GET /merchant/{merchant_id} endpoint:

3. In the merchants response -> 'ordering' hash -> 'availability' hash, is the 'active' value dependent on business hours? For example, if the store isn't opened yet for the day would this be false? How are temporary closures (e.g., closed because of repairs) handled?
This ordering.availability.active is related to the merchant's status on our platform.  With regards to determining whether the merchant is available for delivery and/pickup at the order_time provided with the request, use the ordering.availability.delivery and ordering.availability.pickup.  To get the available times, use the cart call.


4. Also in the 'availability' hash, what is the difference between 'pickup' and 'pickup_supported'? Is 'pickup_supported' whether or not it's supported overall, and 'pickup' whether it's currently available?
'pickup_supported' states whether the merchant handles pickup orders in general.
'pickup' states whether is offering pick up based on the order_time you provided with the request.

I hope I have answered your questions.  Just ping back if you need additional information.

Lawren

Cindy Tran

unread,
Oct 1, 2018, 4:12:13 PM10/1/18
to deliverydotcom API V2
Great, thanks for the quick reply. I'll ping back if I have any further questions.

Cindy Tran

unread,
Oct 4, 2018, 9:39:48 AM10/4/18
to deliverydotcom API V2

Could you explain a little further about ordering.availability.active parameter for merchants?

For the GET merchants/all endpoint I couldn't find an example for a merchant where active is false, do you have an example merchant where active is false for this endpoint? What would be the cases where active is false but the merchant is still present in the response?

deliverydotcom API V2

unread,
Oct 4, 2018, 12:13:42 PM10/4/18
to deliverydotcom API V2
Hi Cindy,

We don't return inactive merchant in the merchants/all call.  However, if you are calling a specific  merchant ( /merchant/{merchant_id}) you will get ordering.availability.active = false. We do this for SEO reasons.  If your application is going off merchants/all list, you should never have to worry about inactive merchants.  What is your objective?  Maybe we can better assist you.


Lawren

Cindy Tran

unread,
Oct 4, 2018, 1:12:26 PM10/4/18
to deliverydotcom API V2
Perfect, that is exactly what we want. We just wanted to ensure that we weren't missing some scenarios.

Thanks!

Lawren

unread,
Oct 4, 2018, 1:13:31 PM10/4/18
to deliverydotcom API V2
Excellent.  As always, if you have anymore questions or run into any issues, feel free to ping us.
Reply all
Reply to author
Forward
0 new messages