{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-customer-schema.json",
  "title": "Customer",
  "description": "Person or entity who shops on Commerce Cloud storefronts by creating a shopper account in Commerce Cloud.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-customers-api-openapi.yml#/components/schemas/Customer",
  "required": [
    "customerNo",
    "lastName"
  ],
  "type": "object",
  "additionalProperties": {
    "title": "Additional Property Support",
    "description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix."
  },
  "properties": {
    "birthday": {
      "type": "string",
      "description": "The customer's birthday.",
      "format": "date"
    },
    "companyName": {
      "maxLength": 256,
      "type": "string",
      "description": "The customer's company name."
    },
    "creationDate": {
      "type": "string",
      "description": "Returns the value of attribute 'creationDate'.",
      "format": "date-time"
    },
    "credentials": {
      "$ref": "#/$defs/Credentials"
    },
    "customerId": {
      "maxLength": 28,
      "type": "string",
      "description": "The customer's ID. Both registered and guest customers have a\n customer ID."
    },
    "customerNo": {
      "maxLength": 100,
      "type": "string",
      "description": "The customer's number."
    },
    "email": {
      "maxLength": 256,
      "type": "string",
      "description": "The customer's email address."
    },
    "fax": {
      "maxLength": 32,
      "type": "string",
      "description": "The customer's fax number.\n The length is restricted to 32 characters."
    },
    "firstName": {
      "maxLength": 256,
      "type": "string",
      "description": "The customer's first name."
    },
    "gender": {
      "type": "integer",
      "description": "The customer's gender.",
      "format": "int32"
    },
    "jobTitle": {
      "maxLength": 256,
      "type": "string",
      "description": "The customer's job title."
    },
    "lastLoginTime": {
      "type": "string",
      "description": "The last login time of the customer.",
      "format": "date-time"
    },
    "lastModified": {
      "type": "string",
      "description": "Returns the value of attribute 'lastModified'.",
      "format": "date-time"
    },
    "lastName": {
      "maxLength": 256,
      "type": "string",
      "description": "The customer's last name."
    },
    "lastVisitTime": {
      "type": "string",
      "description": "The last visit time of the customer.",
      "format": "date-time"
    },
    "phoneBusiness": {
      "maxLength": 32,
      "type": "string",
      "description": "The customer's business phone number."
    },
    "phoneHome": {
      "maxLength": 32,
      "type": "string",
      "description": "The customer's home phone number."
    },
    "phoneMobile": {
      "maxLength": 32,
      "type": "string",
      "description": "The customer's mobile phone number."
    },
    "preferredLocale": {
      "maxLength": 5,
      "type": "string",
      "description": "The customer's preferred locale."
    },
    "previousLoginTime": {
      "type": "string",
      "description": "The time when the customer previously logged in.",
      "format": "date-time"
    },
    "previousVisitTime": {
      "type": "string",
      "description": "The time when the customer previously visited the store.",
      "format": "date-time"
    },
    "primaryAddress": {
      "$ref": "#/$defs/CustomerAddress"
    },
    "salutation": {
      "maxLength": 256,
      "type": "string",
      "description": "The customer's salutation."
    },
    "secondName": {
      "maxLength": 256,
      "type": "string",
      "description": "The customer's second name."
    },
    "suffix": {
      "maxLength": 256,
      "type": "string",
      "description": "The customer's suffix (for example, \"Jr.\" or \"Sr.\")."
    },
    "title": {
      "maxLength": 256,
      "type": "string",
      "description": "The customer's title (for example, \"Mrs\" or \"Mr\")."
    }
  },
  "$defs": {
    "Credentials": {
      "required": [
        "login"
      ],
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "A flag indicating whether the customer is enabled and can log in."
        },
        "locked": {
          "type": "boolean",
          "description": "A flag indicating whether the customer account is locked."
        },
        "login": {
          "maxLength": 256,
          "type": "string",
          "description": "The login of the customer."
        },
        "passwordQuestion": {
          "maxLength": 256,
          "type": "string",
          "description": "The password question."
        }
      },
      "description": "Document representing the credentials of a customer."
    },
    "CustomerAddress": {
      "required": [
        "addressId",
        "countryCode",
        "lastName"
      ],
      "type": "object",
      "additionalProperties": {
        "title": "Additional Property Support",
        "description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix."
      },
      "properties": {
        "address1": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's first address."
        },
        "address2": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's second address value."
        },
        "addressId": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer address ID."
        },
        "city": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's city."
        },
        "companyName": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's company name."
        },
        "countryCode": {
          "maxLength": 2,
          "type": "string",
          "description": "The customer's two-character country code per ISO 3166-1 alpha-2."
        },
        "creationDate": {
          "type": "string",
          "description": "Returns the value of attribute 'creationDate'.",
          "format": "date-time"
        },
        "etag": {
          "type": "string",
          "description": "The generated eTag representing the state of the customer address."
        },
        "firstName": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's first name."
        },
        "fullName": {
          "maxLength": 1027,
          "type": "string",
          "description": "The concatenation of the customer's first, middle, last names, and suffix."
        },
        "jobTitle": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's job title."
        },
        "lastModified": {
          "type": "string",
          "description": "Returns the value of attribute 'lastModified'.",
          "format": "date-time"
        },
        "lastName": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's last name."
        },
        "phone": {
          "maxLength": 32,
          "type": "string",
          "description": "The customer's phone number."
        },
        "postBox": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's post box."
        },
        "postalCode": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's postal code."
        },
        "salutation": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's salutation."
        },
        "secondName": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's second name."
        },
        "stateCode": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's state."
        },
        "suffix": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's suffix."
        },
        "suite": {
          "maxLength": 32,
          "type": "string",
          "description": "The customer's suite."
        },
        "title": {
          "maxLength": 256,
          "type": "string",
          "description": "The customer's title."
        }
      },
      "description": "Any address that is associated with a customer (billing, shipping, mailing, and so on)."
    }
  }
}