Success Response-type
When an API call is successful, the JSend object is used as a simple envelope for the results, using the data key, as in the example below. On the transport level, the Success response-type is combined with a HTTP status code from the Success range (200-299), or the Redirection range (300-399).
Required keys
- status: Will always be set to “success”.
- data: Wrapper for any data returned by the API call. If the call returns no data, it will be set to null.
The contents of the data key will vary depending on the returned data. The Model definitions in chapter 8 provide information on the data key contents.
{
"status": "success",
"data": {
"addressType": "address",
"street": "Kanaalweg",
"streetAbbreviated": "Kanaalwg",
"houseNumber": 1,
"postalCode": "8758LD",
"city": "Allingawier",
"municipality": "Súdwest-Fryslân",
"municipalityCode": "1900",
"province": "Friesland",
"countryCode": "NL",
"formattedAddress": "Kanaalweg 1, 8758 LD Allingawier",
"bagNumberDesignationId": "0710200000157674",
"bagAddressableObjectId": "0710010000157675",
"geolocation": {
"centroid": {
"type": "Point",
"coordinates": [
5.44582368,
53.04813722
]
},
"rdCentroid": {
"x": 158930.877,
"y": 562362.74
}
}
}
}
Note: while the JSON examples in this document are formatted for readability, the JSON returned by the API does not contain formatting whitespaces. The actual JSON returned in the example above will be:
{“status”: “success”,“data”: {“addressType”: “address”,“street”: “Kanaalweg”,“streetAbbreviated”: “Kanaalwg”,“houseNumber”: 1,“postalCode”: “8758LD”,“city”: “Allingawier”,“municipality”: “Súdwest-Fryslân”,“municipalityCode”: “1900”,“province”: “Friesland”,“countryCode”: “NL”,“formattedAddress”: “Kanaalweg 1, 8758 LD Allingawier”,“bagNumberDesignationId”: “0710200000157674”,“bagAddressableObjectId”: “0710010000157675”,“geolocation”: {“centroid”: {“type”: “Point”,“coordinates”: [5.44582368,53.04813722]},“rdCentroid”: {“x”: 158930.877,“y”: 562362.74}}}}