Return reasons

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://developer.pattern.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Hub API MCP server": {
    "url": "https://developer.pattern.com/mcp"
  }
}

Close
GET /v1/returns/reasons

Returned units grouped by reason. Warehouse returns use FBM return_reason or Connect refund_reason; Amazon FBA returns use the ledger reason on amazon_returns.

Query parameters

  • start_date string

    ISO date (YYYY-MM-DD), inclusive. Defaults to 30 days before end_date when omitted.

  • end_date string

    ISO date (YYYY-MM-DD), inclusive. Defaults to today when omitted.

  • warehouses[] array

    Filter by Pattern warehouse name. When set, Amazon FBA returns are omitted.

  • vendors[] array

    Filter by vendor name among vendors on the authenticated org.

Responses

  • 200 application/json

    reasons retrieved successfully

    Hide response attributes Show response attributes object
    • reason string Required

      Return reason, or unspecified when none is recorded

    • units integer Required
    • orders integer Required

      Distinct orders for this reason

    • share number Required

      Share of returned units in the window

GET /v1/returns/reasons
curl \
 --request GET 'https://api.pattern.com/hub/v1/returns/reasons' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
  {
    "reason": "string",
    "units": 42,
    "orders": 42,
    "share": 42.0
  }
]