Body
Required
-
city
string City where gym is located
-
street
string Street where gym is located
-
building
string(date) Building number
-
description
string Gym's description
POST
/gym
curl \
--request POST 'http://63.141.232.244:25540/v0/gym' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"city":"Казань","street":"Хади Такташа","building":"24","description":"Фитнес-клуб премиум-класса, расположенный в самом сердце Казани."}'
Request examples
{
"city": "Казань",
"street": "Хади Такташа",
"building": "24",
"description": "Фитнес-клуб премиум-класса, расположенный в самом сердце Казани."
}
Response examples (200)
{
"success": true,
"gym": {
"city": "Казань",
"gym_id": 1,
"street": "Хади Такташа",
"building": "24",
"description": "Фитнес-клуб премиум-класса, расположенный в самом сердце Казани."
}
}
Response examples (400)
{
"success": false,
"error": [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"client_id"
],
"message": "Required"
}
]
}
Response examples (401)
{
"success": false,
"error": "Unauthorized"
}
Response examples (429)
{
"success": false,
"error": "Too many requests, please try again later"
}