> ## Documentation Index
> Fetch the complete documentation index at: https://developers.everflow.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Search All Deals

Fetch all deals across offers with optional filtering by offer IDs. Returns deals with their relationships including associated resources and offers. Results are paginated.


## OpenAPI

````yaml openapi/affiliate-deals.yaml post /affiliates/deals
openapi: 3.0.3
info:
  title: Everflow Affiliate API - Deals
  description: >
    Deal endpoints for the Everflow Affiliate API. Affiliates can retrieve deals
    associated with offers they are authorized to promote, including coupon
    codes, discount details, and deal validity periods. For more detail, see
    [Managing Deals
    (Discounts)](https://helpdesk.everflow.io/customer/managing-deals-discounts)
    in the Help Center.
  version: 1.0.0
servers:
  - description: Production Server
    url: https://api.eflow.team/v1
security: []
tags:
  - name: Affiliate Deals
    description: Endpoints for retrieving deal information as an affiliate.
paths:
  /affiliates/deals:
    post:
      tags:
        - Affiliate Deals
      summary: Get All Deals
      requestBody:
        required: true
        content:
          application/json:
            example:
              network_offer_ids:
                - 1
                - 2
                - 3
              page: 1
              page_size: 50
            schema:
              type: object
              properties:
                network_offer_ids:
                  type: array
                  description: >
                    Optional list of offer IDs to filter deals by. If omitted,
                    returns deals for all offers the affiliate can access.
                  items:
                    type: integer
                page:
                  type: integer
                  description: Page number for pagination (1-based).
                  default: 1
                page_size:
                  type: integer
                  description: Number of results per page.
                  default: 50
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  deals:
                    type: array
                    description: Array of deals matching the filter criteria.
                    items:
                      allOf:
                        - $ref: '#/components/schemas/Deal'
                        - type: object
                          properties:
                            relationship:
                              type: object
                              description: Related entities for this deal.
                              properties:
                                deal_resources:
                                  type: array
                                  description: >-
                                    Resources associated with the deal (images,
                                    links, etc.).
                                  items:
                                    type: object
                                has_products:
                                  type: boolean
                                  description: Whether the deal has associated products.
                                offers:
                                  type: array
                                  description: Offers associated with this deal.
                                  items:
                                    type: object
                                    properties:
                                      network_offer_id:
                                        type: integer
                                      name:
                                        type: string
                  paging:
                    type: object
                    description: Pagination metadata.
                    properties:
                      page:
                        type: integer
                      page_size:
                        type: integer
                      total_count:
                        type: integer
      security:
        - API Key: []
components:
  schemas:
    Deal:
      type: object
      required:
        - network_advertiser_deal_id
        - name
        - deal_type
        - deal_status
        - deal_categories
      properties:
        network_advertiser_deal_id:
          type: integer
          description: Unique identifier for the deal.
        network_id:
          type: integer
          description: Network ID the deal belongs to.
        name:
          type: string
          description: Deal name.
        description:
          type: string
          description: Deal description.
        brand_name:
          type: string
          description: Brand associated with the deal.
        deal_type:
          type: string
          description: Type of deal (e.g. coupon, promotion, sale).
        deal_status:
          type: string
          description: Current status of the deal (active, paused, expired).
        deal_categories:
          type: array
          description: Categories assigned to the deal.
          items:
            type: string
        scope:
          type: string
          description: Scope of the deal.
        restrictions:
          type: string
          description: Any restrictions that apply to the deal.
        coupon_code:
          type: string
          description: Coupon code associated with the deal, if applicable.
        coupon_code_discount_amount:
          type: number
          description: Flat discount amount for the coupon code.
        coupon_code_discount_percentage:
          type: number
          description: Percentage discount for the coupon code.
        coupon_code_discount_currency_id:
          type: string
          description: Currency ID for the coupon code discount amount.
        threshold_amount:
          type: number
          description: Minimum purchase amount threshold to activate the deal.
        threshold_amount_currency_id:
          type: string
          description: Currency ID for the threshold amount.
        threshold_quantity:
          type: integer
          description: Minimum quantity threshold to activate the deal.
        purchase_limit_amount:
          type: number
          description: Maximum purchase amount for the deal.
        purchase_limit_amount_currency_id:
          type: string
          description: Currency ID for the purchase limit amount.
        purchase_limit_quantity:
          type: integer
          description: Maximum quantity limit for the deal.
        date_valid_from:
          type: string
          format: date-time
          description: Start date and time when the deal becomes valid.
        date_valid_to:
          type: string
          format: date-time
          description: End date and time when the deal expires.
        date_valid_timezone_id:
          type: integer
          description: Timezone ID for the deal validity dates.
        time_created:
          type: integer
          example: 1734455015
          description: Unix timestamp when the deal was created.
        time_saved:
          type: integer
          example: 1734455015
          description: Unix timestamp when the deal was last saved.
        time_deleted:
          type: integer
          example: 1734455015
          description: Unix timestamp when the deal was deleted. 0 if not deleted.
        relationship:
          type: object
          description: Related entities for this deal.
  securitySchemes:
    API Key:
      description: >
        The affiliate's API key generated from the Affiliate Portal. Uses the
        X-Eflow-Api-Key header.
      in: header
      name: X-Eflow-Api-Key
      type: apiKey

````