get_endpoints_near_for_return

get_endpoints_near_for_return

Description

Returns all stores capable of receiving returns for selected items, based on sales channel constraints, return windows, and shopper location. Used exclusively in return workflows.


When to Use

  • Customer wants to drop items off in store instead of shipping back.

  • Need to verify return eligibility of stores.

  • Customer wants to find the nearest return-accepting store.


Workflow

  1. Retrieve order to confirm returnable items.

  2. Get customer's preferred drop-off coordinates.

  3. Call tool with ranges of line item groups.

  4. Present eligible endpoints (address, coordinates).

  5. Customer selects store → used by make_return_parcel.


Arguments

Field

Type

Required

Field

Type

Required

sales_channel

string

Yes

order_id

string

Yes

latitude

number

Yes

longitude

number

Yes

radius

integer

Yes

line_item_index_ranges

array

Yes


Input Schema (simplified)

{ "sales_channel": "string", "order_id": "string", "latitude": 48.8566, "longitude": 2.3522, "radius": 50, "line_item_index_ranges": [[0, 0], [2, 3]] }

Output

{ "result": { "endpoints": [ { "id": "store_45", "name": "Paris - Rivoli", "address_lines": ["5 Rue de Rivoli"], "city": "Paris" } ], "searched_radius_km": 50 } }

Sample Prompts

  • “Find return-capable endpoints for order 9988 near Lyon.”

  • “Which stores can accept a return within 30 km?”