{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/loadsmart/json-schema/loadsmart-org-schema.json",
  "title": "Org",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/loadsmart-orgs-api-openapi.yml#/components/schemas/Org",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier of the record",
      "readOnly": true
    },
    "createDateTime": {
      "format": "date-time",
      "type": "string",
      "description": "The date and time when the record was created",
      "readOnly": true
    },
    "createdBy": {
      "type": "object",
      "description": "The ID of the user who created the record",
      "readOnly": true
    },
    "lastChangedDateTime": {
      "format": "date-time",
      "type": "string",
      "description": "The date and time when the record was last changed",
      "readOnly": true
    },
    "warehouses": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Warehouse"
      }
    },
    "reportSearches": {
      "type": "object"
    },
    "customTags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "samlConfig": {
      "type": "object"
    },
    "orgType": {
      "type": "string",
      "enum": [
        "Trial",
        "Test",
        "Client"
      ]
    },
    "expiresAt": {
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "id",
    "createDateTime",
    "createdBy",
    "lastChangedDateTime"
  ],
  "$defs": {
    "ClockSpan": {
      "type": "object",
      "properties": {
        "end": {
          "type": "string"
        },
        "start": {
          "type": "string"
        }
      },
      "required": [
        "end",
        "start"
      ]
    },
    "CustomFieldTemplateDto": {
      "type": "object",
      "properties": {
        "semanticLabelId": {
          "type": "object",
          "format": "uuid",
          "description": "Semantic label id (FK to semanticlabel)"
        },
        "type": {
          "type": "string",
          "enum": [
            "str",
            "bigstr",
            "date",
            "bool",
            "doc",
            "multidoc",
            "int",
            "email",
            "phone",
            "dropdown",
            "dropdownmultiselect",
            "combobox",
            "timestamp",
            "action"
          ]
        }
      },
      "required": [
        "type"
      ]
    },
    "ScheduleDto": {
      "type": "object",
      "properties": {
        "sunday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "monday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "tuesday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "wednesday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "thursday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "friday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "saturday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClockSpan"
          }
        },
        "version": {
          "type": "number"
        },
        "closedIntervals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TimeInterval"
          }
        }
      },
      "required": [
        "sunday",
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday",
        "saturday",
        "version",
        "closedIntervals"
      ]
    },
    "TimeInterval": {
      "type": "object",
      "properties": {
        "end": {
          "format": "date-time",
          "type": "string"
        },
        "start": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "end",
        "start"
      ]
    },
    "Warehouse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique identifier of the record",
          "readOnly": true
        },
        "createDateTime": {
          "format": "date-time",
          "type": "string",
          "description": "The date and time when the record was created",
          "readOnly": true
        },
        "createdBy": {
          "type": "object",
          "description": "The ID of the user who created the record",
          "readOnly": true
        },
        "lastChangedDateTime": {
          "format": "date-time",
          "type": "string",
          "description": "The date and time when the record was last changed",
          "readOnly": true
        },
        "schedule": {
          "$ref": "#/$defs/ScheduleDto"
        },
        "country": {
          "type": "string"
        },
        "timezone": {
          "type": "string"
        },
        "docks": {
          "type": "Dock"
        },
        "loadTypes": {
          "type": "LoadType"
        },
        "org": {
          "type": "Warehouse"
        },
        "orgId": {
          "type": "string"
        },
        "contactName": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "instructions": {
          "type": "string"
        },
        "customApptFieldsTemplate": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomFieldTemplateDto"
          }
        },
        "refNumberValidationVersion": {
          "type": "string",
          "enum": [
            "V1",
            "V2"
          ]
        },
        "refNumberValidationUrl": {
          "type": "string"
        },
        "refNumberValidationPasscode": {
          "type": "string"
        },
        "settings": {
          "type": "object"
        },
        "allowCarrierScheduling": {
          "type": "boolean"
        },
        "geolocation": {
          "type": "object"
        },
        "ccEmails": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "amenities": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "Lumper services",
              "Drivers restroom",
              "Overnight parking",
              "Free Wi-Fi"
            ]
          }
        },
        "ppeRequirements": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "Face Mask",
              "Safety Glasses",
              "Hard Hat",
              "Safety Boots",
              "Gloves",
              "High Visibility Vest",
              "Long Pants",
              "Long Sleeves",
              "No Smoking",
              "Hair and Beard Net"
            ]
          }
        },
        "intervalTrimForCarriers": {
          "type": "number"
        },
        "customBookingUrl": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "createDateTime",
        "createdBy",
        "lastChangedDateTime",
        "schedule",
        "amenities",
        "ppeRequirements"
      ]
    }
  }
}