> ## 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.

# Get Deal

Returns a single deal by its ID for a specific offer. Optionally includes related data such as locations, products, resources, and tracking information via query parameters. Note that the relationship object may be empty if the deal has no data for the requested relationship types.


## OpenAPI

````yaml openapi/affiliate-deals.yaml get /affiliates/offers/{offerId}/deals/{dealId}
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/offers/{offerId}/deals/{dealId}:
    get:
      tags:
        - Affiliate Deals
      summary: Get Deal By ID
      parameters:
        - name: offerId
          in: path
          required: true
          description: The numeric ID of the offer.
          schema:
            type: integer
        - name: dealId
          in: path
          required: true
          description: The numeric ID of the deal.
          schema:
            type: integer
        - name: locations
          in: query
          description: Include location restrictions for the deal.
          schema:
            type: boolean
            default: false
        - name: products
          in: query
          description: Include product associations for the deal.
          schema:
            type: boolean
            default: false
        - name: resources
          in: query
          description: Include deal resources (images, links).
          schema:
            type: boolean
            default: false
        - name: trackings
          in: query
          description: Include tracking configurations for the deal.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Deal'
                  - type: object
                    properties:
                      relationship:
                        type: object
                        description: >
                          Related entities for this deal. May be empty if no
                          data exists for the requested relationship types.
                        properties:
                          locations:
                            type: array
                            description: Location restrictions (only if requested).
                            items:
                              type: object
                          products:
                            type: array
                            description: Associated products (only if requested).
                            items:
                              type: object
                          resources:
                            type: array
                            description: Deal resources (only if requested).
                            items:
                              type: object
                          trackings:
                            type: array
                            description: Tracking configurations (only if requested).
                            items:
                              type: object
        '404':
          description: Deal not found or not visible to the authenticated affiliate.
      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

````