{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/microsoft-dynamics/refs/heads/main/json-schema/vendor.json",
  "title": "Vendor",
  "description": "A vendor record in Microsoft Dynamics 365, representing a supplier of goods or services.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "The unique identifier of the vendor.",
      "readOnly": true
    },
    "number": {
      "type": "string",
      "description": "The vendor number."
    },
    "displayName": {
      "type": "string",
      "description": "The display name of the vendor."
    },
    "addressLine1": {
      "type": "string",
      "description": "The first line of the vendor address."
    },
    "addressLine2": {
      "type": "string",
      "description": "The second line of the vendor address."
    },
    "city": {
      "type": "string",
      "description": "The city of the vendor address."
    },
    "state": {
      "type": "string",
      "description": "The state or province of the vendor address."
    },
    "country": {
      "type": "string",
      "description": "The country or region of the vendor address."
    },
    "postalCode": {
      "type": "string",
      "description": "The postal code of the vendor address."
    },
    "phoneNumber": {
      "type": "string",
      "description": "The phone number of the vendor."
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "The email address of the vendor."
    },
    "website": {
      "type": "string",
      "format": "uri",
      "description": "The website URL of the vendor."
    },
    "taxRegistrationNumber": {
      "type": "string",
      "description": "The tax registration number."
    },
    "currencyCode": {
      "type": "string",
      "description": "The default currency code for the vendor."
    },
    "balance": {
      "type": "number",
      "description": "The current balance owed to the vendor.",
      "readOnly": true
    },
    "lastModifiedDateTime": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the record was last modified.",
      "readOnly": true
    }
  },
  "required": ["displayName"]
}
