Create a new store
POST/stores
Create a new store.
Request
- application/json
Body
required
name stringrequired
username stringrequired
password stringrequired
bufferLocations uuid[]
callingStations uuid[]
properties object
Responses
- 201
- 400
- 401
- 403
- 409
- 500
Store created
- application/json
- Schema
- Example (from schema)
Schema
_id uuid
name string
username string
bufferLocations uuid[]
callingStations uuid[]
properties object
createdAt date-time
updatedAt date-time
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"username": "string",
"bufferLocations": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"callingStations": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"properties": {},
"createdAt": "2024-12-03T13:25:45.051Z",
"updatedAt": "2024-12-03T13:25:45.051Z"
}
Bad Request due to validation errors in the request body
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Validation failed.",
"errors": [
{
"field": "name",
"message": "Name is required."
},
{
"field": "email",
"message": "Email must be a valid email address."
}
]
}
{
"message": "Validation failed.",
"errors": [
{
"field": "name",
"message": "Name is required."
},
{
"field": "email",
"message": "Email must be a valid email address."
}
]
}
Unauthorized.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Authentication token not provided."
}
{
"message": "Authentication token not provided."
}
Forbidden.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Access to this resource is forbidden."
}
{
"message": "Access to this resource is forbidden."
}
A store with the given details already exists.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "A store with the given details already exists."
}
{
"message": "A store with the given details already exists."
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Internal Server Error. Please try again later."
}
{
"message": "Internal Server Error. Please try again later."
}
Loading...