Resources

ServiceType enum

Type Value (utf8_string)Description
foodOrders for food-related goods (food delivery, pickup)
bookingOrders that are reserving appointments (e.g. spas, dentist, doctor) or requesting a service at a future date (e.g. plumber, repairs)
hotel_reservationOrders that reserve hotel rooms
restaurant_reservationOrders that reserve tables at restaurants

OptionType enum

This specifies where the service or goods will be rendered.

Type Value (utf8_string)Description
at_customerService will be at customer’s address or food will be delivered to customer’s address
at_businessService will be at business’ address or food will be picked up at business’ address

CustomerAddressConstraint

his is provided as an availablity_constraint of Opportunity

NameTypeDescription
objectutf8_string(1..128)the object type, value: CustomerAddressConstraint
customer_address_strutf8_string(1..256)original user-inputted address string
customer_addressAddressaddress of customer, may be null

RepeatOrderConstraint

This is provided as an availablity_constraint of Opportunity

NameTypeDescription
objectutf8_string(1..128)the object type, value: RepeatOrderConstraint
reorder_yelp_order_iduuid_hexThe 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.

NameTypeDescription
objectutf8_string(1..128)the object type, value: Opportunity
opportunity_tokenuuid_hexunique identifier for this Opportunity
partner_business_idutf8_string(1..100)partner’s business id to check availability against. Partner provided this to Yelp via Data Ingestion.
request_timetimestampISO8601 UTC, time user requested
service_typeServiceTypeservice type enum
selected_optionOptionTypeoption selected by user
availability_constraintspolymorphic availability_constraints[]This is a list of constraints entered by the user. At the moment, it may be CustomerAddressConstraint

Address

PropertyTypeDescription
objectutf8_string(1..256)object type, value: Address
address1utf8_string(0..256)address line 1
address2utf8_string(0..256)address line 2
address3utf8_string(0..256)address line 3
cityutf8_string(1..256)city / district / town / village
regionutf8_string(1..64)state (US) or region
postal_codeutf8_string(1..64)postal code
countyutf8_string(0..256)county
countryutf8_string(2)country code (ISO 3166-1 alpha 2)

AvailabilityStatus enum

Type Value (utf8_string)Description
availableBusiness 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.
unsupportedThis service_type and/or selected_option is not supported by the Partner
unsupported_by_businessThis service_type and/or selected_option is not supported by the Business
not_available_outside_of_hoursBusiness does not fulfill orders of this type at the given request_time
not_available_outside_of_areaFor selected_option = at_customer only: customer address is outside of business’ service area
not_available_invalid_addressFor selected_option = at_customer only: customer address is invalid or has bad format
not_available_ambiguous_addressFor selected_option = at_customer only: customer address is ambiguous and has multiple similar locations
not_available_cannot_fulfill_reorderIn 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_otherService not available for any other reason
no_inventory_availableFor 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)