> ## 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 order lines

> Lists affiliate order lines, one per order and SKU, newest first by order create time. Each line carries the attributed `creatorUsername`, collab and campaign ids, `contentId` and the `content` it points at (URL, post time, views, format; null when unknown), `productTitle`, `quantity`, `gmvGross`, `settlementStatus` and commission: `estimatedPaidCommission`, `actualPaidCommission` and `commissionDelta` (actual minus estimated, null until TikTok reports an actual), plus base, partner, shop ads and co-funded bonus pairs. Rates are fractions (0.155 = 15.5%).

Settlement status and actual amounts change until a line settles, roughly 15 to 20 days after delivery. `settlementFinal` is true once a line stops changing. `refunds` is `include` (default), `only` or `exclude`; a refund line is fully returned or `INELIGIBLE`. Filter with `creator_username` or `target_collaboration_id`.

`start_date` and `end_date` are YYYY-MM-DD UTC days, inclusive, at most 365 days apart. `limit` is up to 500 (default 100); pass `nextCursor` back as `cursor` with the same filters. The first page also returns `counts` for the whole window. Narrow a wide window if the call times out.



## OpenAPI

````yaml api-reference/tik-tok-shop-openapi.json GET /tik_tok_shop/affiliate/order_lines
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/order_lines:
    get:
      summary: Affiliate order lines
      description: >-
        Lists affiliate order lines, one per order and SKU, newest first by
        order create time. Each line carries the attributed `creatorUsername`,
        collab and campaign ids, `contentId` and the `content` it points at
        (URL, post time, views, format; null when unknown), `productTitle`,
        `quantity`, `gmvGross`, `settlementStatus` and commission:
        `estimatedPaidCommission`, `actualPaidCommission` and `commissionDelta`
        (actual minus estimated, null until TikTok reports an actual), plus
        base, partner, shop ads and co-funded bonus pairs. Rates are fractions
        (0.155 = 15.5%).


        Settlement status and actual amounts change until a line settles,
        roughly 15 to 20 days after delivery. `settlementFinal` is true once a
        line stops changing. `refunds` is `include` (default), `only` or
        `exclude`; a refund line is fully returned or `INELIGIBLE`. Filter with
        `creator_username` or `target_collaboration_id`.


        `start_date` and `end_date` are YYYY-MM-DD UTC days, inclusive, at most
        365 days apart. `limit` is up to 500 (default 100); pass `nextCursor`
        back as `cursor` with the same filters. The first page also returns
        `counts` for the whole window. Narrow a wide window if the call times
        out.
      parameters:
        - name: start_date
          in: query
          required: true
          schema:
            type: string
          description: >-
            Window start, YYYY-MM-DD INCLUSIVE, UTC day of the order create
            time.
        - name: end_date
          in: query
          required: true
          schema:
            type: string
          description: >-
            Window end, YYYY-MM-DD INCLUSIVE. At most 365 days after start_date,
            same cap as the other affiliate reads.
        - name: creator_username
          in: query
          required: false
          schema:
            type: string
          description: >-
            Only lines attributed to this creator username (exact match, as
            TikTok sent it on the order).
        - name: target_collaboration_id
          in: query
          required: false
          schema:
            type: string
          description: Only lines on this target collaboration.
        - name: refunds
          in: query
          required: false
          schema:
            type: string
            enum:
              - include
              - only
              - exclude
            default: include
          description: >-
            include = every line; only = refund lines (fully_return or
            INELIGIBLE); exclude = everything else. Note the aggregate affiliate
            reads drop INELIGIBLE lines, this one keeps them by default.
            refunds=only has no index behind it: on a shop with few refunds it
            walks the window to fill a page (the last page always walks to the
            window start), so it can be slow on a wide window and may need a
            narrower one.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 500
            default: 100
          description: Lines per page (default 100, max 500).
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: >-
            nextCursor from the previous page, passed back verbatim with the
            same filters.
        - 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: >-
            { window, sweptThrough, lines: [...], nextCursor (null on the last
            page), counts: { lines, refundLines, fullyReturned, ineligible } |
            null, countsStatus, settlementNote }.
          content:
            application/json:
              example:
                window:
                  startDate: '2026-09-01'
                  endDate: '2026-09-07'
                sweptThrough: '2026-09-28T06:00:00.000Z'
                lines:
                  - orderId: '576000000000000001'
                    skuId: '1729000000000000101'
                    orderCreateTime: '2026-09-05T18:22:10.000Z'
                    deliveryTime: '2026-09-09T20:01:00.000Z'
                    productId: '1729000000000000100'
                    productTitle: Example Serum 30ml
                    quantity: 1
                    priceAmount: 24.99
                    gmvGross: 24.99
                    currency: USD
                    creatorUsername: creator_one
                    targetCollaborationId: '7494000000000000001'
                    openCollaborationId: null
                    campaignId: null
                    contentType: VIDEO
                    contentId: '7550000000000000001'
                    content:
                      url: https://cdn.example.com/v/7550000000000000001.mp4
                      postedAt: '2026-09-03T15:00:00.000Z'
                      viewCount: 18234
                      format: VIDEO
                    settlementStatus: SETTLED
                    settlementFinal: true
                    fullyReturn: false
                    refund: false
                    estimatedPaidCommission: 3.75
                    actualPaidCommission: 3.75
                    commissionDelta: 0
                    commissionRate: 0.15
                    partnerCommissionRate: null
                    shopAdsCommissionRate: null
                    commissionModel: null
                    commissionTierSetting: null
                    commissionBase:
                      estimated: 24.99
                      actual: 24.99
                    paidPartnerCommission:
                      estimated: null
                      actual: null
                    paidShopAdsCommission:
                      estimated: null
                      actual: null
                    cofundedCreatorBonus:
                      estimated: null
                      actual: null
                nextCursor: >-
                  WyIyMDI2LTA5LTA1VDE4OjIyOjEwLjAwMFoiLCJleGFtcGxlIiwiY3Vyc29yIl0
                counts:
                  lines: 431
                  refundLines: 12
                  fullyReturned: 9
                  ineligible: 5
                countsStatus: ok
                settlementNote: >-
                  settlementStatus and the actual* amounts change in place until
                  a line settles, which lands roughly 15 to 20 days after
                  delivery. settlementFinal marks lines that have stopped
                  moving. commissionDelta is actual minus estimated and stays
                  null until TikTok reports an actual. Rates are fractions: 0.1
                  is 10%.
        '400':
          description: >-
            Invalid params: missing/malformed dates, a window over 365 days, an
            unknown refunds value, limit out of range, or a malformed cursor
          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.