# Customer journey of an order

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /{version}/api/order/event:
    post:
      summary: Customer journey of an order
      deprecated: false
      description: ''
      tags:
        - Public API/Store
      parameters:
        - name: version
          in: path
          description: ''
          required: true
          example: v2-4-2
          schema:
            type: string
        - name: ApiKey
          in: header
          description: api secret key
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                order_id:
                  type: string
                  description: The ID of the order
                page:
                  type: integer
                page_size:
                  type: integer
                  description: min:1;max:100
              required:
                - order_id
                - page
                - page_size
              x-apifox-orders:
                - order_id
                - page
                - page_size
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      order_id:
                        type: string
                      total:
                        type: integer
                        description: Total amount of events
                      page:
                        type: integer
                      page_size:
                        type: integer
                      events:
                        type: array
                        items:
                          type: object
                          properties:
                            event_id:
                              type: string
                            event_at:
                              type: string
                              description: Time stamp in YYYYMMDD HH:ii:ss
                            event_page_url:
                              type: string
                              description: The page URL
                            event_page_title:
                              type: string
                              description: The page title
                            event_page_referrer:
                              type: string
                              description: Refferral address from last hop
                            event_page_ip:
                              type: string
                              description: Visitor's IP address
                            event_page_user_agent:
                              type: string
                              description: Visitor's user agent
                            event_campaign:
                              type: string
                              description: The event campaign name
                            event_type:
                              type: string
                              description: >-
                                Event type: ads, Email, social media, organic
                                search, referral, influencer, direct
                            creator:
                              type: object
                              properties:
                                creator_id:
                                  type: string
                                  title: 创造者 ID
                                  description: Influencer id
                                creator_name:
                                  type: string
                                  title: 创造者名称
                                  description: Influencer's name
                                creator_url:
                                  type: string
                                  title: 创造者 url
                                  description: The trackable url
                                creator_short_url:
                                  type: string
                                  title: 创造者短链
                                  description: The trackable short URL
                                creator_origin_url:
                                  type: string
                                  title: 创造者源 url
                                  description: landing_page_url
                                creator_type:
                                  type: string
                                  title: 创造者类型
                                  description: >-
                                    The influencer type: Influencer, affiliate,
                                    newmedia
                                creator_cost:
                                  type: integer
                                  title: 创造者花费
                                  description: The one time cost of this campaign
                                creator_source:
                                  type: string
                                  title: 创造者来源
                                  description: 删除The campaign source
                                creator_campaign:
                                  type: string
                                  title: 创造者系列
                                  description: The campaign name
                                creator_platform:
                                  type: string
                                  title: 创造者平台
                                  description: >-
                                    The platfrom that influencer places the
                                    campaign
                              required:
                                - creator_id
                                - creator_name
                                - creator_url
                                - creator_short_url
                                - creator_origin_url
                                - creator_type
                                - creator_cost
                                - creator_source
                                - creator_campaign
                                - creator_platform
                              x-apifox-orders:
                                - creator_id
                                - creator_name
                                - creator_url
                                - creator_short_url
                                - creator_origin_url
                                - creator_type
                                - creator_cost
                                - creator_source
                                - creator_campaign
                                - creator_platform
                              description: The influencer event detail
                              nullable: true
                            ad:
                              type: object
                              properties:
                                account_id:
                                  type: string
                                  title: 广告账户ID
                                  description: The ad account number
                                account_name:
                                  type: string
                                  title: 广告账户名
                                  description: The ad account name
                                campaign_id:
                                  type: string
                                  title: 广告系列 ID
                                  description: Campaign id
                                campaign_name:
                                  type: string
                                  title: 广告系列名
                                  description: Campaign name
                                set_id:
                                  type: string
                                  title: 广告组ID
                                  description: Ad set id
                                set_name:
                                  type: string
                                  title: 广告组名
                                  description: Ad set name
                                ad_id:
                                  type: string
                                  title: 广告ID
                                  description: Ad id
                                ad_name:
                                  type: string
                                  title: 广告名
                                  description: Ad name
                                keyword:
                                  type: string
                                  title: 关键字
                                  description: The keyword in ad
                                ad_platform:
                                  type: string
                                  title: 广告平台
                                  description: Ad platform
                              required:
                                - account_id
                                - account_name
                                - campaign_id
                                - campaign_name
                                - set_id
                                - set_name
                                - ad_id
                                - ad_name
                                - ad_platform
                                - keyword
                              x-apifox-orders:
                                - account_id
                                - account_name
                                - campaign_id
                                - campaign_name
                                - set_id
                                - set_name
                                - ad_id
                                - ad_name
                                - ad_platform
                                - keyword
                              description: Event detail of ads
                              nullable: true
                            email:
                              type: object
                              properties:
                                receiver_email:
                                  type: string
                                  title: 接收方邮件地址
                                  description: The contact's email address
                                email_platform:
                                  type: string
                                  title: 邮件平台
                                  description: The Email Service Provider
                              required:
                                - receiver_email
                                - email_platform
                              x-apifox-orders:
                                - receiver_email
                                - email_platform
                              description: Email event
                              nullable: true
                            products:
                              type: array
                              items:
                                type: object
                                properties:
                                  other_product_id:
                                    type: string
                                    description: Product id
                                  other_variant_id:
                                    type: string
                                    description: Product variant
                                  product_name:
                                    type: string
                                    description: Product name
                                  variant_name:
                                    type: string
                                    description: Variant name
                                  final_name:
                                    type: string
                                    description: Final name
                                  currency:
                                    type: string
                                    description: The ISO code of the currency.
                                  price:
                                    type: integer
                                    description: The price
                                  quantity:
                                    type: integer
                                    description: Product quantity
                                  shop_currency_price:
                                    type: integer
                                    description: The price in store's currency
                                x-apifox-orders:
                                  - other_product_id
                                  - other_variant_id
                                  - product_name
                                  - variant_name
                                  - final_name
                                  - currency
                                  - price
                                  - shop_currency_price
                                  - quantity
                                description: Item information
                                nullable: true
                              description: Product information
                              nullable: true
                            cart_viewed:
                              type: object
                              properties:
                                currency:
                                  type: string
                                  description: The ISO code of the currency.
                                total_price:
                                  type: integer
                                  description: The total price in the cart
                                total_quantity:
                                  type: integer
                                  description: Total quantity
                                shop_currency_total_price:
                                  type: integer
                                  description: >-
                                    The total price in the cart in store's
                                    currency
                              required:
                                - currency
                                - total_price
                                - shop_currency_total_price
                                - total_quantity
                              x-apifox-orders:
                                - currency
                                - total_price
                                - shop_currency_total_price
                                - total_quantity
                              description: Cart viewed event
                              nullable: true
                            checkout_started:
                              type: object
                              properties:
                                other_order_id:
                                  type: string
                                  description: The ID of the order.
                                other_order_no:
                                  type: string
                                  description: The integer representation of the order
                                currency:
                                  type: string
                                  description: The ISO code of the currency.
                                total_price:
                                  type: integer
                                  description: The total price of the order in USD
                                shop_currency_total_price:
                                  type: integer
                                  description: >-
                                    The total price of the order in store's
                                    currency
                              required:
                                - other_order_id
                                - other_order_no
                                - currency
                                - total_price
                                - shop_currency_total_price
                              x-apifox-orders:
                                - other_order_id
                                - other_order_no
                                - currency
                                - total_price
                                - shop_currency_total_price
                              description: Checkout started event
                              nullable: true
                            checkout_completed:
                              type: object
                              properties:
                                other_order_id:
                                  type: string
                                  description: The ID of the order.
                                other_order_no:
                                  type: string
                                  description: The integer representation of the order
                                currency:
                                  type: string
                                  description: The ISO code of the currency.
                                total_price:
                                  type: integer
                                  description: The total price of the order in USD
                                shop_currency_total_price:
                                  type: integer
                                  description: >-
                                    The total price of the order in store's
                                    currency
                              required:
                                - other_order_id
                                - other_order_no
                                - currency
                                - total_price
                                - shop_currency_total_price
                              x-apifox-orders:
                                - other_order_id
                                - other_order_no
                                - currency
                                - total_price
                                - shop_currency_total_price
                              description: Checkout completed event
                              nullable: true
                            payment_info_submitted:
                              type: object
                              properties:
                                other_order_id:
                                  type: string
                                  description: The ID of the order.
                                other_order_no:
                                  type: string
                                  description: The integer representation of the order
                                currency:
                                  type: string
                                  description: The ISO code of the currency.
                                total_price:
                                  type: integer
                                  description: The total price of the order
                                shop_currency_total_price:
                                  type: integer
                                  description: >-
                                    The total price of the order in store's
                                    currency
                              required:
                                - other_order_id
                                - other_order_no
                                - currency
                                - total_price
                                - shop_currency_total_price
                              x-apifox-orders:
                                - other_order_id
                                - other_order_no
                                - currency
                                - total_price
                                - shop_currency_total_price
                              description: Payment info submitted event
                              nullable: true
                            search_submitted:
                              type: object
                              properties:
                                search_query:
                                  type: string
                                  description: The search term
                              x-apifox-orders:
                                - search_query
                              description: Search submitted event
                              nullable: true
                            social_media:
                              type: object
                              properties:
                                social_media_platform:
                                  type: string
                                  title: 社媒平台
                                  description: The channel name
                              required:
                                - social_media_platform
                              x-apifox-orders:
                                - social_media_platform
                              description: Social media event
                              nullable: true
                            organic_search:
                              type: object
                              properties:
                                organic_search_platform:
                                  type: string
                                  title: 搜索平台
                                  description: The channel name
                                organic_search_query:
                                  type: string
                                  title: 搜索请求
                                  description: The query string
                              required:
                                - organic_search_platform
                                - organic_search_query
                              x-apifox-orders:
                                - organic_search_platform
                                - organic_search_query
                              description: Organic search event
                              nullable: true
                            event_source:
                              type: string
                              description: The traffic source of this event
                            event_medium:
                              type: string
                              description: The medium of this event
                          x-apifox-orders:
                            - event_id
                            - event_at
                            - event_page_url
                            - event_page_title
                            - event_page_referrer
                            - event_page_ip
                            - event_page_user_agent
                            - event_campaign
                            - event_source
                            - event_medium
                            - event_type
                            - creator
                            - ad
                            - email
                            - social_media
                            - organic_search
                            - products
                            - cart_viewed
                            - checkout_started
                            - checkout_completed
                            - payment_info_submitted
                            - search_submitted
                    required:
                      - order_id
                      - total
                      - page
                      - page_size
                      - events
                    x-apifox-orders:
                      - order_id
                      - total
                      - page
                      - page_size
                      - events
                required:
                  - code
                  - message
                  - data
                x-apifox-orders:
                  - code
                  - message
                  - data
              example:
                code: 1
                message: Service succeed
                data:
                  order_id: '5154899656917'
                  shop_currency: USD
                  total: 1
                  page: 1
                  page_size: 20
                  events:
                    - event_id: 9yc5v001000cu0rlqh770iye005p087h
                      event_at: '2023-03-29 08:26:42'
                      event_page_url: >-
                        https://test-xq.myshopify.com/?dm_cam=23852036112060436&dm_grp=23852036112150436&dm_ad=23852036112230436&dm_net=facebook&fbclid=IwAR0BW3u3sOIHRq_R5CfZIUQkie2pWM1Jg0Yc7FHQR5eUWP1nJnDU0UKrRMc
                      event_page_title: Test-Dmap
                      event_page_referrer: ''
                      event_page_ip: 103.105.49.145
                      event_page_user_agent: >-
                        Mozilla/5.0 (Windows NT 10.0; Win64; x64)
                        AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0
                        Safari/537.36
                      event_campaign: Standard Shopping-cam-0103
                      event_source: facebook
                      event_medium: ads
                      event_type: ad
                      creator: null
                      ad:
                        account_id: '628838465542582'
                        account_name: Xq Cecile
                        campaign_id: '23852036112060436'
                        campaign_name: Standard Shopping-cam-0802
                        set_id: '23852036112150436'
                        set_name: Standard Shopping-adset
                        ad_id: '23852036112230436'
                        ad_name: Standard Shopping-ad
                        ad_platform: facebook
                        keyword: ''
                      email: null
                      social_media: null
                      organic_search: null
                      products: null
                      cart_viewed: null
                      checkout_started: null
                      checkout_completed: null
                      payment_info_submitted: null
                      search_submitted: null
          headers: {}
          x-apifox-name: Success
      security: []
      x-apifox-folder: Public API/Store
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/7934002/apis/api-427738726-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://data-api.test.attribuly.com
    description: test
  - url: https://data.api.attribuly.com
    description: prod
security: []

```
