# Get sales goals data

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/rest/sales-goals/shop/{shopId}:
    get:
      summary: Get sales goals data
      deprecated: false
      description: >-
        Returns sales goal and actual sales (and labor goals) for the given
        Shopify location and date range. Goals are aligned by week (Monday
        start).
      operationId: getSalesGoals
      tags:
        - Sales Goals
        - sales-goals-api
      parameters:
        - name: shopId
          in: path
          description: Shop ID
          required: true
          example: 0
          schema:
            type: integer
        - name: locationId
          in: query
          description: Shopify location ID (required)
          required: true
          schema:
            type: integer
        - name: from
          in: query
          description: Start date (YYYY-MM-DD or UTC ISO datetime) (required)
          required: true
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: End date (YYYY-MM-DD or UTC ISO datetime) (required)
          required: true
          schema:
            type: string
            format: date
      responses:
        '200':
          description: Sales goals and actuals for the location and range
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    examples:
                      - true
                  data:
                    type: object
                    properties:
                      locationId:
                        type: number
                        description: Internal location ID
                      shopifyLocationId:
                        type: number
                        description: Shopify location ID
                      from:
                        type: string
                        description: Range start (YYYY-MM-DD)
                      to:
                        type: string
                        description: Range end (YYYY-MM-DD)
                      weekly:
                        type: array
                        items:
                          type: object
                          properties:
                            weekStart:
                              type: string
                            salesGoal:
                              type: number
                            actualSales:
                              type: number
                            laborCostGoal:
                              type: number
                            laborAmount:
                              type: number
                          x-apidog-orders:
                            - weekStart
                            - salesGoal
                            - actualSales
                            - laborCostGoal
                            - laborAmount
                      totalSalesGoal:
                        type: number
                      totalActualSales:
                        type: number
                      totalLaborCostGoal:
                        type: number
                      totalLaborAmount:
                        type: number
                    x-apidog-orders:
                      - locationId
                      - shopifyLocationId
                      - from
                      - to
                      - weekly
                      - totalSalesGoal
                      - totalActualSales
                      - totalLaborCostGoal
                      - totalLaborAmount
                x-apidog-orders:
                  - success
                  - data
          headers: {}
          x-apidog-name: ''
        '400':
          description: Bad Request (invalid dates or missing params)
          headers: {}
          x-apidog-name: ''
        '404':
          description: Location not found
          headers: {}
          x-apidog-name: ''
        '429':
          description: Rate Limit Exceeded
          headers: {}
          x-apidog-name: ''
      security: []
      x-apidog-folder: Sales Goals
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/763618/apis/api-33094549-run
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

```
