> ## 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.

# Accounts

> The TikTok Shop accounts the key reads, each with its creator, status, import progress and last sync. Use the ids for `account_ids` on the other endpoints.

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 "https://api.growi.io/api/public/v1/tiktok_shop/creator_analytics/accounts" \
  -H "Authorization: Bearer growi-sk-YOUR-API-KEY"
```


## OpenAPI

````yaml GET /tiktok_shop/creator_analytics/accounts
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/accounts:
    get:
      summary: Accounts
      description: >-
        The TikTok Shop accounts the key reads, each with its creator, status,
        import progress and last sync. Use the ids for `account_ids` on the
        other endpoints.
      parameters:
        - 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
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                ok:
                  value:
                    accounts:
                      - id: 900001
                        username: janedoe
                        avatar_url: https://p16-sign.tiktokcdn-us.com/example/avatar.jpg
                        currency: USD
                        status: active
                        shared: true
                        backfill:
                          status: done
                          history_start: '2024-08-14'
                        last_synced_at: '2026-11-03T22:41:00Z'
                        ledger_version: 1795400000000
                        creator:
                          user_id: 900000001
                          name: Jane Doe
                          email: jane@example.com
                    truncated: false
                  summary: Example
              schema:
                type: object
                properties:
                  accounts:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Growi id of the account
                        username:
                          type: string
                          description: TikTok @handle of the account, without the @
                          nullable: true
                        avatar_url:
                          type: string
                          description: Profile picture of the account
                          nullable: true
                        currency:
                          type: string
                          description: >-
                            Currency the account sells in (null when not known
                            yet)
                          nullable: true
                        status:
                          type: string
                          description: Status
                        shared:
                          type: boolean
                          description: Shared with your organization
                        backfill:
                          type: object
                          properties:
                            status:
                              type: string
                              description: Status
                            history_start:
                              type: string
                              description: First day of the imported history
                              nullable: true
                          description: >-
                            History import: status (pending, running, done or
                            failed) and the first day imported
                        last_synced_at:
                          type: string
                          description: When the account last synced
                          nullable: true
                        ledger_version:
                          type: integer
                          description: Changes whenever new order lines arrive; cache on it
                        creator:
                          type: object
                          properties:
                            user_id:
                              type: integer
                              description: Growi user id of the creator
                            name:
                              type: string
                              description: Name
                              nullable: true
                            email:
                              type: string
                              description: Email of the creator
                              nullable: true
                          description: The Growi creator who linked the account
                          nullable: true
                      description: Accounts covered
                    description: Accounts covered
                  truncated:
                    type: boolean
                    description: >-
                      True when the selection was cut to the newest 5,000
                      accounts
        '401':
          description: >-
            Missing, invalid or revoked API key: `{"error": "Not
            Authenticated"}`
          content:
            application/json:
              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'
              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:
                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'
              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:
                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'
              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:
                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'
              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: 2 seconds between calls and 1,000 creator analytics
            calls per key per hour. See `Retry-After` and the `X-RateLimit-*`
            headers
          content:
            application/json:
              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'
              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
        '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
              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:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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