Skip to content

Create warranty

POST
/api/warranties
curl --request POST \
--url http://localhost:3000/api/warranties \
--header 'Content-Type: application/json' \
--cookie session=<session> \
--data '{ "name": "example", "assetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "provider": "example", "type": "example", "startDate": "example", "endDate": "example", "cost": "example", "status": "example", "notes": "example" }'
Media type application/json
object
name
required
string
assetId
string format: uuid
provider
string
type
string
startDate
string
endDate
string
cost
string
status
string
notes
string
Example generated
{
"name": "example",
"assetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"provider": "example",
"type": "example",
"startDate": "example",
"endDate": "example",
"cost": "example",
"status": "example",
"notes": "example"
}

Warranty created

Media type application/json
object
data
object
id
required
string format: uuid
name
required
string
assetId
string format: uuid
nullable
provider
string
nullable
type
string
nullable
startDate
string
nullable
endDate
string
nullable
cost
string
nullable
status
string
nullable
notes
string
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example generated
{
"data": {
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example",
"assetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"provider": "example",
"type": "example",
"startDate": "example",
"endDate": "example",
"cost": "example",
"status": "example",
"notes": "example",
"createdAt": "2026-04-15T12:00:00Z",
"updatedAt": "2026-04-15T12:00:00Z"
}
}

Validation error

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}

Not authenticated

Media type application/json
object
error
required
string
Example
{
"error": "Not found"
}