---
# System prepended metadata

title: Untitled

---

## Search Service Access

Slice's Search Service API has been made available for public access along with documentation on how to use the API. 

To access the documentation use the following call which will return an OpenAPI compatible yaml file. 

```
curl "https://docs.prod.slicelife.com/apis/search_service_api/prod/openapi_docs_for_third_parties.yaml" \
     -H 'cname-api-key: OHZaNlB6RnkveWNsZjBYQ0hySjcvMkRrTVdvejh0a1hkMlBzTWhTUS9EUUNUK05zdU50U0VkYUt6TThVK2svVQptcld4Y1J1THhBMUlGYXhiRHc3aExRPT0K'

```
This yaml file can then be imported into an OpenAPI [Swagger Editor](https://editor.swagger.io/) for viewing. The documentation includes available endpoints along with supported filters and sorts.  

![](https://i.imgur.com/gRCWYAX.png)

The Search Service public host is: https://search-service-public.prod.slicelife.com


### Example Search Service Requests


#### Unfiltered And Unsorted Shops Request
This is the basic structure for a shop search request which accepts a `pagination` object, an array of `filters` and `sorts`, as well as a `user_context` object which is used to return user-specific info such as distance to each shop in the result set. 
##### Request `POST`
```
curl -X "POST" "https://search-service-public.prod.slicelife.com/api/shops" \
     -H 'x-api-key: REPLACE_WITH_API_KEY' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "pagination": {
    "size": 2,
    "from": 0
  },
  "filters": [],
  "sorts": [],
  "user_context": {
    "longitude": -105.0348974,
    "latitude": 39.7572258
  }
}'
```
##### Response `200 OK`
The response will include shops that match the criteria included in the request. Note that at the bottom of the response, the `meta` section will include info on what filters or sorts were requested, which were applied, as well as a full list of supported filters and sorts. 
```
{
  "data": [
    {
      "accepts_scheduled_orders": true,
      "address": "148 Aviation Ln",
      "chain": {
        "id": 588,
        "name": "DeNunzio's Italian Trattoria ",
        "slug": "denunzio-s-italian-trattoria"
      },
      "city": "Latrobe",
      "cuisines": [
        {
          "name": "veggie pizza",
          "seo_representation": "veggie-pizza"
        }
      ],
      "delivery_info": {
        "delivers_to_user": false,
        "fee_amount": null,
        "fee_range": {
          "max": 6.9,
          "min": 6.9,
          "type": "flat"
        },
        "fee_type": null,
        "minimum_order": null,
        "minimum_order_range": {
          "max": 15.0,
          "min": 15.0
        }
      },
      "delivery_provider": "doordash",
      "discount_percent": 0.05,
      "distance_to_user": 1351.8695180052132,
      "eta": {
        "max_delivery": 60,
        "max_pickup": 30,
        "min_delivery": 45,
        "min_pickup": 15
      },
      "featured_shop_review": {
        "date": "2021-10-16T15:33:48.000Z",
        "star_rating": 5,
        "text": "The best pizza",
        "user_display_name": "Marcia W."
      },
      "has_coupons": false,
      "has_menu": true,
      "hero_image_url": "https://slicelife.imgix.net/11431/photos/original/product-seafood-denunzio-11262689.jpeg?auto=compress&auto=format",
      "id": "e3cf061e-a05a-441f-95f7-e49993f45587",
      "image_url": "https://shop-logos.imgix.net/shops/11431/original/denunzios-specialty-black-01_2_copy.png",
      "is_acquired": true,
      "is_open_for_delivery": true,
      "is_open_for_pickup": true,
      "location": {
        "latitude": 40.2738018,
        "longitude": -79.4070821
      },
      "loyalty_enabled": true,
      "name": "DeNunzio's Italian Chop House & Sinatra Bar",
      "next_opening_delivery": "2022-03-09T16:00:00Z",
      "next_opening_pickup": "2022-03-09T16:00:00Z",
      "ovr": 0.16,
      "phone": "7245393980",
      "pickup_minimum": 0.0,
      "rating_info": {
        "count": 35,
        "display": 4.85,
        "should_display": true,
        "value": 4.85
      },
      "shop_id": 11431,
      "slug": "denunzio-s-italian-restaurant-latrobe",
      "state": "PA",
      "title": "| Latrobe, PA 15650 | Order Pizza Online | Pizza Menu | Pizza Delivery",
      "twilio_phone": "7249720799",
      "web_slug": "pa/latrobe/15650/denunzio-s-italian-restaurant-latrobe",
      "zip_code": "15650"
    },
    {
      "accepts_scheduled_orders": true,
      "address": "612 E Bidwell St",
      "chain": {
        "id": 178,
        "name": "Pizza Guys",
        "slug": "pizza-guys"
      },
      "city": "Folsom",
      "cuisines": [
        {
          "name": "gluten free pizza",
          "seo_representation": "gluten-free-pizza"
        },
        {
          "name": "thin crust pizza",
          "seo_representation": "thin-crust-pizza"
        },
        {
          "name": "healthy pizza",
          "seo_representation": "healthy-pizza"
        },
        {
          "name": "thick crust pizza",
          "seo_representation": "thick-crust-pizza"
        },
        {
          "name": "veggie pizza",
          "seo_representation": "veggie-pizza"
        }
      ],
      "delivery_info": {
        "delivers_to_user": false,
        "fee_amount": null,
        "fee_range": {
          "max": 3.95,
          "min": 3.95,
          "type": "flat"
        },
        "fee_type": null,
        "minimum_order": null,
        "minimum_order_range": {
          "max": 15.0,
          "min": 15.0
        }
      },
      "delivery_provider": "",
      "discount_percent": 0.05,
      "distance_to_user": 865.4235113136975,
      "eta": {
        "max_delivery": 50,
        "max_pickup": 30,
        "min_delivery": 35,
        "min_pickup": 15
      },
      "featured_shop_review": null,
      "has_coupons": true,
      "has_menu": true,
      "hero_image_url": "https://slicelife.imgix.net/5381/photos/original/500210m.4.jpg?auto=compress&auto=format",
      "id": "b5efea8d-56b0-4f84-b180-b0b1b978cc5e",
      "image_url": "https://shop-logos.imgix.net/shops/5381/original/Pizza_Guys1.png",
      "is_acquired": true,
      "is_open_for_delivery": true,
      "is_open_for_pickup": true,
      "location": {
        "latitude": 38.6727636,
        "longitude": -121.1627176
      },
      "loyalty_enabled": true,
      "name": "Pizza Guys",
      "next_opening_delivery": "2022-03-09T18:00:00Z",
      "next_opening_pickup": "2022-03-09T18:00:00Z",
      "ovr": 0.24,
      "phone": "9169846666",
      "pickup_minimum": 0.0,
      "rating_info": {
        "count": 12,
        "display": 4.64,
        "should_display": true,
        "value": 4.64
      },
      "shop_id": 5381,
      "slug": "pizza-guys-folsom",
      "state": "CA",
      "title": "| Folsom, CA 95630 | Order Pizza Online | Pizza Menu | Pizza Delivery |",
      "twilio_phone": "9165426127",
      "web_slug": "ca/folsom/95630/pizza-guys-folsom",
      "zip_code": "95630"
    }
  ],
  "meta": {
    "applied_filters": [],
    "applied_match": [],
    "applied_sorts": [],
    "flags": {
      "preorder_etas_v2": true
    },
    "pagination": {
      "from": 0,
      "size": 2,
      "total_results": 500
    },
    "requested_filter_types": [],
    "requested_sort_types": [],
    "supported_filter_types": [
      "within_radius",
      "delivers_to",
      "shop_identifiers",
      "delivery_fees",
      "delivery_minimum_limit",
      "is_acquired",
      "is_unacquired",
      "chain",
      "cities_and_states",
      "onboarded_days_ago",
      "zip_codes",
      "areas",
      "exclude_shop_identifiers",
      "discount_range",
      "is_open_for",
      "is_open",
      "hero_image",
      "min_rating",
      "delivery_provider",
      "cuisines",
      "has_featured_products",
      "does_not_have_featured_products",
      "loyalty_enabled",
      "shop_name_contains",
      "delivers_to_or_within_radius",
      "within_radius_and_does_not_deliver_to",
      "does_not_deliver_to",
      "post_sales_service_channel",
      "shop_integration_adoption",
      "product_name",
      "product_name_contains",
      "in_visible_category",
      "in_stock",
      "has_image",
      "product_category"
    ],
    "supported_sort_types": [
      "nearby",
      "recommended",
      "delivery_estimate",
      "discount",
      "acquired",
      "ovr",
      "rating",
      "is_open",
      "pickup_estimate",
      "loyalty_enabled",
      "bucketed_distance_sort"
    ]
  }
}
```

#### Shop Search Request With 'Delivers To' filter applied 
In this request, the `filters` array includes a `delivers_to` filter which will constrain the result set to only include shops that deliver to the provided lat/long. 
##### Request `POST`
```
## Shops
curl -X "POST" "https://search-service-public.prod.slicelife.com/api/shops" \
     -H 'x-api-key: REPLACE_WITH_API_KEY' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "pagination": {
    "size": 2,
    "from": 0
  },
  "filters": [
    {
      "longitude": -105.0348974,
      "filter_type": "delivers_to",
      "latitude": 39.7572258
    }
  ],
  "sorts": [],
  "user_context": {
    "longitude": -105.0348974,
    "latitude": 39.7572258
  }
}'

```
##### Response `200 OK`
Note that the response here includes an `applied_filters` array that includes our requested `delivers_to` filter. 
```
{
  "data": [
    {
      "accepts_scheduled_orders": true,
      "address": "1200 W 38Th Ave",
      "chain": null,
      "city": "Denver",
      "cuisines": [
        {
          "name": "sicilian pizza",
          "seo_representation": "sicilian-pizza"
        },
        {
          "name": "deep dish pizza",
          "seo_representation": "deep-dish-pizza"
        },
        {
          "name": "gluten free pizza",
          "seo_representation": "gluten-free-pizza"
        },
        {
          "name": "healthy pizza",
          "seo_representation": "healthy-pizza"
        },
        {
          "name": "veggie pizza",
          "seo_representation": "veggie-pizza"
        }
      ],
      "delivery_info": {
        "delivers_to_user": true,
        "fee_amount": 0.0,
        "fee_range": {
          "max": 0.0,
          "min": 0.0,
          "type": "flat"
        },
        "fee_type": "flat",
        "minimum_order": 0.0,
        "minimum_order_range": {
          "max": 0.0,
          "min": 0.0
        }
      },
      "delivery_provider": null,
      "discount_percent": 0.0,
      "distance_to_user": 1.9784335184327424,
      "eta": {
        "max_delivery": 35,
        "max_pickup": 30,
        "min_delivery": 20,
        "min_pickup": 15
      },
      "featured_shop_review": null,
      "has_coupons": false,
      "has_menu": true,
      "hero_image_url": "",
      "id": "55ec5430-dc11-41b2-be54-4aa0925ec609",
      "image_url": "https://shop-logos.imgix.net/shops/20118/original/crush.png",
      "is_acquired": false,
      "is_open_for_delivery": true,
      "is_open_for_pickup": true,
      "location": {
        "latitude": 39.7689824,
        "longitude": -105.0009316
      },
      "loyalty_enabled": false,
      "name": "Crush Pizza & Tap",
      "next_opening_delivery": "2022-03-09T18:00:00Z",
      "next_opening_pickup": "2022-03-09T18:00:00Z",
      "ovr": 0.0,
      "phone": "7206193337",
      "pickup_minimum": 0.0,
      "rating_info": {
        "count": 0,
        "display": 0.0,
        "should_display": false,
        "value": 0.0
      },
      "shop_id": 20118,
      "slug": "crush-pizza-tap",
      "state": "CO",
      "title": "My Pizza",
      "twilio_phone": null,
      "web_slug": "co/denver/80211/crush-pizza-tap",
      "zip_code": "80211"
    },
    {
      "accepts_scheduled_orders": true,
      "address": "2400 W 32Nd Ave",
      "chain": null,
      "city": "Denver",
      "cuisines": [
        {
          "name": "new york pizza",
          "seo_representation": "new-york-pizza"
        },
        {
          "name": "gluten free pizza",
          "seo_representation": "gluten-free-pizza"
        },
        {
          "name": "healthy pizza",
          "seo_representation": "healthy-pizza"
        },
        {
          "name": "veggie pizza",
          "seo_representation": "veggie-pizza"
        }
      ],
      "delivery_info": {
        "delivers_to_user": true,
        "fee_amount": 0.0,
        "fee_range": {
          "max": 0.0,
          "min": 0.0,
          "type": "flat"
        },
        "fee_type": "flat",
        "minimum_order": 0.0,
        "minimum_order_range": {
          "max": 0.0,
          "min": 0.0
        }
      },
      "delivery_provider": "",
      "discount_percent": 0.0,
      "distance_to_user": 1.0524183477948368,
      "eta": {
        "max_delivery": 35,
        "max_pickup": 30,
        "min_delivery": 20,
        "min_pickup": 15
      },
      "featured_shop_review": null,
      "has_coupons": false,
      "has_menu": true,
      "hero_image_url": "",
      "id": "bb16ece4-b3fa-4fd1-8f2c-a9f21ad28420",
      "image_url": "https://shop-logos.imgix.net/shops/20234/original/tony_ps.png",
      "is_acquired": false,
      "is_open_for_delivery": true,
      "is_open_for_pickup": true,
      "location": {
        "latitude": 39.761916,
        "longitude": -105.016046
      },
      "loyalty_enabled": false,
      "name": "Tony P's Bar & Pizzeria",
      "next_opening_delivery": "2022-03-09T18:00:00Z",
      "next_opening_pickup": "2022-03-09T18:00:00Z",
      "ovr": 0.0,
      "phone": "3034774900",
      "pickup_minimum": 0.0,
      "rating_info": {
        "count": 0,
        "display": 0.0,
        "should_display": false,
        "value": 0.0
      },
      "shop_id": 20234,
      "slug": "tony-p-s-bar-pizzeria-2400-w-32nd-ave-denver",
      "state": "CO",
      "title": "My Pizza",
      "twilio_phone": null,
      "web_slug": "co/denver/80211/tony-p-s-bar-pizzeria-2400-w-32nd-ave-denver",
      "zip_code": "80211"
    }
  ],
  "meta": {
    "applied_filters": [
      {
        "filter_type": "delivers_to",
        "latitude": 39.7572258,
        "longitude": -105.0348974
      }
    ],
    "applied_match": [],
    "applied_sorts": [],
    "flags": {
      "preorder_etas_v2": true
    },
    "pagination": {
      "from": 0,
      "size": 2,
      "total_results": 44
    },
    "requested_filter_types": [
      "delivers_to"
    ],
    "requested_sort_types": [],
    "supported_filter_types": [
      "within_radius",
      "delivers_to",
      "shop_identifiers",
      "delivery_fees",
      "delivery_minimum_limit",
      "is_acquired",
      "is_unacquired",
      "chain",
      "cities_and_states",
      "onboarded_days_ago",
      "zip_codes",
      "areas",
      "exclude_shop_identifiers",
      "discount_range",
      "is_open_for",
      "is_open",
      "hero_image",
      "min_rating",
      "delivery_provider",
      "cuisines",
      "has_featured_products",
      "does_not_have_featured_products",
      "loyalty_enabled",
      "shop_name_contains",
      "delivers_to_or_within_radius",
      "within_radius_and_does_not_deliver_to",
      "does_not_deliver_to",
      "post_sales_service_channel",
      "shop_integration_adoption",
      "product_name",
      "product_name_contains",
      "in_visible_category",
      "in_stock",
      "has_image",
      "product_category"
    ],
    "supported_sort_types": [
      "nearby",
      "recommended",
      "delivery_estimate",
      "discount",
      "acquired",
      "ovr",
      "rating",
      "is_open",
      "pickup_estimate",
      "loyalty_enabled",
      "bucketed_distance_sort"
    ]
  }
}
```

### Contact
Please contact Scott Berke (scott.berke@slicelife.com) with any questions or issues.