Creates or updates banner types in bulk. Any existing banner types not included in the request are deleted. This endpoint is the authoritative source for the full set of banner types.
Request
PUT /banner-type/bulk
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
Request Body
A JSON array of banner type objects. To create a new banner type, omit the id field. To update an existing one, include its id.
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | No | ID of an existing banner type to update. Omit to create a new banner type. |
name | string | Yes | Display name of the banner type. |
Example Request
[
{ "id": 1, "name": "Hero" },
{ "id": 2, "name": "Sidebar" },
{ "name": "Product Badge" }
]Response
Returns a JSON array of all banner type objects after the upsert. Banner types not present in the request body are removed.
Example Response
[
{
"id": 1,
"name": "Hero"
},
{
"id": 2,
"name": "Sidebar"
},
{
"id": 5,
"name": "Product Badge"
}
]
