Return rate

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/rate

Warehouse return rate: Pattern warehouse returned units divided by departed shipped units in the same window. Amazon FBA returns are excluded from this ratio because they have no matching warehouse shipped denominator.

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

    rate retrieved successfully

    Hide response attributes Show response attributes object
    • returned_units integer Required

      Pattern warehouse returned units

    • shipped_units integer Required

      Departed warehouse order units

    • rate number | null

      returned_units / shipped_units, or null when nothing shipped

    • rate_pct number | null

      Rate as a percentage

GET /v1/returns/rate
curl \
 --request GET 'https://api.pattern.com/hub/v1/returns/rate' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "returned_units": 42,
  "shipped_units": 42,
  "rate": 42.0,
  "rate_pct": 42.0
}