{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/lightspeed/main/json-schema/lightspeed-create-supplier-request-schema.json",
  "title": "CreateSupplierRequest",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lightspeed-suppliers-api-openapi.yml#/components/schemas/CreateSupplierRequest",
  "allOf": [
    {
      "$ref": "#/$defs/BaseSupplier"
    }
  ],
  "required": [
    "name"
  ],
  "$defs": {
    "BaseSupplier": {
      "properties": {
        "contact": {
          "description": "Contact information for the supplier.",
          "properties": {
            "company_name": {
              "description": "The name of the supplier company. This field is defaulted to the supplier name if not provided.",
              "type": [
                "string",
                "null"
              ]
            },
            "email": {
              "description": "The contact email of the supplier.",
              "type": [
                "string",
                "null"
              ]
            },
            "fax": {
              "description": "Fax number of the supplier.",
              "type": [
                "string",
                "null"
              ]
            },
            "first_name": {
              "description": "The firstname of the contact person.",
              "type": [
                "string",
                "null"
              ]
            },
            "last_name": {
              "description": "The last name of the contact person.",
              "type": [
                "string",
                "null"
              ]
            },
            "mobile": {
              "description": "Mobile contact number of the supplier.",
              "type": [
                "string",
                "null"
              ]
            },
            "phone": {
              "description": "Physical contact number of the supplier.",
              "type": [
                "string",
                "null"
              ]
            },
            "physical_address1": {
              "description": "Line 1 address of the supplier's physical address.",
              "type": [
                "string",
                "null"
              ]
            },
            "physical_address2": {
              "description": "Line 2 address of the supplier's physical address.",
              "type": [
                "string",
                "null"
              ]
            },
            "physical_city": {
              "description": "City of the supplier's physical address.",
              "type": [
                "string",
                "null"
              ]
            },
            "physical_country_id": {
              "description": "ID of the country of the supplier's physical address.",
              "type": [
                "string",
                "null"
              ]
            },
            "physical_postcode": {
              "description": "Postcode of the supplier's physical address.",
              "type": [
                "string",
                "null"
              ]
            },
            "physical_state": {
              "description": "State of the supplier's physical address.",
              "type": [
                "string",
                "null"
              ]
            },
            "physical_suburb": {
              "description": "Suburb of the supplier's physical address.",
              "type": [
                "string",
                "null"
              ]
            },
            "postal_address1": {
              "description": "Line 1 address of the supplier's postal address.",
              "type": [
                "string",
                "null"
              ]
            },
            "postal_address2": {
              "description": "Line 2 address of the supplier's postal address.",
              "type": [
                "string",
                "null"
              ]
            },
            "postal_city": {
              "description": "City of the supplier's postal address.",
              "type": [
                "string",
                "null"
              ]
            },
            "postal_country_id": {
              "description": "ID of the country of the supplier's postal address.",
              "type": [
                "string",
                "null"
              ]
            },
            "postal_postcode": {
              "description": "Postcode of the supplier's postal address.",
              "type": [
                "string",
                "null"
              ]
            },
            "postal_state": {
              "description": "State of the supplier's postal address.",
              "type": [
                "string",
                "null"
              ]
            },
            "postal_suburb": {
              "description": "Suburb of the supplier's postal address.",
              "type": [
                "string",
                "null"
              ]
            },
            "twitter": {
              "description": "Twitter handle of the supplier contact.",
              "type": [
                "string",
                "null"
              ]
            },
            "website": {
              "description": "The website address of the supplier",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "default_markup": {
          "description": "This is used for record-keeping purposes and it does not have any effect on your products.",
          "type": "number"
        },
        "description": {
          "description": "The Supplier description.",
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "description": "The Supplier name.",
          "type": "string"
        }
      },
      "required": [
        "name",
        "contact"
      ],
      "title": "BaseSupplier",
      "type": "object"
    }
  }
}