Advanced API Endpoints

POST

method

Description:

Create a new cat/owner

JSON Body:

					
					{
	"name": string,
    "type": string,
    "legs": number,
    "tail": boolean,
	"color": string,
	"image": string,
	"owner": string | null,
}

				

Response:

					
					{
    "id": string,
    "name": string,
    "type": string,
    "legs": number,
    "tail": boolean,
	"color": string,
	"image": string,
	"owner": string | null,
	"created_at": string,
	"deleted_at": string | null,
	"updated_at": string
}
				

PUT

method

Description:

Update a cat/owner

JSON Body:

					
					{
	"name": string,
    "type": string,
    "legs": number,
    "tail": boolean,
	"color": string,
	"image": string,
	"owner": string | null,
}

				

Response:

					
					{
    "id": string,
    "name": string,
    "type": string,
    "legs": number,
    "tail": boolean,
	"color": string,
	"image": string,
	"owner": string | null,
	"created_at": string,
	"deleted_at": string | null,
	"updated_at": string
}
				

DELETE

method

Description:

Delete a cat/owner

Response:

					
					ok