Skip to main content
Important: The branch model has a dependency on the shop model. The shop_id field must reference an existing shop in the system. It’s recommended to upload shop data before uploading branch data.

Schema

{
  "type": "object",
  "required": ["branch_id", "shop_id", "name", "region"],
  "properties": {
    "branch_id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier for the branch"
    },
    "shop_id": {
      "type": "string",
      "format": "uuid",
      "description": "ID of the shop this branch belongs to (must reference an existing shop)"
    },
    "name": {
      "type": "string",
      "description": "Name of the branch"
    },
    "region": {
      "type": "string",
      "description": "Geographic region (2-letter country code, ISO 3166-1 alpha-2)"
    },
    "latitude": {
      "type": "number",
      "nullable": true,
      "description": "Latitude coordinate of the branch location"
    },
    "longitude": {
      "type": "number",
      "nullable": true,
      "description": "Longitude coordinate of the branch location"
    },
    "created": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "Timestamp when the record was created"
    },
    "updated": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "Timestamp when the record was last updated"
    },
    "is_deleted": {
      "type": "boolean",
      "nullable": true,
      "description": "Flag indicating if the record is marked as deleted"
    }
  }
}

Field Descriptions

Required Fields

FieldTypeFormatDescription
branch_idstringUUIDUnique identifier for the branch
shop_idstringUUIDID of the shop this branch belongs to (must reference a valid shop)
namestring-Name of the branch
regionstring-Geographic region (2-letter country code, e.g., “CA” for Canada)

Optional Fields

FieldTypeFormatDescription
latitudenumber-Latitude coordinate of the branch location
longitudenumber-Longitude coordinate of the branch location
createdstringdate-timeTimestamp when the record was created
updatedstringdate-timeTimestamp when the record was last updated
is_deletedboolean-Flag indicating if the record is marked as deleted

Example

{
  "branch_id": "550e8400-e29b-41d4-a716-446655440000",
  "shop_id": "550e8400-e29b-41d4-a716-446655440001",
  "name": "Downtown Branch",
  "region": "CA",
  "latitude": 43.65107,
  "longitude": -79.347015,
  "created": "2023-01-15T14:30:00Z",
  "updated": "2023-06-22T09:15:30Z",
  "is_deleted": false
}

Best Practices

  1. UUID Format: Use valid UUID v4 format for branch_id and shop_id
  2. Data Dependencies: Ensure shop_id references an existing shop
  3. Region Codes: Use ISO 3166-1 alpha-2 country codes (e.g., “CA” for Canada, “US” for United States)
  4. Coordinates: When providing latitude and longitude, ensure they are valid geographic coordinates
  5. Data Consistency: Ensure consistent data across all branch records
Need help? Contact our support team at [email protected]