Create a new robot
POST/robots
The Create Robot request allows you to create a new robot in ANSCER FMS.
Request
- application/json
Body
required
manufacturer stringrequired
serialNumber stringrequired
Responses
- 201
- 400
- 401
- 403
- 409
- 500
Robot created
- application/json
- Schema
- Example (from schema)
Schema
_id uuid
manufacturer string
serialNumber string
robotStatus string
Possible values: [pending, active, inactive]
createdAt date-time
updatedAt date-time
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"manufacturer": "string",
"serialNumber": "string",
"robotStatus": "pending",
"createdAt": "2025-06-05T13:40:40.447Z",
"updatedAt": "2025-06-05T13:40:40.447Z"
}
Bad Request due to validation errors in the request body
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Validation failed.",
"errors": [
{
"field": "serialNumber",
"message": "Serial Number is required."
},
{
"field": "manufacturer",
"message": "Manufaturer is required."
}
]
}
{
"message": "Validation failed.",
"errors": [
{
"field": "serialNumber",
"message": "Serial Number is required."
},
{
"field": "manufacturer",
"message": "Manufaturer is required."
}
]
}
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 robot with the given serial number already exists.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "A robot with the given serial number already exists."
}
{
"message": "A robot with the given serial number 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...