{
  "openapi": "3.1.0",
  "info": {
    "title": "Atelix public reference API",
    "version": "1.0.0",
    "description": "Anonymous read-only public reference endpoints and supported website handoffs."
  },
  "externalDocs": {
    "url": "https://www.atelix.tech/developers/#versioning",
    "description": "Atelix developer quickstart and API deprecation policy"
  },
  "servers": [
    {
      "url": "https://www.atelix.tech/api/v1"
    }
  ],
  "security": [],
  "paths": {
    "/health": {
      "get": {
        "summary": "Health",
        "operationId": "get_health",
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "required": [
                        "status"
                      ],
                      "properties": {
                        "status": {
                          "const": "ok",
                          "type": "string"
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "JSON error envelope with error.code, error.message and meta.requestId. Respect Retry-After on HTTP 429; use bounded backoff on transient failures.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": []
      }
    },
    "/nationalities": {
      "get": {
        "summary": "Approved passport country catalogue",
        "operationId": "get_nationalities",
        "security": [],
        "responses": {
          "200": {
            "description": "Approved country names, ISO alpha-2 codes and search aliases, sorted by name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "code",
                          "name",
                          "aliases"
                        ],
                        "properties": {
                          "code": {
                            "type": "string",
                            "pattern": "^[A-Z]{2}$"
                          },
                          "name": {
                            "type": "string"
                          },
                          "aliases": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "JSON error envelope with error.code, error.message and meta.requestId. Respect Retry-After on HTTP 429; use bounded backoff on transient failures."
          }
        },
        "parameters": []
      }
    },
    "/visa-routes": {
      "get": {
        "summary": "Published route policies",
        "operationId": "get_visa_routes",
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "route_code",
                          "version",
                          "rules",
                          "sources",
                          "reviewed_at"
                        ],
                        "properties": {
                          "route_code": {
                            "type": "string"
                          },
                          "version": {
                            "type": "integer"
                          },
                          "rules": {
                            "type": "object"
                          },
                          "sources": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "format": "uri"
                            }
                          },
                          "reviewed_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "JSON error envelope with error.code, error.message and meta.requestId. Respect Retry-After on HTTP 429; use bounded backoff on transient failures.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [],
        "description": "Published backend policies only. An empty array means no policies are published; it is not an eligibility decision. Public preparation catalogue pages are a separate reference."
      }
    },
    "/agent/visa-routes": {
      "get": {
        "summary": "Find public visa routes",
        "operationId": "list_public_visa_routes",
        "security": [],
        "description": "Read-only and safe to retry. Returns all results for one supported filter without pagination.",
        "parameters": [
          {
            "name": "destination",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "ID",
                "MY",
                "TH",
                "VN",
                "SG",
                "KH",
                "LA",
                "AU",
                "US",
                "CN",
                "JP",
                "KR"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "title",
                          "url",
                          "continueUrl",
                          "code",
                          "destination",
                          "summary",
                          "officialUrl",
                          "preparationAvailable"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "continueUrl": {
                            "type": "string",
                            "format": "uri"
                          },
                          "code": {
                            "type": "string"
                          },
                          "destination": {
                            "type": "string",
                            "enum": [
                              "ID",
                              "MY",
                              "TH",
                              "VN",
                              "SG",
                              "KH",
                              "LA",
                              "AU",
                              "US",
                              "CN",
                              "JP",
                              "KR"
                            ]
                          },
                          "summary": {
                            "type": "string"
                          },
                          "officialUrl": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "uri"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "preparationAvailable": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "Fixed-window quota per client IP and region",
                "schema": {
                  "type": "string",
                  "example": "120;w=60"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited by the edge. Respect Retry-After when supplied and otherwise wait 60 seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agent/formation-plans": {
      "get": {
        "summary": "Compare U.S. formation plans",
        "operationId": "list_public_formation_plans",
        "security": [],
        "description": "Read-only and safe to retry. Returns all results for one supported filter without pagination.",
        "parameters": [
          {
            "name": "entity",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "LLC",
                "CCorp"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "title",
                          "url",
                          "continueUrl",
                          "entity",
                          "state",
                          "plan",
                          "servicePriceUsdCents",
                          "billingPeriod",
                          "includedFeatures",
                          "stateFilingFeeSeparate"
                        ],
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "continueUrl": {
                            "type": "string",
                            "format": "uri"
                          },
                          "entity": {
                            "type": "string",
                            "enum": [
                              "LLC",
                              "CCorp"
                            ]
                          },
                          "state": {
                            "type": "string"
                          },
                          "plan": {
                            "type": "string"
                          },
                          "servicePriceUsdCents": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "billingPeriod": {
                            "type": "string",
                            "enum": [
                              "one_time",
                              "first_year"
                            ]
                          },
                          "includedFeatures": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "stateFilingFeeSeparate": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "required": [
                        "requestId"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "description": "Fixed-window quota per client IP and region",
                "schema": {
                  "type": "string",
                  "example": "120;w=60"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited by the edge. Respect Retry-After when supplied and otherwise wait 60 seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "requestId": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "requestId"
            ]
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}
