Resources
ServiceType enum
Type Value (utf8_string) | Description |
---|---|
food | Orders for food-related goods (food delivery, pickup) |
booking | Orders that are reserving appointments (e.g. spas, dentist, doctor) or requesting a service at a future date (e.g. plumber, repairs) |
hotel_reservation | Orders that reserve hotel rooms |
restaurant_reservation | Orders that reserve tables at restaurants |
OptionType enum
This specifies where the service or goods will be rendered.
Type Value (utf8_string) | Description |
---|---|
at_customer | Service will be at customer’s address or food will be delivered to customer’s address |
at_business | Service will be at business’ address or food will be picked up at business’ address |
CustomerAddressConstraint
his is provided as an availablity_constraint of Opportunity
Name | Type | Description |
---|---|---|
object | utf8_string(1..128) | the object type, value: CustomerAddressConstraint |
customer_address_str | utf8_string(1..256) | original user-inputted address string |
customer_address | Address | address of customer, may be null |
RepeatOrderConstraint
This is provided as an availablity_constraint of Opportunity
Name | Type | Description |
---|---|---|
object | utf8_string(1..128) | the object type, value: RepeatOrderConstraint |
reorder_yelp_order_id | uuid_hex | The yelp_order_id for an order in the past for re-order. |
Expectations from the partner iframe when showing a re-order
- The items that can be fulfilled will already be selected in the basket.
- For items that are no longer offered, there is a message stating that the items are not available, and that the customer should try something else.
- In some cases, there may be a price change to the item(s) in the new order. If previously ordered item is different in price than the currently re-ordered item, then put the item in the basket, but tell the customer that prices have changed.
Opportunity
This resource represents a user's request to enter the ordering flow.
Name | Type | Description |
---|---|---|
object | utf8_string(1..128) | the object type, value: Opportunity |
opportunity_token | uuid_hex | unique identifier for this Opportunity |
partner_business_id | utf8_string(1..100) | partner’s business id to check availability against. Partner provided this to Yelp via Data Ingestion. |
request_time | timestamp | ISO8601 UTC, time user requested |
service_type | ServiceType | service type enum |
selected_option | OptionType | option selected by user |
availability_constraints | polymorphic availability_constraints[] | This is a list of constraints entered by the user. At the moment, it may be CustomerAddressConstraint |
Address
Property | Type | Description |
---|---|---|
object | utf8_string(1..256) | object type, value: Address |
address1 | utf8_string(0..256) | address line 1 |
address2 | utf8_string(0..256) | address line 2 |
address3 | utf8_string(0..256) | address line 3 |
city | utf8_string(1..256) | city / district / town / village |
region | utf8_string(1..64) | state (US) or region |
postal_code | utf8_string(1..64) | postal code |
county | utf8_string(0..256) | county |
country | utf8_string(2) | country code (ISO 3166-1 alpha 2) |
AvailabilityStatus enum
Type Value (utf8_string) | Description |
---|---|
available | Business can fulfill the order (i.e. deliver to the User’s delivery address) |
available_can_fulfill_reorder* | In case a RepeatOrderConstraint was specified and the partner can service the re-order to their best ability, this value is passed back. |
unsupported | This service_type and/or selected_option is not supported by the Partner |
unsupported_by_business | This service_type and/or selected_option is not supported by the Business |
not_available_outside_of_hours | Business does not fulfill orders of this type at the given request_time |
not_available_outside_of_area | For selected_option = at_customer only: customer address is outside of business’ service area |
not_available_invalid_address | For selected_option = at_customer only: customer address is invalid or has bad format |
not_available_ambiguous_address | For selected_option = at_customer only: customer address is ambiguous and has multiple similar locations |
not_available_cannot_fulfill_reorder | In case a RepeatOrderConstraint was specified and the partner cannot service the re-order, this value is passed back (for eg. if the partner cannot find the order specified by the repeat order constraint) |
not_available_other | Service not available for any other reason |
no_inventory_available | For selected_option = at_business only: the business does not have any available inventory at the time |
available_can_fulfill_reorder
Note that if the partner can only partially satisfy the reorder, then they should still send this status. However, they are expected to show errors on the iframe with items that are removed / not enough inventory etc. (see Expectations from the partner iframe when showing a re-order)
Updated almost 6 years ago