Appearance
Update Clothing Item
PUT
/api/v1/clothing-item/{clothing_item_id}
Update an existing clothing item's name and description. To update the image, we ask you to create a new clothing item with the desired image.
Authorizations
HTTPBearer
TypeHTTP (bearer)
Parameters
Path Parameters
clothing_item_id*
Typeinteger
RequiredRequest Body
JSON
{
"clothing_item_name": "string",
"description": "string"
}
Responses
Successful Response
application/json
JSON
{
"clothing_item_id": 0,
"clothing_item_name": "string",
"description": "string",
"clothing_item_url": "string",
"clothing_item_back_url": "string",
"created_at": "string",
"updated_at": "string"
}
PUT
/api/v1/clothing-item/{clothing_item_id}
Samples
cURL
curl -X PUT \
'https://api.uwear.ai/api/v1/clothing-item/{clothing_item_id}' \
-H "Content-Type: application/json"
JavaScript
fetch('https://api.uwear.ai/api/v1/clothing-item/{clothing_item_id}', {method:'PUT',headers:{'Content-Type':'application/json'}})
.then(response => response.json())
.then(data => console.log(data));
PHP
<?php
$url = 'https://api.uwear.ai/api/v1/clothing-item/{clothing_item_id}';
$method = 'PUT';
$headers = [
'Content-Type' => 'application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Python
import requests
url = 'https://api.uwear.ai/api/v1/clothing-item/{clothing_item_id}'
headers = {
'Content-Type': 'application/json'
}
response = requests.put(url, headers=headers)
print(response.json())