{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/marsello/main/json-schema/marsello-customer-create-model-schema.json",
  "title": "CustomerCreateModel",
  "description": "Create a new membership at a given merchant",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/marsello-loyalty-api-v1.json#/components/schemas/CustomerCreateModel",
  "required": [
    "email"
  ],
  "type": "object",
  "properties": {
    "cardNumber": {
      "type": [
        "string",
        "null"
      ],
      "description": "User to add (by card)"
    },
    "email": {
      "minLength": 1,
      "type": "string",
      "description": "User to add (by email)",
      "format": "email"
    },
    "phone": {
      "type": [
        "string",
        "null"
      ],
      "description": "User to add (by phone)"
    },
    "firstName": {
      "type": [
        "string",
        "null"
      ],
      "description": "Customer's first name"
    },
    "lastName": {
      "type": [
        "string",
        "null"
      ],
      "description": "Customer's last name"
    },
    "subscribed": {
      "type": "boolean",
      "description": "This customer accepts email marketing communications"
    },
    "smsSubscribed": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "This customer accepts sms marketing communications"
    },
    "siteId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Site id where the customer has originated from"
    },
    "referrerLink": {
      "type": [
        "string",
        "null"
      ],
      "description": "The referral link of the customer that referred this customer"
    },
    "birthdate": {
      "type": [
        "string",
        "null"
      ],
      "description": "Customer DOB",
      "format": "date-time"
    },
    "gender": {
      "type": [
        "string",
        "null"
      ],
      "description": "Customer gender"
    },
    "customTags": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    }
  },
  "additionalProperties": false
}