# Order First & Last Touchpoint of an order

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /{version}/api/order/attribution-touch:
    post:
      summary: Order First & Last Touchpoint 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_ids:
                  type: array
                  items:
                    type: string
                  title: ''
                  description: >-
                    The IDs of the order, which Up to 20 orders can be retrieved
                    at a time
              required:
                - order_ids
              x-apifox-orders:
                - order_ids
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: 1:success; other:failed
                  message:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        order_id:
                          type: string
                        first_touchpoint:
                          type: object
                          properties:
                            campaign:
                              type: string
                              description: The campaign name
                            channel:
                              type: string
                              description: >-
                                The channel name, available channel is: direct,
                                referral, creator, ad, email, social media,
                                organic search
                            source:
                              type: string
                              description: The traffic source
                            medium:
                              type: string
                              description: The traffic medium
                            time:
                              type: string
                              description: >-
                                Time stamp, the timezone follows your store
                                setting
                          description: First touchpoint(non-direct) of this order
                          required:
                            - campaign
                            - channel
                            - source
                            - medium
                            - time
                          x-apifox-orders:
                            - campaign
                            - channel
                            - source
                            - medium
                            - time
                          nullable: true
                        last_touchpoint:
                          type: object
                          properties:
                            campaign:
                              type: string
                              description: The campaign name
                            channel:
                              type: string
                              description: >-
                                The channel name, available channel is: direct,
                                referral, creator, ad, email, social media,
                                organic search
                            source:
                              type: string
                              description: The traffic source
                            medium:
                              type: string
                              description: The traffic medium
                            time:
                              type: string
                              description: >-
                                Time stamp, the timezone follows your store
                                setting
                          description: Last touchpoint(non-direct) of this order
                          required:
                            - campaign
                            - channel
                            - source
                            - medium
                            - time
                          x-apifox-orders:
                            - campaign
                            - channel
                            - source
                            - medium
                            - time
                          nullable: true
                      x-apifox-orders:
                        - order_id
                        - first_touchpoint
                        - last_touchpoint
                    nullable: true
                required:
                  - code
                  - message
                  - data
                x-apifox-orders:
                  - code
                  - message
                  - data
              example:
                code: 1
                message: Service succeed
                data:
                  - order_id: '5154874786005'
                    first_touchpoint:
                      campaign: direct/--
                      channel: direct
                      source: direct
                      medium: '--'
                      time: '2023-03-29 07:25:56'
                    last_touchpoint:
                      campaign: direct/--
                      channel: direct
                      source: direct
                      medium: '--'
                      time: '2023-03-29 07:25:56'
          headers: {}
          x-apifox-name: Success
        x-200:Failed:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: 1:success; other:failed
                  message:
                    type: string
                  data:
                    type: 'null'
                required:
                  - code
                  - message
                  - data
                x-apifox-orders:
                  - code
                  - message
                  - data
              example:
                code: -10120
                message: Please enter ：[order ID]
                data: null
          headers: {}
          x-apifox-name: Failed
      security: []
      x-apifox-folder: Public API/Store
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/7934002/apis/api-427738727-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://data-api.test.attribuly.com
    description: test
  - url: https://data.api.attribuly.com
    description: prod
security: []

```
