Core - Addresses

The base url for the APIs in this page is at:

/api/admin/

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 a user

GET /v1/end-users/{guid}/addresses/list

Gets the list of address for a specific user

Parameters
  • guid (string) –

Status Codes
guid: User Guid

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

POST /v1/end-users/{guid}/addresses

Persists edits about a new or existing address

Parameters
  • guid (string) –

Status Codes
guid: User Guid

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 code

err_DuplicatedElement

The operator is trying to add a new residential/living address on a user that already has one

Delete an address

Allows the operator to mark an address as deleted

DELETE /v1/end-users/{guid}/addresses/{id}

Marks a specific address as deleted

Parameters
  • id (integer) – The address to delete

  • guid (string) –

Status Codes
guid: User Guid
id: ID of the address to delete

The API might respond with one of the following errors:

err_ElementDoesNotExist

No address has been found for the provided ID, or the found address 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:

GET /v1/addresses/country-codes

Gets a list of country codes

Status Codes

Returns a positive Json response with list of the country codes for issuing authorities, in the ISO3661 alpha-3 format:

{
  [ "AUT","CHE","FRA","ITA","SVN" ]    // String Array
}