{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/1factory/refs/heads/main/json-schema/1factory-supplier-schema.json", "title": "Supplier", "description": "Supplier schema from 1Factory API", "type": "object", "properties": { "ID": { "$ref": "#/components/schemas/ID" }, "name": { "allOf": [ { "$ref": "#/components/schemas/supplier_name" }, { "nullable": false } ] }, "vendor_code": { "allOf": [ { "$ref": "#/components/schemas/supplier_number" }, { "nullable": false } ] }, "address": { "$ref": "#/components/schemas/Address" }, "supply_chain_manager": { "$ref": "#/components/schemas/User" }, "supplier_quality_manager": { "$ref": "#/components/schemas/User" }, "purchasing": { "$ref": "#/components/schemas/User" }, "direct": { "type": "boolean", "nullable": false, "default": false, "description": "Indicates if the supplier provides direct materials or services." }, "indirect": { "type": "boolean", "nullable": false, "default": false, "description": "Indicates if the supplier provides indirect materials or services." }, "strategic": { "type": "boolean", "nullable": false, "default": false, "description": "Indicates if the supplier is considered strategic to the organization." }, "small_business": { "type": "boolean", "nullable": false, "default": false, "description": "Indicates if the supplier is classified as a small business." }, "organization_codes": { "type": "array", "nullable": true, "minItems": 1, "items": { "type": "string", "maxLength": 50 }, "description": "List of organization codes associated with the supplier.", "example": [ "1001", "1002" ] }, "commodity_codes": { "type": "array", "nullable": true, "minItems": 1, "items": { "type": "string", "maxLength": 100 }, "description": "List of commodity codes that the supplier provides.", "example": [ "Machined", "Anodization" ] }, "qualifications": { "type": "array", "nullable": true, "minItems": 1, "items": { "$ref": "#/components/schemas/Qualification" }, "description": "List of supplier qualifications and their status history." }, "certifications": { "type": "array", "nullable": true, "minItems": 1, "items": { "$ref": "#/components/schemas/Certification" }, "description": "List of supplier certifications and their expiration dates." }, "qualification_status": { "type": "string", "nullable": true, "readOnly": true, "enum": [ "New", "Approved", "Conditional", "Disqualified", "Inactive" ], "description": "Current qualification status derived from the most recent qualification entry.", "example": "Conditional" }, "last_qualification_date": { "type": "string", "format": "date-time", "nullable": true, "readOnly": true, "description": "Date and time of the most recent qualification assessment.", "example": "2016-12-02T00:00:00-08:00" }, "re_qualification_date": { "type": "string", "format": "date-time", "nullable": true, "readOnly": true, "description": "Calculated date when the supplier needs to be re-qualified, based on the last qualification date plus frequency in months.", "example": "2017-12-02T00:00:00-08:00" } }, "required": [ "ID", "name", "vendor_code" ] }