Bulk upsert banner types

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

HeaderValue
AuthorizationBearer <token>
Content-Typeapplication/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.

FieldTypeRequiredDescription
idintegerNoID of an existing banner type to update. Omit to create a new banner type.
namestringYesDisplay 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"
  }
]