openapi: 3.2.0 info: title: Leaflink Brands API contact: email: support@leaflink.com version: '1.0' description: 'Operations tagged brands across 2 of this provider''s published API definitions: leaflink-api-openapi-original.yml, leaflink-marketplace-v2-openapi-original.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.leaflink.com description: LeafLink API production URL. - url: https://staging-api.leaflink.com description: LeafLink API staging URL. - url: https://app.leaflink.com/api/v2 tags: - name: brands paths: /brands/recommended/{id}: get: operationId: brands_recommended_retrieve parameters: - in: path name: id schema: type: integer description: A unique integer value identifying this brand. required: true - name: LeafLink-Version description: '[API version docs](/api/getting-started/#versioning)' required: false in: header schema: type: string format: date tags: - brands security: - bearerAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/UnifiedRecommendedBrand' description: '' headers: RateLimit-Limit: schema: type: integer description: The requests quota in the time window. RateLimit-Remaining: schema: type: integer description: The remaining requests quota in the current window. RateLimit-Reset: schema: type: integer description: The time remaining in the current window, specified in seconds. RateLimit-Policy: schema: type: string description: The quota policy information. '429': description: Rate Limit Error headers: Retry-After: schema: type: integer description: The time remaining before the rejected request can be tried again, specified in seconds. servers: - url: https://api.leaflink.com description: LeafLink API production URL. - url: https://staging-api.leaflink.com description: LeafLink API staging URL. /brands/: parameters: [] get: operationId: brands_list summary: List brands description: List all brands.

Retrieved per company with the company query parameter or with the following path parameter, /companies/{company_id}/brands/ parameters: - name: company__in in: query description: Filter by a list of company ids. required: false schema: type: string - name: company in: query description: Filter by company id. required: false schema: type: string - name: company_slug in: query description: Filter by a company slug. required: false schema: type: string - name: limit in: query description: Number of results to return per page. required: false schema: type: integer - name: offset in: query description: The initial index from which to return the results. required: false schema: type: integer responses: '200': description: '' content: application/json: schema: type: object properties: count: type: integer next: type: - string - 'null' format: uri previous: type: - string - 'null' format: uri results: type: array items: $ref: '#/components/schemas/BrandResponse' tags: - brands security: - Token: [] servers: - url: https://app.leaflink.com/api/v2 /brands/{id}/: parameters: - name: id in: path description: The id for the brand. required: true schema: type: integer get: operationId: brands_read summary: Retrieve a brand description: Retrieve an individual brand. responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/BrandResponse' tags: - brands security: - Token: [] servers: - url: https://app.leaflink.com/api/v2 components: schemas: SponsorshipItem: type: object description: Serializer for ll.ads.data_models.SponsorshipItem properties: id: type: string impression_url: type: string format: uri click_url: type: string format: uri required: - click_url - id - impression_url UnifiedRecommendedBrand: type: object properties: id: type: integer readOnly: true name: type: string title: Brand Name description: Name of the Brand maxLength: 400 sponsorship: $ref: '#/components/schemas/Sponsorship' image: type: string format: uri required: - id - image - name - sponsorship Sponsorship: type: object description: Serializer for ll.ads.data_models.Sponsorship properties: rank: type: integer provider_id: type: string ad_id: type: string campaign_id: type: string target_url: type: string click_url: type: string creative: type: object additionalProperties: {} impression_url: type: string items: type: array items: $ref: '#/components/schemas/SponsorshipItem' page_load_id: type: string placement: $ref: '#/components/schemas/AdPlacement' target_company_id: type: integer target_user_id: type: integer target_resource_id: type: string target_resource_name: type: string required: - ad_id - campaign_id - click_url - creative - impression_url - items - page_load_id - placement - provider_id - rank - target_company_id - target_resource_id - target_resource_name - target_url - target_user_id AdPlacement: type: object description: Serializer for ll.ads.data_models.AdPlacement properties: id: type: string style: type: string provider: type: string required: - id - provider - style BrandResponse: type: object properties: id: type: integer description: Unique id generated by LeafLink. name: type: string company: description: Id for the company type: integer description: type: string image: description: Logo for the brand type: string format: uri banner: description: Banner image for the brand type: string format: uri securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: 'Authentication is done via access tokens (JWTs). See the [API authentication doc](/api/getting-started/#authentication) for more information. ' tokenAuth: type: apiKey in: header name: Authorization description: Token-based authentication with required prefix "Token" Token: description: 'You must authenticate your requests by including your API key in each request header as described below. Requests should include a header named `Authorization`, with the value `App {MY_API_KEY}`. Note the single space in the header value. Example: `Authorization: App MY_API_KEY` [Learn more about generating your key](https://developer.leaflink.com/brands/api/getting-started/) **Legacy API keys:** If you are not using an Application API key, your authorization header should include the string `Token` and access will be scoped to all companies under which the user exists as a companystaff. Example: `Authorization: Token MY_API_KEY` ' in: header name: Authorization type: apiKey x-refined-from: - leaflink-api-openapi-original.yml - leaflink-marketplace-v2-openapi-original.yml