{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gupy/json-schema/gupy-branch-schema.json",
  "title": "branch",
  "description": "Branch",
  "x-generated": "2026-12-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gupy-public-api-openapi.yml#/components/schemas/branch",
  "type": "object",
  "properties": {
    "id": {
      "description": "Branch ID",
      "type": "integer",
      "format": "int64"
    },
    "code": {
      "description": "Branch code",
      "type": "string",
      "maxLength": 200
    },
    "name": {
      "description": "Branch name",
      "type": "string",
      "maxLength": 255
    },
    "path": {
      "description": "The path in the organizational structure",
      "type": "array",
      "items": {
        "description": "Path item (eg. Gupy, Brazil)",
        "type": "string",
        "maxLength": 255
      }
    },
    "addressCountry": {
      "description": "Branch country",
      "type": "string",
      "maxLength": 64
    },
    "addressCountryShortName": {
      "description": "Branch country short name",
      "type": "string",
      "maxLength": 8
    },
    "addressState": {
      "description": "Branch state",
      "type": "string",
      "maxLength": 64
    },
    "addressStateShortName": {
      "description": "Branch state short name",
      "type": "string",
      "maxLength": 32
    },
    "addressCity": {
      "description": "Branch city",
      "type": "string",
      "maxLength": 100
    },
    "addressStreet": {
      "description": "Branch street",
      "type": "string",
      "maxLength": 255
    },
    "addressNumber": {
      "description": "Branch address number",
      "type": "string",
      "maxLength": 64
    },
    "addressZipCode": {
      "description": "Branch city",
      "type": "string",
      "maxLength": 16
    },
    "addressLatitude": {
      "description": "Branch address latitude",
      "type": "number",
      "format": "double"
    },
    "addressLongitude": {
      "description": "Branch address longitude",
      "type": "number",
      "format": "double"
    },
    "createdAt": {
      "description": "Data of creation",
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "description": "Date of update",
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "code",
    "path",
    "name",
    "createdAt",
    "updatedAt"
  ]
}