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

# Update affiliate details

> Updates the details of a specific affiliate membership using its ID. You can change the status of the affiliation.

**Usage:** Utilize this endpoint to modify affiliate statuses like changing them to 'approved', 'banned', etc.



## OpenAPI

````yaml patch /affiliates/{id}
openapi: 3.0.0
info:
  title: Blink API
  description: Comprehensive API documentation for Blink.
  version: 1.0.0
servers:
  - url: https://api.blink.store/v1
security: []
paths:
  /affiliates/{id}:
    patch:
      tags:
        - Affiliates
      summary: Update affiliate details
      description: >-
        Updates the details of a specific affiliate membership using its ID. You
        can change the status of the affiliation.


        **Usage:** Utilize this endpoint to modify affiliate statuses like
        changing them to 'approved', 'banned', etc.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AffiliateUpdateRequest'
      responses:
        '200':
          description: Affiliate details updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliateDetailResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
components:
  schemas:
    AffiliateUpdateRequest:
      type: object
      properties:
        status:
          type: string
      required:
        - status
    AffiliateDetailResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            store_id:
              type: string
            program_id:
              type: string
            status:
              type: string
            created_at:
              type: string
              format: date-time
            affiliate:
              type: object
              properties:
                id:
                  type: string
                display_name:
                  type: string
                website:
                  type: string
                social_links:
                  type: string
            stats:
              type: object
              properties:
                conversions:
                  type: integer
                total_revenue:
                  type: number
                total_commission:
                  type: integer
                pending_commission:
                  type: integer

````