{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/altoviz-com/json-schema/altoviz-com-supplier-schema.json",
  "title": "Supplier",
  "description": "Supplier",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/altoviz-com-suppliers-api-openapi.yml#/components/schemas/Supplier",
  "type": "object",
  "properties": {
    "active": {
      "type": "boolean",
      "description": "Whether the supplier is active"
    },
    "address": {
      "$ref": "#/$defs/AddressFields"
    },
    "cellPhone": {
      "type": [
        "string",
        "null"
      ],
      "description": "Cell phone number"
    },
    "companyInformations": {
      "$ref": "#/$defs/CompanyInfo"
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ],
      "description": "Created date",
      "format": "date-time"
    },
    "createdById": {
      "type": [
        "string",
        "null"
      ],
      "description": "Created by user ID"
    },
    "defaultPaymentMethod": {
      "$ref": "#/$defs/PaymentMethod"
    },
    "email": {
      "type": [
        "string",
        "null"
      ],
      "description": "Email"
    },
    "firstName": {
      "type": [
        "string",
        "null"
      ],
      "description": "First name"
    },
    "id": {
      "type": "integer",
      "description": "Supplier ID",
      "format": "int32",
      "readOnly": true
    },
    "internalId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Internal Id"
    },
    "internalNotes": {
      "type": [
        "string",
        "null"
      ],
      "description": "Internal notes"
    },
    "lastName": {
      "type": [
        "string",
        "null"
      ],
      "description": "Last name"
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Company name"
    },
    "number": {
      "type": [
        "string",
        "null"
      ],
      "description": "Number"
    },
    "phone": {
      "type": [
        "string",
        "null"
      ],
      "description": "Phone number"
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "Title"
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "description": "Updated date",
      "format": "date-time"
    },
    "updatedById": {
      "type": [
        "string",
        "null"
      ],
      "description": "Updated by user ID"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "AddressFields": {
      "type": "object",
      "properties": {
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "countryIso": {
          "type": [
            "string",
            "null"
          ]
        },
        "countryName": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "formattedAddress": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "inlineAddress": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "street": {
          "type": [
            "string",
            "null"
          ]
        },
        "zipcode": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "CompanyInfo": {
      "type": "object",
      "properties": {
        "effectiveElectronicAddress": {
          "type": [
            "string",
            "null"
          ]
        },
        "electronicAddress": {
          "type": [
            "string",
            "null"
          ]
        },
        "siret": {
          "type": [
            "string",
            "null"
          ]
        },
        "vatNumber": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "PaymentMethod": {
      "enum": [
        "Transfer",
        "Order",
        "Check",
        "Cash",
        "Card",
        "Bill",
        "Usec",
        "Other"
      ],
      "type": "string"
    }
  }
}