Delete Zone from ID

DELETE
https://api.woosmap.com/zones/{zone_id}

Used to delete one Zone. The zone_id is the id of the zone to delete. To delete several zones, use the comma as a separator.

Authorization

private_key
apiKey query

A Private key generated specifically to authenticate API requests on server side. Required for Data management API. See how to register a Private API Key.

Path Parameters

zone_id
string required

ID of the zone to delete

Example: ZoneA

Response

200 application/json

Zones successfully deleted

status
string

the status of the 2OO Zones response

Example: success
message
string

message returned with the 2OO Zones request

Example: Zones successfully updated.

Errors

401

Unauthorized. Incorrect authentication credentials.

application/json
detail
string

Details for the credentials error

Example: Incorrect authentication credentials. Please check or use a valid API Key
403

Forbidden. This Woosmap API is not enabled for this project.

application/json
detail
string

Details for the forbidden error message

Example: This Woosmap API is not enabled for this project.
        curl -L -X DELETE 'https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY'

    
        import requests

url = "https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY"

payload={}
headers = {}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)


    
        var axios = require('axios');

var config = {
  method: 'delete',
  url: 'https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY',
  headers: { }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});


    
        
{
"status": "ok",
"message": "Zone ZoneA deleted."
}
        
{
"detail": "Incorrect authentication credentials. Please check or use a valid API Key"
}
        
{
"detail": "This Woosmap API is not enabled for this project."
}
Was this helpful?