Core - Addresses
The base url for the APIs in this page is at:
/api/mobile/
A JSON file with OpenAPI data about all core-related admin APIs can be downloaded here
.
Get address list
Retrieves the paged list of addresses for th user
Returns the list of all the documents of the specified end user:
[
{
ID: 1234, // Int
CreatedDate: "2021-01-01Z00:00:00T", // Date
LastUpated: "2021-01-01Z00:00:00T", // Date
LastUpdatedBy: "Administrator", // String (nullable)
DeletionDate: null, // Date (nullable)
Type: 0, // Int
Country: "ITA", // String
County: "MI", // String
City: "Milan", // String
ZipCode: "20021", // String
StreetAddress: "Piazza del Duomo", // String
Number: "1", // String
ExtraData: "..." // String (nullable)
},
...
]
The Type
property value can be one of the AddressType enumeration.
The Country
property value is a country code in the ISO3661 alpha-3 format.
Add or edit an address
Allows the operator to add a new address on the user or edit an existing one
The API accepts a request body in the following format:
{
ID: 1234, // Int
Type: 0, // Int
Country: "ITA", // String
County: "MI", // String
City: "Milan", // String
ZipCode: "20021", // String
StreetAddress: "Piazza del Duomo", // String
Number: "1", // String
ExtraData: "..." // String (nullable)
}
and might respond with one of the following errors:
err_InvalidElement
One of the required data is not set, or the
Country
property is not a valid ISO3661 alpha-3 country codeerr_DuplicatedElement
The operator is trying to add a new residential/living address on a user that already has one
Delete an address
Allows the user to mark an address as deleted
The API might respond with one of the following errors:
err_ElementDoesNotExist
No address has been found for the provided ID
err_ElementAlreadyDeleted
The address related to the provided ID is already marked as deleted
err_CannotDelete
The address relatedo to the provided ID is a primary residence address, and thus cannot be deleted
Get list of country codes
Gets a list of country codes available on the database:
Returns a positive Json response with list of the country codes and their localized name for issuing authorities:
{
[
{
Code: "AUT",
Label: "Austria"
},
{ ... }
}
The Code
property value is a country code in the ISO3661 alpha-3 format.