title: Merchant
type: object
description: Represents a merchant that has been created within the platform.
x-tags:
  - Models
properties:
  uuid:
    type: string
    format: uuid
    description: The merchant's unique identifier.
    readOnly: true
  name:
    type: string
    minLength: 1
    maxLength: 255
    description: The name of the merchant.
    example: Barry's Burgers Pte Ltd
  logo:
    oneOf:
      - type: 'null'
      - $ref: ./Media.yaml
    readOnly: true
  logo_uuid:
    type:
      - string
      - 'null'
    format: uuid
    description: |-
      The UUID of the media file that should be linked as the merchant's logo.

      The referenced media file must be an image and exactly 1024 x 1024 pixels.

      Supplying a value of `null` will unlink any existing logo.
  contact_number:
    $ref: ./PhoneNumber.yaml
  address:
    $ref: ./Address.yaml
  currency_code:
    type: string
    minLength: 3
    maxLength: 3
    example: SGD
    description: The ISO 4217 alpha-3 currency code associated with the outlet.
    readOnly: true
  timezone:
    type: string
    example: Asia/Singapore
    description: The timezone that the outlet operates in.
    readOnly: true
  signup_url:
    type: string
    format: uri
    readOnly: true
    description: |-
      The customer self sign-up URL.

      While this field will always be provided, self sign-up should only be offered if `general_settings.accept_new_members` is `true`.
  general_settings:
    $ref: ./MerchantGeneralSettings.yaml
  capabilities:
    type: object
    readOnly: true
    description: Platform-defined capabilities, available even when the merchant has no message automations or
      WhatsApp connection. Client-supplied capabilities are ignored when editing a merchant.
    required:
      - message_automations
    properties:
      message_automations:
        type: object
        required:
          - supported_params
        properties:
          supported_params:
            $ref: ./MessageAutomation.yaml#/properties/supported_params
  outlets:
    type: array
    uniqueItems: true
    minItems: 1
    items:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          description: The outlet's unique identifier.
          readOnly: true
        name:
          type: string
          minLength: 1
          maxLength: 255
          example: Barry's Burgers
          description: The name of the outlet.
          readOnly: true
        locality:
          type:
            - string
            - 'null'
          minLength: 1
          maxLength: 255
          description: The locality of the outlet (if any).
          example: Downtown One
          readOnly: true
        logo:
          oneOf:
            - type: 'null'
            - $ref: ./Media.yaml
        address:
          $ref: ./Address.yaml
    readOnly: true
  created_at:
    type: string
    format: date-time
    description: The date-time that the merchant was first created.
    readOnly: true
