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

# Export order lines

> The same order lines as one CSV file for the whole range. One export at a time per API key: a second one while the first is running answers 429. Past the row cap the file stops and the response carries `X-Truncated: true`.

Works with organization keys and creator keys. See [Creator TikTok Shop analytics](https://docs.growi.io/essentials/creator-tiktok-shop-analytics.md) for which accounts each key reads.

```bash theme={"dark"}
curl -o orders.csv "https://api.growi.io/api/public/v1/tiktok_shop/creator_analytics/orders/export?from=2026-11-01&to=2026-11-24" \
  -H "Authorization: Bearer growi-sk-YOUR-API-KEY"
```


## OpenAPI

````yaml GET /tiktok_shop/creator_analytics/orders/export
openapi: 3.0.1
info:
  title: Growi API
  description: >-
    API documentation for Growi platform, showcasing the public tracking event
    endpoint
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.growi.io/api/public/v1
security:
  - bearerAuth: []
paths:
  /tiktok_shop/creator_analytics/orders/export:
    get:
      summary: Export order lines
      description: >-
        The same order lines as one CSV file for the whole range. One export at
        a time per API key: a second one while the first is running answers 429.
        Past the row cap the file stops and the response carries `X-Truncated:
        true`.
      parameters:
        - name: status
          in: query
          required: false
          description: Only these order statuses, comma separated.
          schema:
            type: string
        - name: content_type
          in: query
          required: false
          description: Only this content type.
          schema:
            type: string
        - name: product_id
          in: query
          required: false
          description: Only this product.
          schema:
            type: string
        - name: content_id
          in: query
          required: false
          description: Only this post.
          schema:
            type: string
        - name: user_id
          in: query
          required: false
          description: >-
            One creator. With an organization key: that creator's accounts that
            are shared with you; a creator with none answers 404. With a creator
            key: optional, and only your own user id. Leave it out for every
            account the key can read
          schema:
            type: integer
        - name: account_ids
          in: query
          required: false
          description: >-
            Comma-separated account ids from `GET
            /tiktok_shop/creator_analytics/accounts`, at most 1,000. Narrows the
            selection; any id the key can't read answers 404
          schema:
            type: string
        - name: q
          in: query
          required: false
          description: >-
            Organization keys only, without `user_id`: keep the creators whose
            name, email or @handle contains this. A creator key gets 422
          schema:
            type: string
        - name: exclude_account_ids
          in: query
          required: false
          description: >-
            Organization keys only, without `user_id`: every selected account
            except these. A creator key gets 422
          schema:
            type: string
        - name: organization_id
          in: query
          required: false
          description: >-
            Leave it out. Creators share with your main organization, so a child
            brand answers 403. A creator key gets 422
          schema:
            type: integer
        - name: from
          in: query
          required: false
          description: 'First day, YYYY-MM-DD. Default: the first day of the month.'
          schema:
            type: string
            format: date
        - name: to
          in: query
          required: false
          description: >-
            Last day, YYYY-MM-DD, inclusive. Default: today. At most 3,660 days
            in all.
          schema:
            type: string
            format: date
        - name: tz
          in: query
          required: false
          description: IANA time zone the days are counted in. Default UTC.
          schema:
            type: string
        - name: include_pending
          in: query
          required: false
          description: Count orders that have not settled yet. Default true.
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            text/csv:
              examples:
                csv:
                  value: >
                    order_id,sku_id,account_id,created_at,status,pending,product_id,product_name,brand,content_type,content_id,quantity,price_minor,currency,gmv_minor,commission_minor,estimated_commission_minor,actual_commission_minor,organic_commission_minor,shop_ads_commission_minor,commission_rate_bps,shop_ads_commission_rate_bps,refunded_quantity,returned_quantity,shop_ads

                    577312345678901234,1731234567890123999,900001,2026-11-02T21:14:00Z,TO_SETTLE,true,1731234567890123456,Hydrating
                    Lip Oil,Glow
                    Lab,VIDEO,7590000000000000001,1,2999,USD,2999,450,450,0,450,0,1500,0,0,0,false

                    577312345678900987,1731234567890123999,900001,2026-11-01T19:02:00Z,SETTLED,false,1731234567890123456,Hydrating
                    Lip Oil,Glow
                    Lab,VIDEO,7590000000000000001,2,2999,USD,5998,900,900,900,900,0,1500,0,0,0,false
                  summary: Two order lines
              schema:
                type: string
                description: CSV with a header row, one order line per row
        '401':
          description: >-
            Missing, invalid or revoked API key: `{"error": "Not
            Authenticated"}`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                missing_key:
                  value:
                    error: Not Authenticated
                  summary: Missing, invalid or revoked key
        '403':
          description: >-
            `organization_id` names a child brand. Creators share with your main
            organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                child_brand:
                  value:
                    error:
                      code: forbidden
                      message: >-
                        Creator TikTok Shop data is read with the main
                        organization, not a child brand. Leave out
                        organization_id.
                  summary: organization_id names a child brand
        '404':
          description: A creator, account, post or product this key can't read
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                not_found:
                  value:
                    error:
                      code: not_found
                      message: Not found.
                  summary: Not readable with this key
        '422':
          description: >-
            Invalid params. `error.code` is `invalid_params` and `error.message`
            says which
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                invalid_params:
                  value:
                    error:
                      code: invalid_params
                      message: user_id must be a user id
                  summary: A param that cannot be used
        '429':
          description: >-
            Rate limited, or `export_in_progress`: another export for this API
            key is still running. Wait `Retry-After` seconds
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                interval:
                  value:
                    error: >-
                      Rate limit exceeded. Please wait 2 seconds between
                      requests.
                    retry_after: 2
                  summary: Less than 2 seconds since the last call
                hourly:
                  value:
                    error: Hourly rate limit of 1000 requests exceeded.
                    retry_after: 107
                    reset_time: '2026-11-03T23:00:00Z'
                  summary: Hourly limit reached
                export_in_progress:
                  value:
                    error:
                      code: export_in_progress
                      message: >-
                        Another orders export for this API key is still running.
                        Wait for it to finish, then try again.
                  summary: An export of this key is still running
        '503':
          description: TikTok Shop data is unavailable right now; try again shortly
          content:
            application/json:
              examples:
                data_unavailable:
                  value:
                    error:
                      code: data_unavailable
                      message: >-
                        TikTok Shop data is unavailable right now. Try again
                        shortly.
                  summary: TikTok Shop data unavailable for a moment
            text/csv:
              schema:
                type: object
                properties:
                  error:
                    description: >-
                      A message (authentication and rate limits) or { code,
                      message }
                    oneOf:
                      - type: string
                      - type: object
                        properties:
                          code:
                            type: string
                            description: >-
                              forbidden, not_found, invalid_params,
                              export_in_progress, data_unavailable or
                              internal_error
                          message:
                            type: string
                            description: What went wrong, in plain words
                  retry_after:
                    type: integer
                    description: 'Rate limits only: seconds to wait'
                  reset_time:
                    type: string
                    description: 'Hourly limit only: when the hour resets'
components:
  schemas:
    ApiError:
      type: object
      properties:
        error:
          type: string
          description: What went wrong
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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