# Truy xuất thông tin placement

> Truy xuất thông tin về các placement của paywall hoặc onboarding: paywall, phân khúc, đối tượng và A/B test. Điều này có thể giúp bạn đảm bảo mọi thứ được thiết lập đúng mà không cần phải mở từng placement riêng lẻ.
>
> Giới hạn tốc độ: 2 yêu cầu mỗi giây.

## OpenAPI

```yaml
/api-specs/export-analytics-api.yaml post /api/v1/client-api/exports/placements/
openapi: 3.1.0
info:
  title: Adapty Export Analytics API
  version: 1.0.0
  description: |
    Adapty Export Analytics API cho phép bạn xuất dữ liệu phân tích sang định dạng CSV hoặc JSON,
    giúp bạn linh hoạt khám phá sâu hơn các chỉ số hiệu suất của ứng dụng, tùy chỉnh báo cáo
    và phân tích xu hướng theo thời gian. Với API này, bạn có thể dễ dàng truy xuất dữ liệu phân tích
    chi tiết, thuận tiện cho việc theo dõi, chia sẻ và tinh chỉnh thông tin dữ liệu khi cần.
servers:
  - url: https://api-admin.adapty.io
    description: Production server
security:
  - apikeyAuth: []
paths:
  /api/v1/client-api/exports/placements/:
    post:
      summary: Truy xuất thông tin placement
      description: |-
        Truy xuất thông tin về các placement của paywall hoặc onboarding: paywall, phân khúc, đối tượng và A/B test. Điều này có thể giúp bạn đảm bảo mọi thứ được thiết lập đúng mà không cần phải mở từng placement riêng lẻ.

        Giới hạn tốc độ: 2 yêu cầu mỗi giây.
      operationId: retrievePlacementInfo
      security:
        - apikeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PlacementInfoRequest"
            examples:
              basic:
                summary: Yêu cầu thông tin placement cơ bản
                value:
                  filters:
                    placement_type: paywall
      responses:
        "200":
          description: Đã truy xuất thông tin placement thành công
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PlacementInfoResponse"
            text/csv:
              schema:
                type: string
                description: Thông tin placement ở định dạng CSV
        "400":
          description: Yêu cầu không hợp lệ
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Không được phép
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnauthorizedError"
        "429":
          description: Đã vượt quá giới hạn tốc độ. Tối đa 2 yêu cầu mỗi giây cho mỗi API key.
components:
  schemas:
    PlacementInfoRequest:
      type: object
      required:
        - filters
      properties:
        filters:
          type: object
          required:
            - placement_type
          properties:
            placement_type:
              type: string
              enum:
                - paywall
                - onboarding
              description: Lọc các placement nào sẽ được trả về trong phản hồi
    PlacementInfoResponse:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              developer_id:
                type: string
                description: ID placement
              placement_name:
                type: string
                description: Tên placement
              audience_name:
                type: string
                description: Tên đối tượng
              segment_name:
                type: string
                description: ID đối tượng
              cross_placement_ab_test_name:
                type: string
                nullable: true
                description: Tên A/B test xuyên placement
              ab_test_name:
                type: string
                nullable: true
                description: Tên A/B test
              paywall_name:
                type: string
                description: Tên paywall (chỉ trả về nếu placement_type là paywall)
              onboarding_name:
                type: string
                description: Tên onboarding (chỉ trả về nếu placement_type là onboarding)
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              source:
                type: string
              errors:
                type: array
                items:
                  type: string
        error_code:
          type: string
        status_code:
          type: integer
    UnauthorizedError:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              source:
                type: string
              errors:
                type: array
                items:
                  type: string
        error_code:
          type: string
        status_code:
          type: integer
  securitySchemes:
    apikeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: |
        Bạn cần xác thực các yêu cầu API bằng secret API key của mình trong header Authorization.
        Bạn có thể tìm thấy key này trong App Settings. Định dạng là `Api-Key {YOUR_SECRET_API_KEY}`,
        ví dụ: `Api-Key secret_live_...`.
```
