Skip to Content

POST /api/v1/cart/bulk

Add multiple ENS names to the cart in a single request (up to 100 items). Existing duplicates are skipped silently.

Authentication: Required

Cache: None

Request Body

FieldTypeRequiredDescription
itemsarrayYesArray of cart items (1–100)

Each item:

FieldTypeRequiredDescription
ensNameIdnumberYesDatabase ID of the ENS name
cartTypestringYesCart type name

Sample Request

curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ https://api.grails.app/api/v1/cart/bulk \ -d '{ "items": [ { "ensNameId": 42, "cartType": "buy" }, { "ensNameId": 43, "cartType": "buy" } ] }'

Response

// 200 OK { "success": true, "data": { "message": "Added 2 items to cart", "addedCount": 2, "totalRequested": 2, "skippedCount": 0 }, "meta": { "timestamp": "2026-04-08T00:00:00.000Z", "version": "1.0.0" } }

Error Responses

StatusCodeDescription
400VALIDATION_ERRORInvalid request body
400INVALID_CART_TYPESOne or more cart types do not exist
401UNAUTHORIZEDMissing or invalid token
404ENS_NAMES_NOT_FOUNDOne or more ENS name IDs not found
500INTERNAL_ERRORFailed to bulk add to cart
Last updated on