Kittens - Backend Documentation 1.0 Help

User Cart

These endpoints manage the user's cart. Three methods are available on this endpoint

  • GET

  • PUT (requires authentication and account ownership)

  • DELETE (requires authentication and account ownership)

GET

GET method/api/v1/users/{uid}/cart

Fetch the user's cart contents.

Request parameters

Responses

{ "billable": { "amount": "42.00", "currency": "EUR", "vat": "9.24" }, "cart": [ "ffffffff-ffff-ffff-ffff-ffffffffffff" ] }
{ "error": "Unauthorized", "status": 401, "reason": "Unauthorized" }
{ "error": "Not found", "status": 404, "reason": "Requested path could not be found" }
{ "error": "Server Error", "status": 500, "exception": "Baz given, expected Foo or Bar", "trace": "example", "thrownIn": "\App\Foo\Bar\Baz()", "file": "example", "line": 58, "severity": "example" }

PUT

PUT method/api/v1/users/{uid}/cart

Add a cat to the user's cart.

Request parameters

Responses

{ "cartItems": 42, "catUid": "ffffffff-ffff-ffff-ffff-ffffffffffff" }
{ "cartItems": 42, "catUid": "ffffffff-ffff-ffff-ffff-ffffffffffff" }
{ "error": "Bad Request", "status": 400, "field_errors": [ "email" ] }
{ "error": "Unauthorized", "status": 401, "reason": "Unauthorized" }
{ "error": "Not found", "status": 404, "reason": "Requested path could not be found" }
{ "error": "Server Error", "status": 500, "exception": "Baz given, expected Foo or Bar", "trace": "example", "thrownIn": "\App\Foo\Bar\Baz()", "file": "example", "line": 58, "severity": "example" }

DELETE

DELETE method/api/v1/users/{uid}/cart

Delete one or more cats from the user's cart.

Request parameters

{ "cats": [ "ffffffff-ffff-ffff-ffff-ffffffffffff" ] }

Responses

{ "catsRemoved": 58 }
{ "error": "Bad Request", "status": 400, "field_errors": [ "email" ] }
{ "error": "Unauthorized", "status": 401, "reason": "Unauthorized" }
{ "error": "Not found", "status": 404, "reason": "Requested path could not be found" }
{ "error": "Server Error", "status": 500, "exception": "Baz given, expected Foo or Bar", "trace": "example", "thrownIn": "\App\Foo\Bar\Baz()", "file": "example", "line": 58, "severity": "example" }
Last modified: 16 January 2025