Skip to content

Addresses


Once a tenant has a subscription, you have to define one or more physical addresses at subscription level. These addresses will be then linked to one or more numbers in the subscription. This allows our customers to be compliant with the emergency law.

List all addresses of a subscription

Use this endpoint to retrieve all addresses currently assigned to a subscription.

Request

Endpoint

GET /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/addresses

Authorization

Required role

tenants.instance.subscriptions.instance.addresses.list

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription for which you want to list the addresses

URL/Query parameters

ParameterTypeDescriptionRequired?
searchstringUsed to perform a search through full_address that look like the string passedno
sortstringAllows to specify one searchable property of an address to apply a sorting operationno
dirstringWhen performing a sort operation, specifies the type. Allowed values are asc for ascending (default) or desc for descendingno
page_sizeintegerUsed for pagination, determines the maximum number of records on one page of results (defaults to 10)no
pageintegerUsed for pagination, determines the returned page from the collection of result pages (defaults to 1)no

Response

Status codes

ParameterDescription
200One or more addresses found
400Error while processing the request
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Success

Body
ParameterTypeDescriptionConditional?
addressesarrayList containing all addresses found for the subscriptionno
Address Object
ParameterTypeDescriptionConditional?
idintegerIndex of the addressno
addressstringFull addressno
dataobjectAn address data objectno
formatstringThe address format typeno
full_addressstringThe full addressno
Address Data Object
ParameterTypeDescriptionConditional?
numberintegerThe numberno
streetstringThe streetno
citystringThe cityno
statestringThe stateno
postalCodeintegerThe postal codeno
countrystringThe countryno
isoCodestringThe isoCodeno

Address Format Type

Name of the address format type.

Value in enumeration:

  • google
Example
json
{
    "addresses": [
        {
            "id": 1,
            "data": {
                "number": 12,
                "street": "Rue du Trône",
                "city": "Bruxelles",
                "state": "Bruxelles",
                "postalCode": 1050,
                "country": "Belgium",
                "isoCode": "BE"
            },
            "format": "google",
            "full_address": "Rue du Trône, 12, Bruxelles"
        }
    ]
}

Get a specific address

The following endpoint returns a specific address.

Request

Endpoint

GET /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/addresses/{id}

Authorization

Required role

tenants.instance.subscription.instance.addresses.read

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant for which you want to get its subscriptions
sub_idintegerIndex of the subscription for which you want to update a address
idintegerIndex of the address you want to retrieve

URL/Query parameters

N/A

Response

Status codes

ParameterDescription
200The address if found
400Error while processing the request
403The API consumer doesn't have sufficient rights to perform this action
404No address found
500Uncatched error on server side

Success

Body
ParameterTypeDescriptionConditional?
idintegerIndex of the addressno
addressstringFull addressno
dataobjectAn address data objectno
formatstringThe address format typeno
full_addressstringThe full addressno
Example
json
{
    "id": 1,
    "data": {
        "number": 12,
        "street": "Rue du Trône",
        "city": "Bruxelles",
        "state": "Bruxelles",
        "postalCode": 1050,
        "country": "Belgium",
        "isoCode": "BE"
    },
    "format": "google",
    "full_address": "Rue du Trône, 12, Bruxelles"
}

Create a new address

Use this endpoint to create a new address

Request

Endpoint

POST /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/addresses

Authorization

Required role

tenants.instance.subscriptions.instance.addresses.create

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription to which you want to add a address

URL/Query parameters

N/A

Body
ParameterTypeDescriptionConditional?
dataobjectAn address data objectno
formatstringThe address format typeno
full_addressstringThe full addressno

Example

json
{
    "data": {
        "number": 12,
        "street": "Rue du Trône",
        "city": "Bruxelles",
        "state": "Bruxelles",
        "postalCode": 1050,
        "country": "Belgium",
        "isoCode": "BE"
    },
    "format": "google"
}

Response

Status codes

ParameterDescription
201The address was created successfully
400Error while creating the address
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Success

Body
ParameterTypeDescriptionConditional?
idintegerIndex of the addressno
addressstringFull addressno
dataobjectAn address data objectno
formatstringThe address format typeno
full_addressstringThe full addressno
Example
json
{
    "id": 1,
    "data": {
        "number": 12,
        "street": "Rue du Trône",
        "city": "Bruxelles",
        "state": "Bruxelles",
        "postalCode": 1050,
        "country": "Belgium",
        "isoCode": "BE"
    },
    "format": "google",
    "full_address": "Rue du Trône, 12, Bruxelles"
}

Modify an existing address

Use this endpoint to modify an existing address for a subscription.

Request

Endpoint

PUT /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/addresses/{id}

Authorization

Required role

tenants.instance.subscriptions.instance.addresses.instance.update

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant for which you want to modify the address
sub_idintegerIndex of the subscription for which you want to update a address
idintegerIndex of the address you want to update

<URL/Query parameters>

N/A

Body

ParameterTypeDescriptionConditional?
dataobjectAn address data objectno
formatstringThe address format typeno
full_addressstringThe full addressno

Example

json
{
    "data": {
        "number": 15,
        "street": "Rue du Trône",
        "city": "Bruxelles",
        "state": "Bruxelles",
        "postalCode": 1050,
        "country": "Belgium",
        "isoCode": "BE"
    },
    "format": "google"
}

Response

Status codes

ParameterDescription
200The address was updated successfully
400Error while updating the address
403The API consumer doesn't have sufficient rights to perform this action
404The address does not exist
500Uncatched error on server side

Success

Body
ParameterTypeDescriptionConditional?
idintegerIndex of the addressno
addressstringFull addressno
dataobjectAn address data objectno
formatstringThe address format typeno
full_addressstringThe full addressno
Example
json
{
    "id": 1,
    "data": {
        "number": 15,
        "street": "Rue du Trône",
        "city": "Bruxelles",
        "state": "Bruxelles",
        "postalCode": 1050,
        "country": "Belgium",
        "isoCode": "BE"
    },
    "format": "google",
    "full_address": "Rue du Trône, 15, Bruxelles"
}

Delete a address

Use this endpoint to delete an existing address for a subscription on the platform.

Request

Endpoint

DELETE /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/addresses/{id}

Authorization

Required role

tenants.instance.subscriptions.instance.addresses.instance.delete

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant that owns the subscription
sub_idintegerIndex of the subscription for which you want to delete a address
idintegerIndex of the address you want to delete

URL/Query parameters

N/A

Body

N/A

Response

Status codes

ParameterDescription
204The address was deleted successfully. If the address didn't exist, delete will be considered as being executed successfully
400Error while deleting the address
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Success

Body

N/A