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
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the tenant to which the subscription belongs |
sub_id | integer | Index of the subscription for which you want to list the addresses |
URL/Query parameters
Parameter | Type | Description | Required? |
---|---|---|---|
search | string | Used to perform a search through full_address that look like the string passed | no |
sort | string | Allows to specify one searchable property of an address to apply a sorting operation | no |
dir | string | When performing a sort operation, specifies the type. Allowed values are asc for ascending (default) or desc for descending | no |
page_size | integer | Used for pagination, determines the maximum number of records on one page of results (defaults to 10) | no |
page | integer | Used for pagination, determines the returned page from the collection of result pages (defaults to 1) | no |
Response
Status codes
Parameter | Description |
---|---|
200 | One or more addresses found |
400 | Error while processing the request |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
addresses | array | List containing all addresses found for the subscription | no |
Address Object
Parameter | Type | Description | Conditional? |
---|---|---|---|
id | integer | Index of the address | no |
address | string | Full address | no |
data | object | An address data object | no |
format | string | The address format type | no |
full_address | string | The full address | no |
Address Data Object
Parameter | Type | Description | Conditional? |
---|---|---|---|
number | integer | The number | no |
street | string | The street | no |
city | string | The city | no |
state | string | The state | no |
postalCode | integer | The postal code | no |
country | string | The country | no |
isoCode | string | The isoCode | no |
Address Format Type
Name of the address format type.
Value in enumeration:
Example
{
"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
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the tenant for which you want to get its subscriptions |
sub_id | integer | Index of the subscription for which you want to update a address |
id | integer | Index of the address you want to retrieve |
URL/Query parameters
N/A
Response
Status codes
Parameter | Description |
---|---|
200 | The address if found |
400 | Error while processing the request |
403 | The API consumer doesn't have sufficient rights to perform this action |
404 | No address found |
500 | Uncatched error on server side |
Success
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
id | integer | Index of the address | no |
address | string | Full address | no |
data | object | An address data object | no |
format | string | The address format type | no |
full_address | string | The full address | no |
Example
{
"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
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the tenant to which the subscription belongs |
sub_id | integer | Index of the subscription to which you want to add a address |
URL/Query parameters
N/A
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
data | object | An address data object | no |
format | string | The address format type | no |
full_address | string | The full address | no |
Example
{
"data": {
"number": 12,
"street": "Rue du Trône",
"city": "Bruxelles",
"state": "Bruxelles",
"postalCode": 1050,
"country": "Belgium",
"isoCode": "BE"
},
"format": "google"
}
Response
Status codes
Parameter | Description |
---|---|
201 | The address was created successfully |
400 | Error while creating the address |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
id | integer | Index of the address | no |
address | string | Full address | no |
data | object | An address data object | no |
format | string | The address format type | no |
full_address | string | The full address | no |
Example
{
"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
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the tenant for which you want to modify the address |
sub_id | integer | Index of the subscription for which you want to update a address |
id | integer | Index of the address you want to update |
<URL/Query parameters>
N/A
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
data | object | An address data object | no |
format | string | The address format type | no |
full_address | string | The full address | no |
Example
{
"data": {
"number": 15,
"street": "Rue du Trône",
"city": "Bruxelles",
"state": "Bruxelles",
"postalCode": 1050,
"country": "Belgium",
"isoCode": "BE"
},
"format": "google"
}
Response
Status codes
Parameter | Description |
---|---|
200 | The address was updated successfully |
400 | Error while updating the address |
403 | The API consumer doesn't have sufficient rights to perform this action |
404 | The address does not exist |
500 | Uncatched error on server side |
Success
Body
Parameter | Type | Description | Conditional? |
---|---|---|---|
id | integer | Index of the address | no |
address | string | Full address | no |
data | object | An address data object | no |
format | string | The address format type | no |
full_address | string | The full address | no |
Example
{
"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
Parameter | Type | Description |
---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the tenant that owns the subscription |
sub_id | integer | Index of the subscription for which you want to delete a address |
id | integer | Index of the address you want to delete |
URL/Query parameters
N/A
Body
N/A
Response
Status codes
Parameter | Description |
---|---|
204 | The address was deleted successfully. If the address didn't exist, delete will be considered as being executed successfully |
400 | Error while deleting the address |
403 | The API consumer doesn't have sufficient rights to perform this action |
500 | Uncatched error on server side |
Success
Body
N/A