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

# Connection health

> Reports whether the shop is connected to Growi and its data is syncing. `status` is `ok`, `degraded` or `broken`, and `reasons` lists why, each with a `code`, `severity` and a plain-language `message` that is safe to show. `isCollecting` is true when a TikTok data sync finished successfully in the last 24 hours (null when unknown).

The shop is `broken` when it has no working TikTok connection. It is `degraded` when, for example, it is connected without TikTok's official API, the seller's TikTok authorization has expired or expires within 7 days (the seller has to reconnect), the Seller Center login has expired, or a data sync keeps failing. `sync` shows the last run, last success and last failure for each data type over the past 30 days. This call doesn't contact TikTok; it reflects what Growi last saw.



## OpenAPI

````yaml api-reference/tik-tok-shop-openapi.json GET /tik_tok_shop/connection_health
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/connection_health:
    get:
      summary: Connection health
      description: >-
        Reports whether the shop is connected to Growi and its data is syncing.
        `status` is `ok`, `degraded` or `broken`, and `reasons` lists why, each
        with a `code`, `severity` and a plain-language `message` that is safe to
        show. `isCollecting` is true when a TikTok data sync finished
        successfully in the last 24 hours (null when unknown).


        The shop is `broken` when it has no working TikTok connection. It is
        `degraded` when, for example, it is connected without TikTok's official
        API, the seller's TikTok authorization has expired or expires within 7
        days (the seller has to reconnect), the Seller Center login has expired,
        or a data sync keeps failing. `sync` shows the last run, last success
        and last failure for each data type over the past 30 days. This call
        doesn't contact TikTok; it reflects what Growi last saw.
      parameters:
        - 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: The shop's connection health
          content:
            application/json:
              schema:
                type: object
                required:
                  - shopId
                  - checkedAt
                  - status
                  - isCollecting
                  - reasons
                  - region
                  - official
                  - web
                  - deadShopGated
                  - sync
                  - rateLimit
                properties:
                  shopId:
                    type: string
                  checkedAt:
                    type: string
                    format: date-time
                  status:
                    type: string
                    enum:
                      - ok
                      - degraded
                      - broken
                    description: >-
                      Worked out from `reasons`: any broken reason makes it
                      broken, any other reason makes it degraded.
                  isCollecting:
                    type: boolean
                    nullable: true
                    description: >-
                      True when a sync with TikTok finished in the last 24
                      hours. null when that can't be read.
                  reasons:
                    type: array
                    items:
                      type: object
                      required:
                        - code
                        - severity
                        - message
                      properties:
                        code:
                          type: string
                          enum:
                            - dead_shop_gated
                            - no_credentials
                            - official_token_missing
                            - refresh_token_expired
                            - refresh_token_expiring
                            - web_session_expired
                            - sync_quarantined
                            - sync_failing
                            - not_collecting
                            - signal_unavailable
                        severity:
                          type: string
                          enum:
                            - broken
                            - degraded
                        message:
                          type: string
                          description: Plain-language explanation, safe to show.
                        kind:
                          type: string
                          description: The sync kind, on sync_quarantined and sync_failing.
                        signal:
                          type: string
                          enum:
                            - credentials
                            - constraints
                            - sync
                          description: >-
                            The signal that could not be read, on
                            signal_unavailable.
                  region:
                    type: string
                    nullable: true
                  official:
                    type: object
                    nullable: true
                    description: null when the directory could not be read.
                    required:
                      - tokenPresent
                      - accessTokenExpiresAt
                      - refreshTokenExpiresAt
                      - refreshTokenExpired
                    properties:
                      tokenPresent:
                        type: boolean
                      accessTokenExpiresAt:
                        type: string
                        nullable: true
                        format: date-time
                      refreshTokenExpiresAt:
                        type: string
                        nullable: true
                        format: date-time
                      refreshTokenExpired:
                        type: boolean
                        nullable: true
                        description: >-
                          Past its expiry. The 1h skew grace applies only to the
                          dead-shop gate.
                  web:
                    type: object
                    required:
                      - cookiePresent
                      - sessionExpired
                      - lastQuotaReadAt
                      - lastQuotaReadAgeSeconds
                    properties:
                      cookiePresent:
                        type: boolean
                        nullable: true
                      sessionExpired:
                        type: boolean
                        nullable: true
                        description: >-
                          true only when this pod's live quota read in the past
                          5 minutes got 98001002 (US). false is not proof the
                          login works.
                      lastQuotaReadAt:
                        type: string
                        format: date-time
                        nullable: true
                        description: >-
                          The last successful seller-center quota read (the
                          /constraints snapshot).
                      lastQuotaReadAgeSeconds:
                        type: integer
                        nullable: true
                  deadShopGated:
                    type: boolean
                    nullable: true
                    description: >-
                      True when both of the shop's TikTok tokens expired over an
                      hour ago and there's no Seller Center session, so syncing
                      is paused until the seller reconnects. Rechecked every 5
                      minutes.
                  sync:
                    type: object
                    nullable: true
                    description: >-
                      Keyed by sync kind (samples, showcase, content,
                      attribution, segments, videos, orders, gmv_scrape,
                      gmv_creator_products, gmv_parity). Success and failure
                      look back 30 days.
                    additionalProperties:
                      type: object
                      required:
                        - lastRun
                        - lastSuccessAt
                        - lastFailureAt
                        - lastError
                        - quarantined
                      properties:
                        lastRun:
                          type: object
                          nullable: true
                          properties:
                            status:
                              type: string
                              enum:
                                - running
                                - ok
                                - failed
                            startedAt:
                              type: string
                              format: date-time
                            finishedAt:
                              type: string
                              nullable: true
                              format: date-time
                        lastSuccessAt:
                          type: string
                          nullable: true
                          format: date-time
                        lastFailureAt:
                          type: string
                          nullable: true
                          format: date-time
                        lastError:
                          type: string
                          nullable: true
                          description: >-
                            The newest failed run's short error message, cut to
                            300 characters. Per-route failure detail is internal
                            and never returned.
                        quarantined:
                          type: boolean
                  rateLimit:
                    type: object
                    nullable: true
                    properties:
                      source:
                        type: string
                        enum:
                          - redis
                          - memory-degraded
                          - unconfigured
                      waitingTiers:
                        type: array
                        description: >-
                          Endpoint tiers whose next slot for this shop is in the
                          future.
                        items:
                          type: object
                          properties:
                            tier:
                              type: string
                            nextSlotInMs:
                              type: integer
              example:
                shopId: '7494000000000000123'
                checkedAt: '2026-09-28T16:00:00.000Z'
                status: degraded
                isCollecting: true
                reasons:
                  - code: refresh_token_expiring
                    severity: degraded
                    message: >-
                      The refresh token expires at 2026-10-02T12:00:00.000Z.
                      Refreshing does not extend it; the seller has to reconnect
                      before then.
                region: US
                official:
                  tokenPresent: true
                  accessTokenExpiresAt: '2026-10-05T12:00:00.000Z'
                  refreshTokenExpiresAt: '2026-10-02T12:00:00.000Z'
                  refreshTokenExpired: false
                web:
                  cookiePresent: true
                  sessionExpired: false
                  lastQuotaReadAt: '2026-09-28T15:45:10.000Z'
                  lastQuotaReadAgeSeconds: 890
                deadShopGated: false
                sync:
                  samples:
                    lastRun:
                      status: ok
                      startedAt: '2026-09-28T15:00:00.000Z'
                      finishedAt: '2026-09-28T15:04:12.000Z'
                    lastSuccessAt: '2026-09-28T15:04:12.000Z'
                    lastFailureAt: null
                    lastError: null
                    quarantined: false
                  orders:
                    lastRun:
                      status: ok
                      startedAt: '2026-09-28T14:30:00.000Z'
                      finishedAt: '2026-09-28T14:36:40.000Z'
                    lastSuccessAt: '2026-09-28T14:36:40.000Z'
                    lastFailureAt: '2026-09-20T02:30:10.000Z'
                    lastError: orders sweep timed out
                    quarantined: false
                rateLimit:
                  source: redis
                  waitingTiers: []
        '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`. Also returned when the shop isn't connected
            through TikTok's official API (`code: unsupported_on_web_only_shop`)
          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.