> For the complete documentation index, see [llms.txt](https://docs.kiiglobal.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kiiglobal.io/docs/kiichain-pay/api-reference/geofence.md).

# Geofence

## GetGeofenceStatus returns the geofence status for the calling client

> Resolves the caller's country from the edge-provided header and reports whether\
> geofenced endpoints are barred, together with the full list of geofenced endpoints\
> so the client can gate navigation before the user hits a 403

```json
{"openapi":"3.0.0","info":{"title":"KiiChain Pay Backend","version":"v1"},"tags":[{"description":"Queries (read operations)","name":"GeofenceQueryService"}],"servers":[{"description":"Production","url":"https://backend.pay.kiichain.io"},{"description":"Staging","url":"https://backend.pay.staging.kiichain.io"}],"paths":{"/geofence/v1/status":{"get":{"description":"Resolves the caller's country from the edge-provided header and reports whether\ngeofenced endpoints are barred, together with the full list of geofenced endpoints\nso the client can gate navigation before the user hits a 403","operationId":"GeofenceQueryService_GetGeofenceStatus","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/v1GetGeofenceStatusResponse"}}},"description":"A successful response."},"default":{"$ref":"#/components/responses/AppError"}},"summary":"GetGeofenceStatus returns the geofence status for the calling client","tags":["GeofenceQueryService"]}}},"components":{"schemas":{"v1GetGeofenceStatusResponse":{"properties":{"country":{"title":"country is the ISO 3166-1 alpha-2 code resolved for the caller, empty when unknown","type":"string"},"endpoints":{"items":{"$ref":"#/components/schemas/v1GeofencedEndpoint"},"title":"endpoints is the full set of geofenced endpoints, each reporting whether the caller is blocked","type":"array"}},"title":"GetGeofenceStatusResponse is the body response structure from the GetGeofenceStatus endpoint","type":"object"},"v1GeofencedEndpoint":{"properties":{"blocked":{"title":"blocked is true when the caller's resolved country cannot reach this endpoint","type":"boolean"},"method":{"title":"method is the HTTP method, e.g. \"GET\" or \"POST\" (may be a custom verb if the binding uses google.api.http custom patterns)","type":"string"},"path":{"title":"path is the REST path template, e.g. \"/tickets/v1/offramp\"","type":"string"}},"required":["method","path","blocked"],"title":"GeofencedEndpoint is a single REST binding of a geofenced method","type":"object"},"AppErrorStatus":{"description":"The error envelope this API returns for every non-2xx response. `details` always contains exactly one AppError.","properties":{"code":{"description":"gRPC status code","format":"int32","type":"integer"},"details":{"description":"Always contains exactly one AppError","items":{"$ref":"#/components/schemas/AppError"},"type":"array"},"message":{"description":"Human-readable error message","type":"string"}},"type":"object"},"AppError":{"description":"Structured error detail responded by any non-2xx response.","properties":{"@type":{"description":"Protobuf Any type URL, always \"type.googleapis.com/pay.common.error.v1.AppError\" for this API","type":"string"},"internalCode":{"description":"Internal error code, unique within the module","format":"int32","type":"integer"},"message":{"description":"Human-readable error message","type":"string"},"meta":{"additionalProperties":{"type":"string"},"description":"Additional structured context for the error, if any","type":"object"},"module":{"description":"Module name where the error occurred (e.g. \"accounts\", \"market\")","type":"string"}},"type":"object"}},"responses":{"AppError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppErrorStatus"}}},"description":"An unexpected error response. `details[0]` is always an AppError, see #/components/schemas/AppError"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kiiglobal.io/docs/kiichain-pay/api-reference/geofence.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
