In-Store Pickup
The Inventory In-Store Pickup functionality exposes an endpoint that retrieves a list of pickup locations, and another endpoint that notifies the customer that their order is ready for pickup.
Service names:
inventoryInStorePickupApiGetPickupLocationsV1
inventoryInStorePickupSalesApiNotifyOrdersAreReadyForPickupV1
REST endpoints:
GET /V1/inventory/in-store-pickup/pickup-locations
POST /V1/order/notify-orders-are-ready-for-pickup
Search for pickup locations
data-variant=info
data-slots=text
GET /V1/inventory/in-store-pickup/pickup-locations endpoint. Use the pickupLocations query instead.The GET /V1/inventory/in-store-pickup/pickup-locations endpoint searches for and filters on pickup locations, allowing the shopper to quickly narrow the results. The endpoint does not require authentication.
Search terms, filters, and other attributes are specified as query parameters in the URL. This endpoint uses a different syntax than other Adobe Commerce GET calls that send searchCriteria parameters. Instead, the GET /V1/inventory/in-store-pickup/pickup-locations endpoint requires that each query parameter begins with searchRequest. The scopeCode parameter is required. All other parameters are optional.
[scopeCode]=[scopeType]=website.[area][radius]=[area][searchTerm].[area][searchTerm]=[area][radius].[filters][country][value]=country_id.[filters][country][conditionType]=eq.[filters][postcode][value]=postcode.[filters][postcode][conditionType]=eq.[filters][region][value]=region.[filters][region][conditionType]=eq.[filters][city][value]=city.[filters][city][conditionType]=eq.[filters][street][value]=street.[filters][street][conditionType]=eq.[filters][name][value]=name.[filters][name][conditionType]=eq.[filters][pickupLocationCode][value]=[filters][pickupLocationCode][conditionType]=eq.[extensionAttributes][productsInfo][0][sku]=[extensionAttributes][productsInfo][0][extensionAttributes]=[pageSize]=[currentPage]=[sort][0][field]=[sort][0][direction]=ASC) or descending (DESC) order. The default is DESC.Search using REST endpoints provides a full list of supported condition types.
Sample Usage:
GET <host>/rest/<store_code>/V1/inventory/in-store-pickup/pickup-locations
Payload:
Define the payload as part of the GET request string.
searchRequest[area][radius]=1500&
searchRequest[area][searchTerm]=Austin&
searchRequest[scopeCode]=base&
searchRequest[extensionAttributes][productsInfo][0][sku]=SKU1
Response:
Commerce returns Pickup Locations list, search request given and total results count.
{
"items": [
{
"pickup_location_code": "txspeqs",
"name": "Sport Equipment Store",
"email": "sales@company.com",
"contact_name": "Ethan Carter",
"description": "Sport Equipment Store description",
"latitude": 29.7543,
"longitude": -95.3609,
"country_id": "US",
"region_id": 57,
"region": "Texas",
"city": "Houston",
"street": "4631 Airport Blvd #125",
"postcode": "77010",
"phone": "(555) 555-5555"
}
],
"search_request": {
"area": {
"radius": 1500,
"search_term": "Austin"
},
"current_page": 1,
"scope_type": "website",
"scope_code": "base",
"extension_attributes": {
"products_info": [
{
"sku": "SKU1"
}
]
}
},
"total_count": 1
}
Mark an order as ready for pickup
The POST /V1/order/notify-orders-are-ready-for-pickup endpoint creates a shipment and sends an email notifying the customer that the order is ready to be picked up. The endpoint requires appropriate permission to resource Magento_InventoryInStorePickupApi::notify_orders_are_ready_for_pickup.
Sample Usage:
POST <host>/rest/<store_code>/V1/order/notify-orders-are-ready-for-pickup
Payload:
{
"orderIds": [
81
]
}
Response:
Commerce returns an array with success status and an array of error messages for each failed order.
{
"successful": true,
"failed": []
}