### Location Address and Geolocation Data Source: https://developer.kroger.com/documentation/api-products/partner/locations/location-search Example of address and geolocation details for a location, useful for calculating mile radius when using geolocation as a starting point. ```json { "data": [ { "locationId": "01400413", "chain": "KROGER", "address": { "addressLine1": "800 Loveland Madeira Rd", "city": "Loveland", "state": "OH", "zipCode": "45140", "county": "HAMILTON COUNTY" }, "geolocation": { "latitude": 39.2612003, "longitude": -84.2733961, "latLng": "39.2612003,-84.2733961" }, "name": "Kroger - Loveland", "hours": { ... }, "phone": "5136773820", "departments": [ ... ] } ], "meta": { ... } } } ``` -------------------------------- ### Example Location API Request (cURL) Source: https://developer.kroger.com/documentation/api-products/partner/locations/tutorial This cURL command demonstrates how to make a GET request to the /locations endpoint, filtering by zip code. Ensure you replace {{ZIPCODE}} and {{ACCESS_TOKEN}} with actual values. ```curl curl -X GET \ https://api.kroger.com/v1/locations?filter.zipCode.near={{ZIPCODE}} \ -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \ -H 'Cache-Control: no-cache' ``` -------------------------------- ### Profile query by email (GET) Source: https://developer.kroger.com/documentation/api-products/partner/identity/overview Checks if a customer's profile exists using their email address. ```APIDOC ## Profile query (GET) ### Description Determines if a customer's profile exists by email address. ### Method GET ### Endpoint /profile/query ``` -------------------------------- ### Example Cart JSON Response Source: https://developer.kroger.com/documentation/api-products/partner/carts/tutorial This is a sample JSON object representing the structure of a user's cart, including items, quantities, and other details. ```json { "data": { "id": "f4c5282c-cbd6-4c55-8257-4a808f5ed4d6", "name": "Fulfillable", "items": [ { "allowSubstitutes": true, "createdDate": "2018-09-17T18:50:50.659+0000", "quantity": 1, "specialInstructions": "specialInstructions", "upc": "0000000004139", "description": "Apple - Granny Smith - Small", "modality": "PICKUP" }, { "allowSubstitutes": true, "createdDate": "2018-09-06T18:10:47.521+0000", "quantity": 1, "specialInstructions": "", "upc": "0000000004023", "description": "Grapes - Red Seedless", "modality": "PICKUP" }, { "allowSubstitutes": true, "createdDate": "2018-09-06T18:10:47.521+0000", "quantity": 1, "specialInstructions": "", "upc": "0000000004022", "description": "Grapes - White Seedless", "modality": "PICKUP" }, { "allowSubstitutes": true, "createdDate": "2018-09-06T18:10:47.521+0000", "quantity": 1, "specialInstructions": "", "upc": "0001111041600", "description": "Kroger 2% Reduced Fat Milk", "modality": "PICKUP" } ], "createdDate": "2018-08-10T14:35:53.138+0000" }, "meta": {} } ``` -------------------------------- ### Product Search with Default Fulfillment Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search This example demonstrates how to search for products, setting a default fulfillment type (Curbside Pickup) for all requests. The user only needs to provide the search term. ```APIDOC ## GET /v1/products ### Description Searches for products with a specified term and a default fulfillment type (e.g., Curbside Pickup). ### Method GET ### Endpoint /v1/products ### Parameters #### Query Parameters - **filter.term** (string) - Required - The search term for the product. - **filter.fulfillment** (string) - Optional - The fulfillment type. Example: 'csp' for Curbside Pickup. ### Request Example ``` curl -X GET \ 'https://api.kroger.com/v1/products?filter.term={{TERM}}&filter.fulfillment=csp' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {{TOKEN}}' ``` ### Response #### Success Response (200) - **data** (array) - Contains a list of product search results. - **meta** (object) - Contains metadata about the response. ``` -------------------------------- ### Example Product API Request Source: https://developer.kroger.com/documentation/api-products/partner/products/tutorial This cURL command demonstrates how to request product information, filtering by a search term and a specific location ID. Ensure you replace '{{TOKEN}}' with a valid access token. ```curl curl -X GET \ 'https://api.kroger.com/v1/products?filter.term=milk&filter.locationId=01400441' \ -H 'Authorization: Bearer {{TOKEN}}' \ -H 'Cache-Control: no-cache' ``` -------------------------------- ### Example Product Response JSON Object Source: https://developer.kroger.com/documentation/api-products/partner/products/tutorial This is a sample JSON response for a product API request. The structure includes product details, pricing, and availability information for a specific location. ```json { "data": [ { "productId": "0001111041600", "upc": "0001111041600", "brand": "Kroger", "categories": ["Dairy"], "description": "Kroger 2% Reduced Fat Milk", "productPageURI": "/p/kroger-2-reduced-fat-milk/0001111041600?cid=dis.api.tpi_products-api_20240521_b:all_c:p_t:", "items": [ { "itemId": "0001111041600", "inventory": { "stockLevel": "HIGH" }, "favorite": false, "fulfillment": { "curbside": true, "delivery": true }, "price": { "regular": 1.49, "promo": 0 }, "size": "1/2 Gallon" } ], "temperature": { "indicator": "Refrigerated", "heatSensitive": false }, "images": [ { "perspective": "front", "featured": true, "sizes": [ { "size": "xlarge", "url": "https://www.kroger.com/product/images/xlarge/front/0001111041600" }, { "size": "small", "url": "https://www.kroger.com/product/images/small/front/0001111041600" }, { "size": "large", "url": "https://www.kroger.com/product/images/large/front/0001111041600" }, { "size": "medium", "url": "https://www.kroger.com/product/images/medium/front/0001111041600" }, { "size": "thumbnail", "url": "https://www.kroger.com/product/images/thumbnail/front/0001111041600" } ] } ] } ] } ``` -------------------------------- ### Product Search with Variable Brand and Fulfillment Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search This example shows how to search for products using variable parameters for both the search term, brand, and fulfillment type, allowing for more specific user-driven searches. ```APIDOC ## GET /v1/products ### Description Searches for products using variable query parameters, allowing users to specify the search term, brand, and fulfillment type. ### Method GET ### Endpoint /v1/products ### Parameters #### Query Parameters - **filter.term** (string) - Required - The search term for the product (e.g., 'fat free milk'). - **filter.brand** (string) - Optional - The brand to filter by (e.g., 'Kroger'). - **filter.fulfillment** (string) - Optional - The fulfillment type (e.g., 'csp' for Curbside Pickup). ### Request Example ``` curl -X GET \ 'https://api.kroger.com/v1/products?filter.term=fat%20free%20milk&filter.brand=Kroger&filter.fulfillment=csp' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {{TOKEN}}' ``` ### Response #### Success Response (200) - **data** (array) - Contains a list of product search results matching the specified criteria. - **meta** (object) - Contains metadata about the response. ``` -------------------------------- ### Construct and Execute Product API Request Source: https://developer.kroger.com/documentation/api-products/partner/products/tutorial This JavaScript function constructs and executes a GET request to the /products endpoint. It uses an access token for authorization and optionally filters by locationId and search term. Ensure you have the access token and locationId stored. ```javascript // Product request async function getProducts(term) { // Use access stored access token for product request let accessToken = authentication.getAccessToken(); // Use stored locationId let locationId = localStorage.getItem("locationId"); // Use locationId as filter (if) selected by user let searchByLocation = ""; if (locationId) { searchByLocation = `filter.locationId=${locationId}& `; } // Building product URL // Base URL (https://api.kroger.com) // Version/Endpoint (/v1/products) // Query String (?filter.locationId=${locationId}&filter.term=${term}) let productsUrl = `${ config.apiBaseUrl }/v1/products?${searchByLocation}filter.term=${term}`; // Product request body let productsResponse = await fetch(productsUrl, { method: "GET", cache: "no-cache", headers: { Authorization: `bearer ${accessToken}`, "Content-Type": "application/json; charset=utf-8" } }); // Return json object return productsResponse.json(); } ``` -------------------------------- ### Location Hours Data Structure Source: https://developer.kroger.com/documentation/api-products/partner/locations/location-search Example of the hours object returned for a location, indicating daily open/close times and if the location is open 24 hours. ```json { "data": [ { "locationId": "01400413", "chain": "KROGER", "address": { ... }, "geolocation": { ... }, "name": "Kroger - Loveland", "hours": { "timezone": "America/New_York", "gmtOffset": "(UTC-05:00) Eastern Time (US Canada)", "open24": false, "monday": { "open": "06:00", "close": "00:00", "open24": false }, "tuesday": { "open": "06:00", "close": "00:00", "open24": false }, "wednesday": { "open": "06:00", "close": "00:00", "open24": false }, "thursday": { "open": "06:00", "close": "00:00", "open24": false }, "friday": { "open": "06:00", "close": "00:00", "open24": false }, "saturday": { "open": "06:00", "close": "00:00", "open24": false }, "sunday": { "open": "06:00", "close": "00:00", "open24": false } }, "phone": "5136773820", "departments": [ ... ] } ], "meta": { ... } } } ``` -------------------------------- ### Filter by Brand Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search Example of a product response filtered by brand. This is useful for users to quickly find specific products when search results may vary in order. ```json { "data": [ { "productId": "0001111042315", "upc": "0001111042315", "aisleLocations": [ ... ], "brand": "Kroger", "categories": [ ... ], "description": "Kroger® Fat Free Skim Milk", "productPageURI": "/p/kroger-fat-free-skim-milk-gallon/0001111042315?cid=dis.api.tpi_products-api_20240521_b:all_c:p_t:", "images": [ ... ], "items": [ ... ], "itemInformation": { "depth": "6.00000", "height": "10.00", "width": "6.00" }, "temperature": { ... } } ], "meta": { ... } } ``` -------------------------------- ### Search Locations by Latitude and Longitude (Separate) Source: https://developer.kroger.com/documentation/api-products/partner/locations/location-search Use separate `filter.lat.near` and `filter.lon.near` parameters to establish a geolocation starting point. Ensure a valid access token is included. ```curl curl -X GET \ 'https://api.kroger.com/v1/locations&filter.lat.near=39.259&filter.lon.near-84.265' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {{TOKEN}}' ``` -------------------------------- ### Get or Create Cart Source: https://developer.kroger.com/documentation/api-products/partner/carts/tutorial Checks for an existing cart and retrieves it, or creates a new one if none exists. This function is the entry point for cart operations. ```javascript // Get current cart or create new cart async function getOrCreateCart() { const currentCart = await getCart(); if (currentCart) { return currentCart; } return createCart(); } ``` -------------------------------- ### Filter by Category Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search Example of a product response filtered by category. This is generally more applicable for users browsing a wide range of products rather than searching for a specific item. ```json { "data": [ { "productId": "0001111042315", "upc": "0001111042315", "aisleLocations": [ ... ], "brand": "Kroger", "categories": [ "Dairy" ], "description": "Kroger® Fat Free Skim Milk", "productPageURI": "/p/kroger-fat-free-skim-milk-gallon/0001111042315?cid=dis.api.tpi_products-api_20240521_b:all_c:p_t:", "images": [ ... ], "items": [ ... ], "itemInformation": { ... }, "temperature": { ... } } ], "meta": { ... } } ``` -------------------------------- ### Filter by Fulfillment Type Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search Example of a product response showing fulfillment options (curbside, delivery). Filtering by fulfillment type helps users avoid checkout errors and ensures a seamless experience. ```json { "data": [ { "productId": "0001111042315", "upc": "0001111042315", "aisleLocations": [ ... ], "brand": "Kroger", "categories": [ ... ], "description": "Kroger® Fat Free Skim Milk", "productPageURI": "/p/kroger-fat-free-skim-milk-gallon/0001111042315?cid=dis.api.tpi_products-api_20240521_b:all_c:p_t:", "images": [ ... ], "items": [ { "itemId": "0001111042315", "inventory": { ... }, "favorite": false, "fulfillment": { "curbside": true, "delivery": true }, "price": { ... }, "size": "1 gal", "soldBy": "Unit" } ], "itemInformation": { ... }, "temperature": { ... } } ], "meta": { ... } } ``` -------------------------------- ### Get Cart Source: https://developer.kroger.com/documentation/api-products/partner/carts/tutorial Retrieves an existing user cart by making a GET request to the /carts endpoint. Requires a valid access token for authorization. ```javascript // Get cart async function getCart() { // Use stored access token in authorization header let accessToken = authentication.getAccessToken(); // Base URL (https://api.kroger.com) // Version/Endpoint (/v1/carts) let cartUrl = `${config.apiBaseUrl}/v1/carts`; let cartResponse = await fetch(cartUrl, { method: "GET", cache: "no-cache", headers: { Authorization: `bearer ${accessToken}`, "Content-Type": "application/json; charset=utf-8" } }); let carts = await cartResponse.json(); if (carts.data.length === 0) { return null; } console.log("Returning existing fulfillable cart"); return carts.data[0]; } ``` -------------------------------- ### Get Cart Details (cURL) Source: https://developer.kroger.com/documentation/api-products/partner/carts/tutorial Use this cURL command to retrieve the details of a specific user cart. Ensure you replace {{TOKEN}} with a valid authorization token. ```shell curl -X GET \ https://api.kroger.com/v1/carts/f4c5282c-cbd6-4c55-8257-4a808f5ed4d6 \ -H 'Authorization: Bearer {{TOKEN}}' \ -H 'Cache-Control: no-cache' ``` -------------------------------- ### Example Location Data for Client-Side Filtering Source: https://developer.kroger.com/documentation/api-products/partner/locations/location-search This JSON structure represents a sample response from the location search API. It includes multiple locations with details like location ID, chain name, address, and hours, which can be filtered on the client. ```json { "data": [ { "locationId": "01400413", "chain": "KROGER", "address": { ... }, "geolocation": { ... }, "name": "Kroger - Loveland", "hours": { ... }, "phone": "5136773820", "departments": [ ... ] }, { "locationId": "01480265", "chain": "SHELL COMPANY", "address": { ... }, "geolocation": { ... }, "name": "Shell Company", "departments": [ ... ] }, ], "meta": { ... } } } ``` -------------------------------- ### Get Locations by Zip Code (JavaScript) Source: https://developer.kroger.com/documentation/api-products/partner/locations/tutorial This JavaScript function constructs and executes a GET request to the /locations endpoint, filtering by zip code. It uses a stored access token for authentication and returns the JSON response. ```javascript // Creates location request and display returned data on click async function locationOnClick() { let zipCode = document.getElementById("locationSearchZipCode").value; const locations = await getLocations(zipCode); displayLocations(locations); } async function getLocations(zipCode) { // Use stored access token for location request let accessToken = authentication.getAccessToken(); // Build location URL // Base URL (https://api.kroger.com) // Version/Endpoint (/v1/locations) // Query String (?filter.zipCode.near=term) let locationUrl = `${config.apiBaseUrl}/v1/locations?filter.zipCode.near=${zipCode}`; // Location request body let locationResponse = await fetch(locationUrl, { method: "GET", cache: "no-cache", headers: { Authorization: `bearer ${accessToken}`, "Content-Type": "application/json; charset=utf-8" } }); // Return JSON object return locationResponse.json(); } ``` -------------------------------- ### Filter Locations by Department ID Source: https://developer.kroger.com/documentation/api-products/partner/locations/location-search Use this snippet to filter API responses to include only locations with a specific department, such as a pharmacy. This is an example of a default parameter. ```bash curl -X GET \ 'https://api.kroger.com/v1/locations&filter.zipCode.near={{ZIPCODE}}&filter.department=09' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {{TOKEN}}' ``` -------------------------------- ### Create a cart Source: https://developer.kroger.com/documentation/api-products/partner/carts/overview Creates a cart for a customer. ```APIDOC ## Create a cart ### Description Creates a cart for a customer. ### Method POST ### Endpoint /carts ``` -------------------------------- ### Product Details Source: https://developer.kroger.com/documentation/api-products/partner/products/overview Returns product details for a specific product. ```APIDOC ## GET /products/{productId} ### Description Returns product details for a specific product. ### Method GET ### Endpoint /products/{productId} ### Parameters #### Path Parameters - **productId** (string) - Required - The unique identifier of the product. #### Query Parameters - **filter.locationId** (string) - Optional - Required to return additional response data like price, fulfillment type, aisle locations, and inventory. ### Response #### Success Response (200) - **productPageURI** (string) - Returns the URI portion of the URL required to build the product page URL. - **price** (object) - Includes both the _regular_ price of the item and the _promo_ price of the item. - **nationalPrice** (object) - Includes both the _regular_ national price of the item and the national _promo_ price of the item. - **instore** (boolean) - Indicates if the item is sold in store at the given location. - **shiptohome** (boolean) - Indicates if the item is available to be shipped to home. - **delivery** (boolean) - Indicates if the item is available for delivery from the given location. - **curbside** (boolean) - Indicates if the item is available for curbside pickup from the given location. - **aisleLocations** (string) - Returns the aisle locations of the item for the given location. - **stockLevel** (string) - Returns the `stockLevel` of the item. Possible values: HIGH, LOW, TEMPORARILY_OUT_OF_STOCK. Omitted when unavailable. ``` -------------------------------- ### Product Search API Response - Price Object Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search Illustrates the 'Price' object within a product item, showing regular and promotional pricing. This is returned when a `locationId` is provided. ```json { "data": [ { "productId": "0001111042315", "upc": "0001111042315", "aisleLocations": [ ... ], "brand": "Kroger", "categories": [ ... ], "description": "Kroger® Fat Free Skim Milk", "productPageURI": "/p/kroger-fat-free-skim-milk-gallon/0001111042315?cid=dis.api.tpi_products-api_20240521_b:all_c:p_t:", "images": [ ... ], "items": [ { "itemId": "0001111042315", "inventory": { ... }, "favorite": false, "fulfillment": { ... }, "price": { "regular": 2.79, "promo": 0 }, "size": "1 gal", "soldBy": "Unit" } ], "itemInformation": { ... }, "temperature": { ... } } ], "meta": { ... } } ``` -------------------------------- ### Make a Test API Call with cURL Source: https://developer.kroger.com/documentation Use this cURL command to make a test POST request to the Kroger API token endpoint. Ensure your client ID and secret are base64 encoded and included in the Authorization header. ```bash curl -X POST \ 'https://api.kroger.com/v1/connect/oauth2/token' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -H 'Authorization: Basic {{base64(CLIENT_ID:CLIENT_SECRET)}}' \ -d 'grant_type=client_credentials' ``` -------------------------------- ### Profile information Source: https://developer.kroger.com/documentation/api-products/partner/identity/overview Retrieves a customer's complete profile information. ```APIDOC ## Profile information ### Description Returns a customer's full profile. ### Method GET ### Endpoint /profile ``` -------------------------------- ### Chain details Source: https://developer.kroger.com/documentation/api-products/partner/locations/overview Returns the details of a specific chain. ```APIDOC ## Chain details ### Description Returns the details of a specific chain. ### Method GET ### Endpoint /chains/{chain_id} ### Parameters #### Path Parameters - **chain_id** (string) - Required - The unique identifier of the chain. ### Response #### Success Response (200) - **chain** (object) - An object containing the details of the specific chain. ``` -------------------------------- ### Product Search with Default Fulfillment Parameter Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search Use this snippet when a specific fulfillment type (e.g., curbside pickup) should be applied to all product search requests by default. The fulfillment parameter is hardcoded, while the search term is variable. ```curl curl -X GET \ 'https://api.kroger.com/v1/products?filter.term={{TERM}}&filter.fulfillment=csp' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {{TOKEN}}' ``` -------------------------------- ### Basic Product Search Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search Perform a basic product search using the `filter.term` parameter to find items matching a specific search query. Ensure you include the `Accept` and `Authorization` headers. ```curl curl -X GET \ 'https://api.kroger.com/v1/products?filter.term=fat%20free%20milk' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {{TOKEN}}' ``` -------------------------------- ### Profile query by email (HEAD) Source: https://developer.kroger.com/documentation/api-products/partner/identity/overview Checks for the existence of a customer's profile using their email address via a HEAD request. ```APIDOC ## Profile query (HEAD) ### Description Determines if a customer's profile exist by email address. ### Method HEAD ### Endpoint /profile/query ``` -------------------------------- ### Product Search with Location and Term Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search Search for products by specifying both a `filter.locationId` and a `filter.term`. This helps narrow down results to a specific store and search query. Include `Accept` and `Authorization` headers. ```curl curl -X GET \ 'https://api.kroger.com/v1/products?filter.locationId={{LOCATIONID}}&filter.term={{TERM}}' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {{TOKEN}}' ``` -------------------------------- ### Product Search Source: https://developer.kroger.com/documentation/api-products/partner/products/overview Allows you to find products by passing in either a search term, brand, or product Id. Supports pagination with `filter.limit` and `filter.start` parameters. ```APIDOC ## GET /products ### Description Allows you to find products by passing in either a search term, brand, or product Id. ### Method GET ### Endpoint /products ### Parameters #### Query Parameters - **filter.limit** (integer) - Optional - Sets a limit on the number of products returned. - **filter.start** (integer) - Optional - Sets a number of results to skip in the response. - **filter.locationId** (string) - Optional - Required to return additional response data like price, fulfillment type, aisle locations, and inventory. ### Response #### Success Response (200) - **productPageURI** (string) - Returns the URI portion of the URL required to build the product page URL. - **price** (object) - Includes both the _regular_ price of the item and the _promo_ price of the item. - **nationalPrice** (object) - Includes both the _regular_ national price of the item and the national _promo_ price of the item. - **instore** (boolean) - Indicates if the item is sold in store at the given location. - **shiptohome** (boolean) - Indicates if the item is available to be shipped to home. - **delivery** (boolean) - Indicates if the item is available for delivery from the given location. - **curbside** (boolean) - Indicates if the item is available for curbside pickup from the given location. - **aisleLocations** (string) - Returns the aisle locations of the item for the given location. - **stockLevel** (string) - Returns the `stockLevel` of the item. Possible values: HIGH, LOW, TEMPORARILY_OUT_OF_STOCK. Omitted when unavailable. ``` -------------------------------- ### Product Search API Response - Size Object Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search Shows the 'Size' field for a product item, indicating its packaging or quantity. This field is always included in the response. ```json { "data": [ { "productId": "0001111042315", "upc": "0001111042315", "aisleLocations": [ ... ], "brand": "Kroger", "categories": [ ... ], "description": "Kroger® Fat Free Skim Milk", "productPageURI": "/p/kroger-fat-free-skim-milk-gallon/0001111042315?cid=dis.api.tpi_products-api_20240521_b:all_c:p_t:", "images": [ ... ], "items": [ { "itemId": "0001111042315", "inventory": { ... }, "favorite": false, "fulfillment": { ... }, "price": { ... }, "size": "1 gal", "soldBy": "Unit" } ], "itemInformation": { ... }, "temperature": { ... } } ], "meta": { ... } } ``` -------------------------------- ### Create Cart Source: https://developer.kroger.com/documentation/api-products/partner/carts/tutorial Creates a new user cart by making a POST request to the /carts endpoint. This is used when no existing cart is found. Requires a valid access token. ```javascript // Create cart async function createCart() { console.log("Creating fulfillable cart"); let accessToken = authentication.getAccessToken(); // Base URL (https://api.kroger.com) // Version/Endpoint (/v1/carts) let cartUrl = `${config.apiBaseUrl}/v1/carts`; let cartResponse = await fetch(cartUrl, { method: "POST", cache: "no-cache", headers: { Authorization: `bearer ${accessToken}`, "Content-Type": "application/json; charset=utf-8" }, // Return json object body: JSON.stringify({}) }); return cartResponse.json(); } ``` -------------------------------- ### User cart list Source: https://developer.kroger.com/documentation/api-products/partner/carts/overview Returns a list of carts for a specific customer. ```APIDOC ## User cart list ### Description Returns a list of carts for a specific customer. ### Method GET ### Endpoint /carts ``` -------------------------------- ### Basic Product Search Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search Performs a basic search for products using a specified search term. The relevance of results is based on the match with the item description. ```APIDOC ## GET /v1/products ### Description Searches for products based on a provided search term. ### Method GET ### Endpoint /v1/products ### Parameters #### Query Parameters - **filter.term** (string) - Required - The search term to find products. ### Request Example ``` curl -X GET \ 'https://api.kroger.com/v1/products?filter.term=fat%20free%20milk' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {{TOKEN}}' ``` ### Response #### Success Response (200) - **products** (array) - A list of products matching the search term. #### Response Example (Response structure not detailed in source) ``` -------------------------------- ### Location details Source: https://developer.kroger.com/documentation/api-products/partner/locations/overview Returns the details of a specific location. ```APIDOC ## Location details ### Description Returns the details of a specific location. ### Method GET ### Endpoint /locations/{locationId} ### Parameters #### Path Parameters - **locationId** (string) - Required - The unique identifier of the location. ### Response #### Success Response (200) - **location** (object) - An object containing the details of the specific location. ``` -------------------------------- ### Department list Source: https://developer.kroger.com/documentation/api-products/partner/locations/overview Returns a list of all departments for a specific location. ```APIDOC ## Department list ### Description Returns a list of all departments for a specific location. ### Method GET ### Endpoint /locations/{locationId}/departments ### Parameters #### Path Parameters - **locationId** (string) - Required - The unique identifier of the location. ### Response #### Success Response (200) - **departments** (array) - A list of department objects. ``` -------------------------------- ### Product Search with Variable Brand and Fulfillment Parameters Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search Use this snippet when both the search term and specific attributes like brand and fulfillment type are determined by user input. This allows for more dynamic and user-specific product searches. ```curl curl -X GET \ 'https://api.kroger.com/v1/products?filter.term=fat%20free%20milk&filter.brand=Kroger&filter.fulfillment=csp' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {{TOKEN}}' ``` -------------------------------- ### Department details Source: https://developer.kroger.com/documentation/api-products/partner/locations/overview Returns the details of a specific department. ```APIDOC ## Department details ### Description Returns the details of a specific department. ### Method GET ### Endpoint /locations/{locationId}/departments/{departmentId} ### Parameters #### Path Parameters - **locationId** (string) - Required - The unique identifier of the location. - **departmentId** (string) - Required - The unique identifier of the department. ### Response #### Success Response (200) - **department** (object) - An object containing the details of the specific department. ``` -------------------------------- ### Chain query Source: https://developer.kroger.com/documentation/api-products/partner/locations/overview Determines if a specific chain exists. ```APIDOC ## Chain query ### Description Determines if a specific chain exists. ### Method HEAD ### Endpoint /chains/{chain_id} ``` -------------------------------- ### Product Search with Location Source: https://developer.kroger.com/documentation/api-products/partner/products/product-search Searches for products within a specific location, filtering by both a search term and a location ID to determine fulfillment availability and price. ```APIDOC ## GET /v1/products ### Description Searches for products within a specific location using a search term and location ID. This helps determine fulfillment availability and price for the specified location. ### Method GET ### Endpoint /v1/products ### Parameters #### Query Parameters - **filter.locationId** (string) - Required - The ID of the location to search within. - **filter.term** (string) - Required - The search term to find products. ### Request Example ``` curl -X GET \ 'https://api.kroger.com/v1/products?filter.locationId={{LOCATIONID}}&filter.term={{TERM}}' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {{TOKEN}}' ``` ### Response #### Success Response (200) - **products** (array) - A list of products sold at the specified location that match the search term. #### Response Example (Response structure not detailed in source) ``` -------------------------------- ### Location and Department Data Structure Source: https://developer.kroger.com/documentation/api-products/partner/locations/location-search This JSON object represents the response from a location search query, detailing a specific store and its available departments. It includes basic store information and a list of departments, each with an ID and name. Some departments may have additional specific details like hours or phone numbers. ```json { "data": [ { "locationId": "01400413", "chain": "KROGER", "address": { ... }, "geolocation": { ... }, "name": "Kroger - Loveland", "hours": { ... }, "phone": "5136773820", "departments": [ { "departmentId": "23", "name": "Drug & General Merchandise" }, { "departmentId": "89", "name": "Western Union" }, { "departmentId": "08", "name": "Floral" }, { "departmentId": "11", "name": "Bank" }, { "departmentId": "17", "name": "Bath" }, { "departmentId": "20", "name": "One Hour Photo" }, { "departmentId": "14", "name": "Optical" }, { "departmentId": "30", "name": "Salad Bar" }, { "departmentId": "55", "name": "Atm" }, { "departmentId": "94", "name": "Pickup" }, { "departmentId": "69", "name": "Online Deli/Bakery Ordering" }, { "departmentId": "99", "name": "Check Cashing" }, { "departmentId": "18", "name": "Books And Magazines" }, { "departmentId": "31", "name": "Coin Star" }, { "departmentId": "44", "name": "Beer" }, { "departmentId": "45", "name": "Wine" }, { "departmentId": "10", "name": "Gas Station", "hours": { ... } }, { "departmentId": "60", "name": "Red Box" }, { "departmentId": "01", "name": "Deli" }, { "departmentId": "09", "name": "Pharmacy", "phone": "5136773400", "hours": { ... } }, { "departmentId": "0C", "name": "Scan, Bag, Go" }, { "departmentId": "32", "name": "Natural And Organics" }, { "departmentId": "02", "name": "Bakery" }, { "departmentId": "03", "name": "Cheese Counter" }, { "departmentId": "04", "name": "Meat Department" }, { "departmentId": "05", "name": "Seafood Department" }, { "departmentId": "21", "name": "Self Checkout" }, { "departmentId": "65", "name": "Money Services" }, { "departmentId": "13", "name": "Cell Phone" }, { "departmentId": "42", "name": "Walk Up Pharmacy" } ] } ], "meta": { ... } } ``` -------------------------------- ### Department query Source: https://developer.kroger.com/documentation/api-products/partner/locations/overview Determines if a specific department exists. ```APIDOC ## Department query ### Description Determines if a specific department exists. ### Method HEAD ### Endpoint /locations/{locationId}/departments/{departmentId} ``` -------------------------------- ### Cart API (Partner) Source: https://developer.kroger.com/api-products The Cart API provides access to create, view, and update a customer's cart for partner integrations. ```APIDOC ## Cart API (Partner) ### Description The Cart API provides access to create, view, and update a customer's cart for partner integrations. ### Last Updated 12/8/2023 ``` -------------------------------- ### Authorization Endpoints (Partner) Source: https://developer.kroger.com/api-products The OAuth2 Authorization endpoints for partner integrations. ```APIDOC ## Authorization Endpoints (Partner) ### Description The OAuth2 Authorization endpoints for partner integrations. ### Last Updated 5/14/2026 ``` -------------------------------- ### Authorization Endpoints (Public) Source: https://developer.kroger.com/api-products The OAuth2 Authorization endpoints for public integrations. ```APIDOC ## Authorization Endpoints (Public) ### Description The OAuth2 Authorization endpoints for public integrations. ### Last Updated 5/14/2026 ``` -------------------------------- ### Product API (Partner) Source: https://developer.kroger.com/api-products The Products API allows partners to search for products in the Kroger product catalog. ```APIDOC ## Product API (Partner) ### Description The Products API allows partners to search for products in the Kroger product catalog. ### Last Updated 10/21/2025 ``` -------------------------------- ### Add to cart Source: https://developer.kroger.com/documentation/api-products/public/cart/overview Allows you to add items to an authenticated customer's cart. ```APIDOC ## Add to cart ### Description Allows you to add items to an authenticated customer's cart. ### Method PUT ### Endpoint /cart/add ### Parameters #### Request Body - **itemId** (string) - Required - The ID of the item to add. - **quantity** (integer) - Required - The number of items to add. ``` -------------------------------- ### Filter Locations by Zip Code and Radius Source: https://developer.kroger.com/documentation/api-products/partner/locations/location-search This snippet demonstrates how to use variable parameters to filter location search results by a specific zip code and a radius in miles. This is useful for tailoring results based on user-provided input. ```bash curl -X GET \ 'https://api.kroger.com/v1/locations&filter.zipCode.near=45140&filter.radiusInMiles=20' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {{TOKEN}}' ``` -------------------------------- ### Catalog API V2 Source: https://developer.kroger.com/api-products Catalog API V2 integration lets partners access Kroger's catalog data via available product endpoints. ```APIDOC ## Catalog API V2 ### Description Catalog API V2 integration lets partners access Kroger's catalog data via available product endpoints. ### Last Updated 6/4/2026 ``` -------------------------------- ### Search Locations by Zip Code Source: https://developer.kroger.com/documentation/api-products/partner/locations/location-search Use this snippet to find locations near a specific zip code. Ensure you have a valid access token. ```curl curl -X GET \ 'https://api.kroger.com/v1/locations&filter.zipCode.near=45140' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {{TOKEN}}' ``` -------------------------------- ### Product API (Public) Source: https://developer.kroger.com/api-products The Products API allows you to search the Kroger product catalog. ```APIDOC ## Product API (Public) ### Description The Products API allows you to search the Kroger product catalog. ### Last Updated 10/21/2025 ``` -------------------------------- ### Chain list Source: https://developer.kroger.com/documentation/api-products/partner/locations/overview Returns a list of all chains owned by The Kroger Co. ```APIDOC ## Chain list ### Description Returns a list of all chains owned by The Kroger Co. ### Method GET ### Endpoint /chains ### Response #### Success Response (200) - **chains** (array) - A list of chain objects. ``` -------------------------------- ### Cart by ID Source: https://developer.kroger.com/documentation/api-products/partner/carts/overview Returns a specific cart by ID. ```APIDOC ## Cart by ID ### Description Returns a specific cart by ID. ### Method GET ### Endpoint /carts/{cart_id} ``` -------------------------------- ### Profile loyalty information Source: https://developer.kroger.com/documentation/api-products/partner/identity/overview Retrieves a customer's loyalty card number. ```APIDOC ## Profile loyalty information ### Description Returns a customer's loyalty card number. ### Method GET ### Endpoint /profile/loyalty ``` -------------------------------- ### Unattended Locker Pickup Source: https://developer.kroger.com/api-products This API is for vendors seeking integration with Kroger as an unattended locker vendor. ```APIDOC ## Unattended Locker Pickup ### Description This API is for vendors seeking integration with Kroger as an unattended locker vendor. ### Last Updated 7/7/2025 ``` -------------------------------- ### Location query Source: https://developer.kroger.com/documentation/api-products/partner/locations/overview Determines if a specific location exists. ```APIDOC ## Location query ### Description Determines if a specific location exists. ### Method HEAD ### Endpoint /locations/{locationId} ``` -------------------------------- ### Seamless Delivery API Source: https://developer.kroger.com/api-products Partner APIs related to integrating with a full-service delivery partner. Previously known as Operations. ```APIDOC ## Seamless Delivery API ### Description Partner APIs related to integrating with a full-service delivery partner. Previously known as Operations. ### Last Updated 4/3/2024 ``` -------------------------------- ### Cart API (Public) Source: https://developer.kroger.com/api-products The Cart API allows you to add an item to an authenticated customer's cart for public integrations. ```APIDOC ## Cart API (Public) ### Description The Cart API allows you to add an item to an authenticated customer's cart for public integrations. ### Last Updated 12/8/2023 ``` -------------------------------- ### Location list Source: https://developer.kroger.com/documentation/api-products/partner/locations/overview Returns a list of locations matching a given criteria. The API does not support pagination and has a default limit of 9999 results, which can be adjusted using `filter.limit`. ```APIDOC ## Location list ### Description Returns a list of locations matching a given criteria. The API does not support pagination and has a default limit of 9999 results, which can be adjusted using `filter.limit`. ### Method GET ### Endpoint /locations ### Parameters #### Query Parameters - **filter.limit** (integer) - Optional - Limits the total number of results for the page (9999 maximum). - **filter.radiusInMiles** (integer) - Optional - Sets the mile radius for location searches (defaults to 10 miles). ### Response #### Success Response (200) - **locations** (array) - A list of location objects. - **chains** (array) - A list of chain objects. - **departments** (array) - A list of department objects. ```