When creating a fulfillment delivery order via the Instacart Connect API, include customer replacement preferences per line item using the item replacements structure.
For each requested item, specify whether the customer prefers: a specific replacement item (provide the replacement item ID), a best-match chosen by the shopper, or no substitution (do not replace if out of stock).
Use the Set Item Replacements endpoint to update replacement preferences after order creation if the customer changes their mind before shopping begins.
Listen for shopper-initiated substitution events via the fulfillment webhooks; these events notify your system when a shopper has selected a replacement for an out-of-stock item.
Surface substitution notifications to the end customer via your branded interface so they can approve or reject the replacement in real time if your flow supports it.
After order completion, reconcile the final item list (including substitutions) against the original order for billing and inventory purposes.
Known gotchas
Customer replacement preferences must be set before the shopper begins picking; once shopping is underway, the ability to update preferences may be restricted depending on the fulfillment state.
Instacart's full-service shopping model means shoppers have discretion to suggest alternatives; even with no-substitution preferences, operational constraints may occasionally result in substitutions — build your UI to handle this gracefully.
Substitution events are fired as webhooks in real time during shopping; if your webhook endpoint is down or slow to respond, you may miss the substitution notification window and the customer will not have the opportunity to approve or reject.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp