Geography Sets
List Geography Sets
The geography_set
endpoint allows clients to retrieve the full list of
geography sets available to the currently authenticated user and selected customer.
GET /api/customer/:customer_id/geography_set
Retrieve a list of geography sets configured in the underlying OCNCC system for a specific customer, and which the current authenticated user has access to:
Parameter | Example | Description |
---|---|---|
customer_id
|
7189
|
The customer for which the available geography sets should be retrieved |
Response Content
The response will be a JSON array of objects, with each object consisting of the following information. Unlike most other responses the key name are shortened due to the quantity of data transferred with the geography set response:
Key | Type | Description |
---|---|---|
customer_id |
Integer | The unique ID of the customer, as provided in the request. |
id |
Integer | The unique ID of the geography set. |
entries |
Array | An array of objects representing each configured location in the geography set. |
name |
String | The full name of the geography set. |
Each Entry in the entries
array is an object, an consists of the following information:
Key | Type | Description |
---|---|---|
el |
Integer | The level in the geography set tree that this location entry appears at. |
d |
String | A description of the entry, if one is stored in the underlying OCNCC database. |
id |
Integer | The unique ID of the location entry. |
n |
String | The name of the location. |
pe |
Integer | If this entry is a child of another location entry, the ID of the parent entry. |
p |
Integer | The prefix that is used when matching a location to a number. The prefix may consist of numbers 0-9 and also letters A-F or a-f. |
Examples
Request:
curl 'http://localhost/jarvis-agent/n2fe/api/customer/3143/geography_set' -H 'Cookie: N2FE_CGISESSID=48ac880f98504e81373207d62dd2f807'
Response:
[
{
"entries" : [
{
"el" : "1",
"n" : "Adelaide",
"id" : "1078974"
},
{
"n" : "Albany",
"el" : "1",
"id" : "1078981"
},
...
{
"p" : "08998",
"id" : "1079772",
"pe" : "1079771",
"el" : "2",
"n" : "08998"
},
{
"el" : "2",
"n" : "08999",
"id" : "1079773",
"p" : "08999",
"pe" : "1079771"
}
],
"id" : "155",
"customer_id" : "3143",
"name" : "Location Table"
},
...
]