{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amberai/json-schema/amberai-brand-locations-list-schema.json",
  "title": "BrandLocationsList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amberai-brand-locations-api-openapi.yml#/components/schemas/BrandLocationsList",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          },
          "locationId": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          },
          "isBilling": {
            "type": "boolean"
          },
          "isDefaultBilling": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "location": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                  },
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line1": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line2": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "state": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "postalCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "unLocode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "legacyAddressId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "legacyPortId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "type",
                  "name",
                  "line1",
                  "line2",
                  "city",
                  "state",
                  "postalCode",
                  "countryCode",
                  "unLocode",
                  "legacyAddressId",
                  "legacyPortId",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "locationId",
          "isPrimary",
          "type",
          "isBilling",
          "isDefaultBilling",
          "createdAt",
          "updatedAt",
          "location"
        ],
        "additionalProperties": false
      }
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "totalItems": {
      "type": "integer",
      "description": "Total number of matching records across all pages."
    }
  },
  "required": [
    "items",
    "nextCursor",
    "totalItems"
  ],
  "additionalProperties": false
}