HTTP responses
Here are the possible HTTP status codes you can get when using the Geofencing API:
201
This response is returned when you get a successful response containing information about the Geofencing API event. Check the details for each object, parameter and the request body here.
{} 6 keys
webhook: {} 2 keys
notificationUrl:"https://example.com/notify"
notificationAuthToken:"replace-with-your-auth-token"
subscriptionDetail: {} 3 keys
device: {} 4 keys
phoneNumber:"36721601234567"
networkAccessIdentifier:"device@testcsp.net"
ipv4Address: {} 3 keys
publicAddress:"233.252.0.2"
privateAddress:"192.0.2.25"
publicPort:80
ipv6Address:"2001:db8:1234:5678:9abc:def0:fedc:ba98"
area: {} 1 keys
areaType:"CIRCLE"
type:"org.camaraproject.geofencing.v0.area-entered"
subscriptionExpireTime:"2024-01-11T11:53:20.293671Z"
subscriptionId:"123655"
startsAt:"2023-01-11T11:53:20.293671Z"
expiresAt:"2024-01-11T11:53:20.293671Z"
400
When there are issues, such as invalid arguments in the client request:
{
"status": 400,
"code": "INVALID_ARGUMENT",
"message": "Client specified an invalid argument, request body or query param"
}
401
When there is an authentication issue with the client request, which means the request was not authenticated due to missing, invalid, or expired credentials
{
"status": 401,
"code": "UNAUTHENTICATED",
"message": "Authorization failed: ..."
}
403
When a client does not have the right or enough permissions to access device data:
{
"status": 403,
"code": "PERMISSION_DENIED",
"message": "Operation not allowed: ..."
}
409
When there's a conflict with two requests, for example, there are two different requests for the same phone number (MSISDN):
{
"status": 409,
"code": "CONFLICT",
"message": "Another request is created for the same MSISDN"
}
500
For internal server errors, you can contact Network as Code support team.
{
"status": 500,
"code": "INTERNAL",
"message": "Internal server error"
}
503
Service is unavailable. Typically the server is down. Contact Network as Code support team and check when the service will return.
{
"status": 503,
"code": "UNAVAILABLE",
"message": "Service unavailable"
}
Last updated on May 21, 2024