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
| Field | Type | Required | Description |
|---|---|---|---|
items | array | Yes | Array of cart items (1–100) |
Each item:
| Field | Type | Required | Description |
|---|---|---|---|
ensNameId | number | Yes | Database ID of the ENS name |
cartType | string | Yes | Cart 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
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid request body |
| 400 | INVALID_CART_TYPES | One or more cart types do not exist |
| 401 | UNAUTHORIZED | Missing or invalid token |
| 404 | ENS_NAMES_NOT_FOUND | One or more ENS name IDs not found |
| 500 | INTERNAL_ERROR | Failed to bulk add to cart |
Last updated on