Skip to content

Updates the description of an existing basket. The description must not be empty. If the location is not given or invalid it falls back to the user's home. Returns the updated basket.

PUT
/api/baskets/{basketId}

Authorizations

api_key
Type: API Key (header: X-CSRF-Token)

Parameters

Path Parameters

basketId*
Typestring
Required

Request Body

JSON
{
"id": 0,
"description": "string",
"pictures": [
"string"
],
"contactTypes": [
0
],
"mobile": "string",
"telephone": "string",
"lat": 0,
"lon": 0,
"lifeTimeInDays": 0,
"weightInGrams": 0,
"status": 0,
"location": {
"lat": 52.5,
"lon": 13.4
},
"creator": {
"id": 0,
"name": "string",
"avatar": "string",
"isSleeping": true
},
"created": 0,
"updated": 0,
"until": 0,
"requestCount": 0
}

Responses

Authorization
api_key
Variables
Key
Value
basketId*
cURL
curl -X PUT \
'http://localhost/api/baskets/{basketId}' \
 --data '{
  "id": 0,
  "description": "string",
  "pictures": [
    "string"
  ],
  "contactTypes": [
    0
  ],
  "mobile": "string",
  "telephone": "string",
  "lat": 0,
  "lon": 0,
  "lifeTimeInDays": 0,
  "weightInGrams": 0,
  "status": 0,
  "location": {
    "lat": 52.5,
    "lon": 13.4
  },
  "creator": {
    "id": 0,
    "name": "string",
    "avatar": "string",
    "isSleeping": true
  },
  "created": 0,
  "updated": 0,
  "until": 0,
  "requestCount": 0
}'

Samples

cURL
curl -X PUT http://localhost/api/baskets/{basketId}
JavaScript
fetch("http://localhost/api/baskets/{basketId}", { method: "PUT" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/baskets/{basketId}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.put("http://localhost/api/baskets/{basketId}")
print(response.json())