openapi: 3.2.0 info: title: Bi API version: 1.0.0 servers: - url: https://api.triplewhale.com tags: - name: bi paths: /api/v2/bi/avg: get: operationId: bi-avg-get responses: '200': description: Ecommerce Ad metrics for the requested period content: application/json: schema: type: object properties: aggregated: $ref: '#/definitions/MetricExampleObj' raw: type: array items: type: object properties: date: type: string format: date metrics: $ref: '#/definitions/MetricExampleObj' required: - date - metrics definitions: MetricExampleObj: type: object properties: pinterest: $ref: '#/definitions/PlatformMetrics' google: $ref: '#/definitions/PlatformMetrics' snapchat: $ref: '#/definitions/PlatformMetrics' tiktok: $ref: '#/definitions/PlatformMetrics' facebook: $ref: '#/definitions/PlatformMetrics' additionalProperties: false PlatformMetrics: type: object properties: ctr: type: number minimum: 0 maximum: 100 description: CTR (Click-Through Rate) in percentage (0-100) cpm: type: number description: CPM (Cost per Thousand Impressions) in USD cpc: type: number description: CPC (Cost per Click) in USD roas: type: number description: ROAS (Return on Ad Spend) calculated as Revenue / Ad Spend mer: type: number description: MER (Marketing Efficiency Ratio) calculated as Ad Spend / Revenue additionalProperties: false parameters: - in: query name: dailyagg schema: type: boolean description: Aggregate results by day default: false required: false - in: query name: platforms schema: type: string description: Ad Platforms to include in data (Facebook, TikTok, Google, Pinterest, Snapchat). Omit if you need all platforms. Supports a pipe-separated list as a string. required: false - in: query name: category schema: type: string description: Shop Industry enum: - art - baby - books - shoes - crafts - clothing - computers - electronics - collectibles - pet_supplies - home_garden - sporting_goods - toys_hobbies - health_beauty - office_products - digital_products - food_beverages - car_truck_parts - jewelry_watches - fashion_accessories - cellphones_accessories - hair_braids required: false default: all - in: query name: aov_segment schema: type: string description: Filters the dataset to shops with a particular average order value in USD. By default all shops are included. enum: - <25 - 25-50 - 50-75 - 75-100 - 100-150 - '>150+' required: false - in: query name: spend_segment schema: type: string description: Filteres the dataset to shops with a particular spend amount per month in thousands of USD. By default all shops are included. enum: - <10K - 10K-20K - 20K-50K - 50K-100K - 100K-250K - '>250K+' required: false - in: query name: start schema: type: string description: Start date required: false - in: query name: end schema: type: string description: End date required: false tags: - bi x-tw: pathPrefix: bi serviceId: bi interfaces: - client x-google-backend: address: https://bi-ipbu2ryima-uc.a.run.app protocol: http/1.1 path_translation: APPEND_PATH_TO_ADDRESS