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

# Update merchant account profile



## OpenAPI

````yaml /openapi.json patch /merchant
openapi: 3.1.0
info:
  title: AgentRef REST API
  version: 1.0.0
  description: >-
    REST API v1 for merchants and affiliates. Authentication via API keys
    (Authorization: Bearer ak_...).
servers:
  - url: /api/v1
    description: Current API version
security:
  - ApiKeyAuth: []
tags:
  - name: Auth
  - name: Onboarding
  - name: Programs
  - name: Merchant
  - name: Applications
  - name: Affiliates
  - name: Me
  - name: Coupons
  - name: Invites
  - name: Conversions
  - name: Payouts
  - name: Flags
  - name: Billing
  - name: Marketplace
  - name: Marketing Resources
  - name: Notifications
  - name: Webhooks
  - name: Docs
  - name: Meta
paths:
  /merchant:
    patch:
      tags:
        - Merchant
      summary: Update merchant account profile
      operationId: updateMerchant
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMerchantInput'
      responses:
        '200':
          description: Updated merchant account profile
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/MerchantProfile'
                  meta:
                    $ref: '#/components/schemas/RequestMeta'
                required:
                  - data
                  - meta
components:
  schemas:
    UpdateMerchantInput:
      type: object
      properties:
        companyName:
          type: string
          minLength: 1
          maxLength: 100
        logoUrl:
          anyOf:
            - type: string
              format: uri
            - type: string
              enum:
                - ''
        billingAddressLine1:
          anyOf:
            - type: string
              maxLength: 200
            - type: string
              enum:
                - ''
        billingAddressLine2:
          anyOf:
            - type: string
              maxLength: 200
            - type: string
              enum:
                - ''
        billingCity:
          anyOf:
            - type: string
              maxLength: 100
            - type: string
              enum:
                - ''
        billingState:
          anyOf:
            - type: string
              maxLength: 100
            - type: string
              enum:
                - ''
        billingPostalCode:
          anyOf:
            - type: string
              maxLength: 20
            - type: string
              enum:
                - ''
        billingCountry:
          anyOf:
            - type: string
              maxLength: 2
            - type: string
              enum:
                - ''
        billingVatId:
          anyOf:
            - type: string
              maxLength: 50
            - type: string
              enum:
                - ''
        billingTaxId:
          anyOf:
            - type: string
              maxLength: 50
            - type: string
              enum:
                - ''
        selfBillingConsent:
          type: boolean
        timezone:
          type: string
        defaultCookieDuration:
          type: number
          minimum: 1
          maximum: 365
        defaultPayoutThreshold:
          type: number
          minimum: 1000
          maximum: 100000
        trackingRequiresConsent:
          type: boolean
        trackingParamAliases:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 64
          maxItems: 10
    MerchantProfile:
      type: object
      properties:
        id:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        companyName:
          type: string
        logoUrl:
          type:
            - string
            - 'null'
          format: uri
        billingAddressLine1:
          type:
            - string
            - 'null'
        billingAddressLine2:
          type:
            - string
            - 'null'
        billingCity:
          type:
            - string
            - 'null'
        billingState:
          type:
            - string
            - 'null'
        billingPostalCode:
          type:
            - string
            - 'null'
        billingCountry:
          type:
            - string
            - 'null'
        billingVatId:
          type:
            - string
            - 'null'
        billingTaxId:
          type:
            - string
            - 'null'
        selfBillingConsentAt:
          type:
            - string
            - 'null'
          format: date-time
        billingTier:
          type: string
        billingRequirementStatus:
          type: string
          enum:
            - not_required
            - required
            - grace_period
            - restricted
            - active
        paymentStatus:
          type: string
        lastPaymentFailedAt:
          type:
            - string
            - 'null'
          format: date-time
        defaultCookieDuration:
          type: integer
        defaultPayoutThreshold:
          type: integer
        timezone:
          type: string
        trackingRequiresConsent:
          type: boolean
        trackingParamAliases:
          type: array
          items:
            type: string
        notificationPreferences:
          type:
            - object
            - 'null'
          additionalProperties:
            type: boolean
        onboardingCompleted:
          type: boolean
        onboardingStep:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - userId
        - companyName
        - logoUrl
        - billingAddressLine1
        - billingAddressLine2
        - billingCity
        - billingState
        - billingPostalCode
        - billingCountry
        - billingVatId
        - billingTaxId
        - selfBillingConsentAt
        - billingTier
        - billingRequirementStatus
        - paymentStatus
        - lastPaymentFailedAt
        - defaultCookieDuration
        - defaultPayoutThreshold
        - timezone
        - trackingRequiresConsent
        - trackingParamAliases
        - notificationPreferences
        - onboardingCompleted
        - onboardingStep
        - createdAt
        - updatedAt
    RequestMeta:
      type: object
      properties:
        requestId:
          type: string
      required:
        - requestId
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use API key as Bearer token, for example: Bearer ak_live_xxx'

````