# Property labels

In this section you will see how to obtain and store the labels for your Wasi website properties.

# Get all the labels

To get the list of all the labels for properties in Wasi, you have the URI:

api.wasi.co/v1/property/label/all

This should return a JSON similar to this one:

{
    "0": {
        "id_label": 1,
        "label": "Promocion",
        "label_color": "#4a6496"
    },
    "1": {
        "id_label": 2,
        "label": "Novedad",
        "label_color": "#39b025"
    },

    "status": "success"
}

# Get a label

To get a label for property in Wasi, you have the URI:

api.wasi.co/v1/property/label/get/#id_label

For a sample label whose id_label is 1, the URI would be

api.wasi.co/v1/property/label/get/1

This should return a JSON similar to this one:

{
    "id_label": 1,
    "label": "Novedad",
    "label_color": "#333",
    "status": "success"
}

# Add a label

To add a new label for properties in Wasi, you have the URI:

POST api.wasi.co/v1/property/label/add

# Parameters

Name Type Detail
name String New label name.
color String Hexadecimal color code for the new label.

❗ ️ Important

The request can only be sent via POST, as it is important to remember that for all requests it is also necessary to send the access credentials, see Access Credentials.

# Update label

To update a label for property in Wasi, you have the URI:

api.wasi.co/v1/property/label/update/#id_label

# Parameters

Name Type Detail
name String New label name.
color String Hexadecimal color code for the new label.

This should return a JSON like the next one:

{
    "id_label": 3,
    "label": "Nuevo",
    "label_color": "#333",
    "status": "success"
}

❗️ Important

The request can only be sent via POST, as it should be remembered that for all requests it is also necessary to send the access credentials, see Access Credentials.

# Remove label

To remove a property label in Wasi, you have the URI:

POST api.wasi.co/v1/property/label/delete/#id_label

For example if you want to remove the label with id_label 3, you should do the following:

api.wasi.co/v1/property/label/delete/3

This should return a JSON like the one below:

{
    "status":"success"
}

❗️ Importante

The request can only be sent via POST, as it should be remembered that for all requests it is also necessary to send the access credentials, see Access Credentials.

Last Updated: 8/3/2020, 9:51:52 PM