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

# Affiliate summary

> Returns the shop's affiliate totals over a date window: `gmvGross`, commission (`commissionBase`, `commissionEstimated`, `commissionActual`), `orders`, `skuOrders`, `itemsSold`, distinct `creators` and `fullyReturnedSkuOrders`, in `currency`.

`start_date` and `end_date` are YYYY-MM-DD UTC days, both inclusive, so pass today as `end_date` to include today. `scope` is `all` (default, every affiliate order) or `growi` (only orders on collabs created through Growi). Served from Growi's synced order data, not a live TikTok call. `sweptThrough` is the time orders are synced through (null if the shop has never synced), so the most recent hours can lag.



## OpenAPI

````yaml api-reference/tik-tok-shop-openapi.json GET /tik_tok_shop/affiliate/summary
openapi: 3.0.3
info:
  title: 'Growi API: TikTok Shop'
  version: 1.0.0
  description: >-
    Generated by scripts/gen_tik_tok_shop.rb from Growi's TikTok Shop route
    table.
servers:
  - url: https://api.growi.io/api/public/v1
security:
  - bearerAuth: []
paths:
  /tik_tok_shop/affiliate/summary:
    get:
      summary: Affiliate summary
      description: >-
        Returns the shop's affiliate totals over a date window: `gmvGross`,
        commission (`commissionBase`, `commissionEstimated`,
        `commissionActual`), `orders`, `skuOrders`, `itemsSold`, distinct
        `creators` and `fullyReturnedSkuOrders`, in `currency`.


        `start_date` and `end_date` are YYYY-MM-DD UTC days, both inclusive, so
        pass today as `end_date` to include today. `scope` is `all` (default,
        every affiliate order) or `growi` (only orders on collabs created
        through Growi). Served from Growi's synced order data, not a live TikTok
        call. `sweptThrough` is the time orders are synced through (null if the
        shop has never synced), so the most recent hours can lag.
      parameters:
        - name: start_date
          in: query
          required: true
          schema:
            type: string
          description: Window start, YYYY-MM-DD INCLUSIVE (local-aggregates convention).
        - name: end_date
          in: query
          required: true
          schema:
            type: string
          description: Window end, YYYY-MM-DD, inclusive.
        - name: scope
          in: query
          required: false
          schema:
            type: string
            enum:
              - all
              - growi
            default: all
          description: >-
            all = every affiliate order in the window; growi = only orders on
            target collabs created through Growi.
        - name: organization_id
          in: query
          required: false
          schema:
            type: integer
          description: >-
            Use the TikTok Shop of this child brand (organization id) of your
            API key's organization
      responses:
        '200':
          description: >-
            Summary totals plus window {startDate, endDate}, scope, and
            sweptThrough (ISO timestamp orders are swept through, null when this
            shop has never swept).
          content:
            application/json:
              example:
                gmvGross: 15234.5
                commissionBase: 14890.1
                commissionEstimated: 1823.44
                commissionActual: 1210.02
                orders: 412
                skuOrders: 431
                itemsSold: 468
                creators: 57
                fullyReturnedSkuOrders: 9
                currency: USD
                window:
                  startDate: '2026-09-01'
                  endDate: '2026-09-07'
                scope: all
                sweptThrough: '2026-09-28T06:00:00.000Z'
        '400':
          description: 'Invalid params: missing/malformed dates'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '404':
          description: >-
            `organization_id` isn't an active child brand of your organization,
            or the record you asked for doesn't exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '422':
          description: >-
            No TikTok Shop is connected for this organization. A parent
            organization whose shops sit on its child brands has to pass
            `organization_id`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '429':
          description: >-
            Rate limited: one call every 2 seconds and an hourly cap per API
            key. See `Retry-After` and the `X-RateLimit-*` headers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
        '502':
          description: >-
            TikTok refused or failed. `error` is a fixed message and `code`
            names the failure when there is one
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TikTokShopError'
components:
  schemas:
    TikTokShopError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: What went wrong
        code:
          type: string
          description: Machine-readable reason, when there is one
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.