{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/assignar/json-schema/assignar-suppliers-schema.json",
  "title": "Suppliers",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/assignar-suppliers-api-openapi.yml#/components/schemas/Suppliers",
  "type": "array",
  "items": {
    "$ref": "#/$defs/Supplier"
  },
  "$defs": {
    "Supplier": {
      "type": "object",
      "required": [
        "name",
        "active",
        "date_added"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "readOnly": true
        },
        "name": {
          "type": "string"
        },
        "abn": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "office_phone": {
          "type": "string"
        },
        "mobile": {
          "type": "string"
        },
        "address_1": {
          "type": "string"
        },
        "address_geo": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "Point"
              ]
            },
            "coordinates": {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          }
        },
        "address_2": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "postcode": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "comments": {
          "type": "string"
        },
        "external_id": {
          "type": "string"
        },
        "active": {
          "type": "boolean"
        },
        "date_added": {
          "type": "string",
          "format": "date"
        },
        "date_modified": {
          "type": "string",
          "format": "date"
        },
        "modified_by": {
          "type": "integer"
        },
        "modified_time": {
          "type": "string",
          "format": "date"
        },
        "tags": {
          "type": "array",
          "description": "Collection of tags of the supplier",
          "items": {
            "$ref": "#/$defs/TagPart"
          }
        }
      }
    },
    "TagPart": {
      "title": "TagPart",
      "x-stoplight": {
        "id": "epsk9hslhfq0q"
      },
      "type": "object",
      "description": "",
      "properties": {
        "tag_id": {
          "type": "integer",
          "description": "Identifier of the tag"
        },
        "name": {
          "type": "string",
          "description": "Name of the tag"
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description of the tag"
        },
        "color": {
          "type": [
            "string",
            "null"
          ],
          "description": "Color to render the tag formated as Hex color code. Ex #0000FF"
        }
      },
      "required": [
        "name"
      ]
    }
  }
}