Update Tag
The Update Tag method allows you to update the tag.
Request
IMPORTANT: Do not send more than 10 concurrent API requests.
Body Example
{
"tag": "tag-api-test",
"name": "tag-api-test-2",
"description": "test-2",
}
Parameters
Title | Type | Default | Description |
---|---|---|---|
tag required
|
string |
The tag parameter is required and must specify the tag that needs to be updated. |
|
name optional
|
string |
The "name" parameter specifies the new name to which the tag should be changed. |
|
description optional
|
string |
The tag description is not a required field, but it can be useful for explaining what the tag is used for. Changing the value of the description parameter will also update it if it differs from the one previously specified. |
Response
{
"result": true
}
Parameters
Title | Type | Description |
---|---|---|
result |
boolean |
The value indicates that the tag was successfully updated in your account:
|
Method Errors
{
"result":false,
"errors":[
"Error description text"
]
}
Error |
---|
"Tag name must be a non-empty string" |
"Tag characters length should be between 2 and 30" |
"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" |
"Argument description must be a string" |
"Argument description must be a string with max length within 1000 characters" |
"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/update';
$body = json_encode([
'tag' => 'tag-api-test-2',
'name' => 'tag-api-test',
'description' => 'test-123123123',
]);
$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);