> ## Documentation Index
> Fetch the complete documentation index at: https://docs.switchyard.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Refresh customer analytics

> Recompute analytics for a specific customer based on their order history.



## OpenAPI

````yaml api-reference/v1/openapi.yaml post /v1/customers/{id}/refresh-analytics
openapi: 3.1.0
info:
  title: Goods API
  version: 1.0.0
  description: >-
    API for Goods grocery operations - scanner app, admin dashboard, and
    customer features
  contact:
    name: Goods Team
    url: https://goods.app
servers:
  - url: http://localhost:3000
    description: Local development
  - url: https://dev.api.switchyard.run
    description: Development
  - url: https://api.switchyard.run
    description: Production
security: []
tags:
  - name: v1
    description: API v1 - unified domain-based endpoints
  - name: Scanner
    description: Scanner app endpoints for drivers and pickers
  - name: Sweeps
    description: Sweep management - retail store pickup operations
  - name: RFC Picks
    description: Ready-for-checkout picking operations
  - name: Inventory
    description: Inventory management and barcode lookup
  - name: Admin
    description: Admin dashboard endpoints
  - name: Orders
    description: Order management
  - name: Products
    description: Product catalog management
  - name: Notifications
    description: Push, email, SMS, and Slack notification management
paths:
  /v1/customers/{id}/refresh-analytics:
    post:
      tags:
        - Customers
      summary: Refresh customer analytics
      description: >-
        Recompute analytics for a specific customer based on their order
        history.
      parameters:
        - schema:
            type: string
            format: uuid
            description: Customer profile UUID
            example: 550e8400-e29b-41d4-a716-446655440000
          required: true
          name: id
          in: path
      responses:
        '200':
          description: Analytics refreshed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  analytics:
                    nullable: true
                  message:
                    type: string
                required:
                  - success
                description: Refresh analytics response
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                required:
                  - error
                description: Error response
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                required:
                  - error
                description: Error response

````