{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bronjoy-com/json-schema/bronjoy-com-organization-resource-schema.json",
  "title": "OrganizationResource",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/bronjoy-com-api-spec-openapi.json#/components/schemas/OrganizationResource",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "business_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "slug": {
      "type": "string"
    },
    "specialty": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "translations": {
      "type": "object",
      "properties": {
        "business_name": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "specialty": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "description": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "address": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "business_name",
        "specialty",
        "description",
        "address"
      ]
    },
    "address": {
      "type": [
        "string",
        "null"
      ]
    },
    "district": {
      "type": [
        "string",
        "null"
      ]
    },
    "city": {
      "type": "string"
    },
    "canonical_path": {
      "type": "string",
      "description": "Where this organization's public page lives, WITHOUT the locale\nprefix: `/tashkent/barber/britva` (ODI-182). The dashboard shows this URL back to the owner — the profile\nform's copy button, the share dialog's QR code, the onboarding\n\"your page is live\" step. All three used to concatenate\n`{clientBase}/{slug}`, which stopped resolving when venue pages\nmoved under city and category: the bare slug 404s rather than\nredirecting, so the owner was handed a dead link to their own\nbusiness.\n\nFalls back to `/{slug}` when the org has no resolved city or no\ncategory — that form does not resolve either, but a page in that\nstate is not publishable anyway, and the fallback keeps the\nbreakage at the link rather than emitting `//britva`."
    },
    "short_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "Permanent share code — `bronjoy.com/s/{code}`. Never changes, so\nanything printed with it (the QR poster, a sticker) keeps working\nafter a rename or a re-mint. See `ShortCode`."
    },
    "state": {
      "type": "string"
    },
    "country": {
      "type": [
        "string",
        "null"
      ]
    },
    "postal_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "timezone": {
      "type": "string"
    },
    "default_currency": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "website": {
      "type": "string"
    },
    "logo": {
      "type": [
        "string",
        "null"
      ]
    },
    "invite_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "referral_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "referral_link": {
      "type": "string"
    },
    "allow_join_requests": {
      "type": "boolean"
    },
    "is_active": {
      "type": "string"
    },
    "is_verified": {
      "type": "boolean"
    },
    "verified_at": {
      "type": "string"
    },
    "telegram_bot_connected": {
      "type": "boolean"
    },
    "telegram_bot_username": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "branches": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Branch"
      }
    },
    "services": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Service"
      }
    },
    "staff": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Staff"
      }
    }
  },
  "required": [
    "id",
    "business_name",
    "slug",
    "specialty",
    "description",
    "translations",
    "address",
    "district",
    "city",
    "canonical_path",
    "short_code",
    "state",
    "country",
    "postal_code",
    "timezone",
    "default_currency",
    "phone",
    "email",
    "website",
    "logo",
    "invite_code",
    "referral_code",
    "referral_link",
    "allow_join_requests",
    "is_active",
    "is_verified",
    "verified_at",
    "telegram_bot_connected",
    "telegram_bot_username",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "Branch": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "organization_id": {
          "type": "integer"
        },
        "name": {
          "type": "array",
          "items": {}
        },
        "address": {
          "type": "array",
          "items": {}
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": "string"
        },
        "phone": {
          "type": [
            "string",
            "null"
          ]
        },
        "latitude": {
          "type": [
            "string",
            "null"
          ]
        },
        "longitude": {
          "type": [
            "string",
            "null"
          ]
        },
        "is_main": {
          "type": "boolean"
        },
        "created_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "updated_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "deleted_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "district": {
          "type": [
            "string",
            "null"
          ]
        },
        "city_id": {
          "type": [
            "integer",
            "null"
          ]
        },
        "region_id": {
          "type": [
            "integer",
            "null"
          ]
        },
        "location": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "organization_id",
        "name",
        "address",
        "city",
        "state",
        "country",
        "phone",
        "latitude",
        "longitude",
        "is_main",
        "created_at",
        "updated_at",
        "deleted_at",
        "district",
        "city_id",
        "region_id",
        "location"
      ],
      "title": "Branch"
    },
    "PrepayPolicy": {
      "type": "string",
      "enum": [
        "none",
        "partial",
        "full"
      ],
      "title": "PrepayPolicy"
    },
    "Service": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "organization_id": {
          "type": "integer"
        },
        "category_id": {
          "type": [
            "integer",
            "null"
          ]
        },
        "name": {
          "type": "array",
          "items": {}
        },
        "description": {
          "type": [
            "array",
            "null"
          ],
          "items": {}
        },
        "duration": {
          "type": "integer"
        },
        "buffer_before": {
          "type": "integer"
        },
        "buffer_after": {
          "type": "integer"
        },
        "price": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "is_active": {
          "type": "boolean"
        },
        "created_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "updated_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "deleted_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "prepay_policy": {
          "anyOf": [
            {
              "$ref": "#/$defs/PrepayPolicy"
            },
            {
              "type": "null"
            }
          ]
        },
        "prepay_percentage": {
          "type": [
            "integer",
            "null"
          ]
        },
        "price_from": {
          "type": "boolean"
        },
        "source": {
          "$ref": "#/$defs/ServiceSource"
        },
        "source_tag": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "organization_id",
        "category_id",
        "name",
        "description",
        "duration",
        "buffer_before",
        "buffer_after",
        "price",
        "currency",
        "is_active",
        "created_at",
        "updated_at",
        "deleted_at",
        "prepay_policy",
        "prepay_percentage",
        "price_from",
        "source",
        "source_tag"
      ],
      "title": "Service"
    },
    "ServiceSource": {
      "type": "string",
      "description": "Where a service row came from. Scraped rows are materialised from `organization_profiles.services_detailed` (2GIS attributes) and may be rewritten by a later import; owner rows are whatever a real person typed and are never touched by the importer.\n",
      "enum": [
        "owner",
        "scraped"
      ],
      "title": "ServiceSource"
    },
    "Staff": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "organization_id": {
          "type": "integer"
        },
        "user_id": {
          "type": [
            "integer",
            "null"
          ]
        },
        "branch_id": {
          "type": [
            "integer",
            "null"
          ]
        },
        "name": {
          "type": "string"
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "phone": {
          "type": [
            "string",
            "null"
          ]
        },
        "is_active": {
          "type": "boolean"
        },
        "created_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "updated_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "deleted_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "telegram_user_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "display_name": {
          "type": [
            "array",
            "null"
          ],
          "items": {}
        },
        "position": {
          "type": [
            "array",
            "null"
          ],
          "items": {}
        },
        "bio": {
          "type": [
            "array",
            "null"
          ],
          "items": {}
        },
        "avatar": {
          "type": [
            "string",
            "null"
          ]
        },
        "slug": {
          "type": [
            "string",
            "null"
          ]
        },
        "is_profile_public": {
          "type": "boolean"
        },
        "meta_title": {
          "type": [
            "array",
            "null"
          ],
          "items": {}
        },
        "meta_description": {
          "type": [
            "array",
            "null"
          ],
          "items": {}
        },
        "ical_feed_token": {
          "type": [
            "string",
            "null"
          ]
        },
        "onboarding_completed_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "is_verified": {
          "type": "boolean"
        },
        "verified_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "organization_id",
        "user_id",
        "branch_id",
        "name",
        "email",
        "phone",
        "is_active",
        "created_at",
        "updated_at",
        "deleted_at",
        "telegram_user_id",
        "display_name",
        "position",
        "bio",
        "avatar",
        "slug",
        "is_profile_public",
        "meta_title",
        "meta_description",
        "ical_feed_token",
        "onboarding_completed_at",
        "is_verified",
        "verified_at"
      ],
      "title": "Staff"
    }
  }
}