Remove Tag
The Remove Tag method allows you to remove the tag.
Request
IMPORTANT: Do not send more than 10 concurrent API requests.
Body Example
{
"name": "tag-api-test"
}
Parameters
| Title | Type | Default | Description |
|---|---|---|---|
|
name required
|
string |
The name parameter is a required field that must be specified to indicate which particular tag needs to be deleted. |
Response
{
"result": true
}
Parameters
| Title | Type | Description |
|---|---|---|
|
result |
boolean |
The value indicates that the tag was successfully deleted from your account:
|
Method Errors
{
"result": false,
"errors": [ 'Error description' ]
}
| Error |
|---|
|
"Tag name must be a non-empty string" |
|
"Tag characters length should be between 2 and 50" |
|
"Any tags starting with an underscore are reserved for internal use and will cause errors" |
|
"Tags limit {limit} is reached" |
|
"Tag {tag} is not registered in account tags" |
|
"Tag name {tag} must be unique" |
|
"Tag name must contain only numbers, latin/cyrillic characters or \".\", \"-\", \"_\" symbols" |
|
"Invalid authorization token!" |
|
"Internal server error" |
|
"Bad Request" |
|
"no matches found for access token {accessToken}" |
|
"user {id} not enabled" |
|
"no data found for key {userId}" |
|
"access token check failed for key/secret $key/$accessToken" |
|
"Argument {argument} required" |
Code Examples
<?php
$accessToken = 'YOUR_API_KEY';
$url = 'https://api.wooxy.com/v3/tags/remove';
$body = json_encode([
'name' => 'tag-api-test',
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Access-Token: $accessToken",
'Content-Type: application/json',
'Content-Length: ' . strlen($body),
]);
$result = curl_exec($ch);
if ($result === false) {
echo 'cURL error: ' . curl_error($ch) . PHP_EOL;
} else {
echo $result . PHP_EOL;
}
curl_close($ch);
?>