# Querying  orders  by a campaign

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /{version}/api/all-attribution/info:
    post:
      summary: Querying  orders  by a campaign
      deprecated: false
      description: |-
        - Obtain a detailed attribution report
        - Rate limits: 5 requests per second.
        - version: v2-4-2.
      tags:
        - Public API/Attribution/All
      parameters:
        - name: version
          in: path
          description: ''
          required: true
          example: v2-4-2
          schema:
            type: string
        - name: ApiKey
          in: header
          description: ''
          required: true
          example: '{{ApiKey}}'
          schema:
            type: string
            default: '{{ApiKey}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                start_date:
                  type: string
                  description: >-
                    The start date range of the event in ISO format, e.g.
                    1970-01-01, the time zone should be consistent with your
                    store settings.
                end_date:
                  type: string
                  description: >-
                    The end date of the event in ISO format, e.g. 1970-01-01,
                    the time zone should be consistent with your store
                    settings.If you want to see the data for 1970-01-01, please
                    enter 1970-01-02.
                dimensions:
                  type: array
                  items:
                    type: string
                    description: |-
                      - campaign
                      - channel
                      - source
                      - medium
                      - landing_page
                  description: >-
                    The input quantity should not exceed 3,
                    campaign/channel/source/medium/landing_page.
                model:
                  type: string
                  description: >-
                    - First click

                    - Last click

                    - Linear

                    - Position

                    - Full Impact

                    - For other values, please refer to the “name” section in
                    the API documentation
                    (https://developer.attribuly.com/api-429980012)
                goal:
                  type: string
                  description: |-
                    - purchase 
                    - add_to_cart
                orders:
                  type: array
                  items:
                    type: object
                    properties:
                      column:
                        type: string
                        description: '- conversion_at'
                      order:
                        type: string
                        description: |-
                          - asc
                          - desc
                    x-apifox-orders:
                      - column
                      - order
                  description: the default order is conversion_at desc.
                page:
                  type: integer
                  description: page 1
                page_size:
                  type: integer
                  description: min:1,max:20
                unique_feature:
                  type: array
                  items:
                    type: object
                    properties:
                      campaign:
                        type: string
                        description: campaign name
                    x-apifox-orders:
                      - campaign
                    required:
                      - campaign
              required:
                - start_date
                - end_date
                - dimensions
                - model
                - goal
                - page
                - page_size
                - unique_feature
              x-apifox-orders:
                - start_date
                - end_date
                - dimensions
                - model
                - goal
                - orders
                - page
                - page_size
                - unique_feature
            example:
              start_date: '2026-03-01'
              end_date: '2026-03-18'
              dimensions:
                - campaign
              model: Linear
              goal: purchase
              orders:
                - column: conversion_at
                  order: desc
              unique_feature:
                - campaign: my google campaign name
              page: 1
              page_size: 20
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      total:
                        type: integer
                      page_size:
                        type: integer
                      records:
                        type: array
                        items:
                          type: object
                          properties:
                            event_final_user_id:
                              type: string
                            target_event_id:
                              type: string
                            target_event_type:
                              type: string
                            conversion_at:
                              type: string
                              description: Order created at
                            conversions:
                              type: integer
                            conversion_value:
                              type: number
                            conversion_count:
                              type: integer
                            user_name:
                              type: string
                            user_email:
                              type: string
                            order_number:
                              type: string
                            order_id:
                              type: string
                            order_name:
                              type: string
                            is_repeat:
                              type: boolean
                            is_new_customer:
                              type: integer
                            total_price:
                              type: number
                              description: Total price
                            total_discount:
                              type: integer
                              description: Total discount
                            quantity:
                              type: integer
                              description: Quantity
                            order_items:
                              type: array
                              items:
                                type: object
                                properties:
                                  product_id:
                                    type: string
                                    description: Product id
                                  variant_id:
                                    type: string
                                    description: Variant id
                                  name:
                                    type: string
                                    description: Product name
                                  title:
                                    type: string
                                    description: Product title
                                  sku:
                                    type: string
                                    description: Sku
                                  quantity:
                                    type: integer
                                    description: Quantity
                                  total_price:
                                    type: number
                                    description: Total price
                                  total_discount:
                                    type: integer
                                    description: Total Discount
                                required:
                                  - product_id
                                  - variant_id
                                  - name
                                  - title
                                  - sku
                                  - quantity
                                  - total_price
                                  - total_discount
                                x-apifox-orders:
                                  - product_id
                                  - variant_id
                                  - name
                                  - title
                                  - sku
                                  - quantity
                                  - total_price
                                  - total_discount
                              description: Product list
                          required:
                            - event_final_user_id
                            - target_event_id
                            - target_event_type
                            - conversion_at
                            - conversions
                            - conversion_value
                            - conversion_count
                            - user_name
                            - user_email
                            - order_number
                            - order_id
                            - order_name
                            - is_repeat
                            - is_new_customer
                            - total_price
                            - total_discount
                            - quantity
                            - order_items
                          x-apifox-orders:
                            - event_final_user_id
                            - target_event_id
                            - target_event_type
                            - conversion_at
                            - conversions
                            - conversion_value
                            - conversion_count
                            - user_name
                            - user_email
                            - order_number
                            - order_id
                            - order_name
                            - is_repeat
                            - is_new_customer
                            - total_price
                            - total_discount
                            - quantity
                            - order_items
                    required:
                      - total
                      - page_size
                      - records
                    x-apifox-orders:
                      - total
                      - page_size
                      - records
                required:
                  - code
                  - message
                  - data
                x-apifox-orders:
                  - code
                  - message
                  - data
              example:
                code: 1
                message: Service succeed
                data:
                  total: 3
                  page_size: 20
                  records:
                    - event_final_user_id: '702'
                      target_event_id: ''
                      target_event_type: ''
                      conversion_at: '2026-04-15 18:45:17'
                      conversions: 1
                      conversion_value: 55.88
                      conversion_count: 0
                      user_name: Eulalie Perseus
                      user_email: EulaliePerseus@example.com
                      order_number: '1582'
                      order_id: '6717168124117'
                      order_name: X1582-A
                      is_repeat: false
                      is_new_customer: 1
                      total_price: 55.88
                      total_discount: 0
                      quantity: 3
                      order_items:
                        - product_id: '7897433309397'
                          variant_id: '43728958423253'
                          name: APPLE PINK LADY ORGANIC - 1.0KG
                          title: APPLE PINK LADY ORGANIC
                          sku: apple-01
                          quantity: 3
                          total_price: 28.47
                          total_discount: 0
                    - event_final_user_id: '701'
                      target_event_id: ''
                      target_event_type: ''
                      conversion_at: '2026-04-15 18:35:49'
                      conversions: 0.3333
                      conversion_value: 49.08
                      conversion_count: 0
                      user_name: Quintana Malloren
                      user_email: QuintanaMalloren@example.com
                      order_number: '1581'
                      order_id: '6717161767125'
                      order_name: X1581-A
                      is_repeat: false
                      is_new_customer: 1
                      total_price: 147.26
                      total_discount: 0
                      quantity: 3
                      order_items:
                        - product_id: '7897486295253'
                          variant_id: '43729074487509'
                          name: APPLE GRANNY SMITH BOX
                          title: APPLE GRANNY SMITH BOX
                          sku: ''
                          quantity: 3
                          total_price: 108
                          total_discount: 0
                    - event_final_user_id: '701'
                      target_event_id: ''
                      target_event_type: ''
                      conversion_at: '2026-04-15 18:28:34'
                      conversions: 0.5
                      conversion_value: 21.25
                      conversion_count: 0
                      user_name: Quintana Malloren
                      user_email: QuintanaMalloren@example.com
                      order_number: '1580'
                      order_id: '6717157245141'
                      order_name: X1580-A
                      is_repeat: false
                      is_new_customer: 1
                      total_price: 42.51
                      total_discount: 0
                      quantity: 2
                      order_items:
                        - product_id: '7889490018517'
                          variant_id: '43702138437845'
                          name: 180 DEGREES CHEESE BITES 150G
                          title: 180 DEGREES CHEESE BITES 150G
                          sku: G-01
                          quantity: 2
                          total_price: 18.98
                          total_discount: 0
          headers: {}
          x-apifox-name: Success
      security: []
      x-apifox-folder: Public API/Attribution/All
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/7934002/apis/api-443175298-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://data-api.test.attribuly.com
    description: test
  - url: https://data.api.attribuly.com
    description: prod
security: []

```
