grants

POST /api/grants

Changed on

Airtime grants: a window of airtime given to one organization, and the list of what plays in it.

Members see their organizations' grants and replace a grant's list while it is open (or until air, if it is exempt from locking). Staff see every grant, create grants, and cancel or exempt them.

Request

  • The document declares no server URL.
  • Auth
    • API key in header Authorization
    • or API key in cookie sessionid

Request body

organizationinteger required
starttimestring date-time required
endtimestring date-time required
locksAtstring date-time

Defaults to the Monday 00:00 before the grant's week airs.

lockExemptboolean

Editable until air; every save after compiling recompiles it. Staff only.

Response

idinteger required
starttimestring date-time required
endtimestring date-time required
state'open' | 'locked' | 'compiled' | 'cancelled' required
  • open - Open
  • locked - Locked
  • compiled - Compiled
  • cancelled - Cancelled
locksAtstring date-time required
lockExemptboolean required

Editable until air; every save after compiling recompiles it. Staff only.

originSlotinteger nullable required

Provenance only: the grant copied the slot's time when issued.

itemsDurationstring required

From the grant's start to the end of the list, with the gaps that start each programme on the five-minute grid.

paddedboolean required

Whether programmes start on the five-minute grid, at least 30 s after the programme before. Posters follow whatever is before them. False for a jukebox grant, which plays back to back.

canEditboolean required

Whether the requesting user may replace the list right now.

startedItemsinteger required

How many entries at the head of the list have aired, are on air or start within seconds. Staff may change what follows them, and move the end, while the grant is on air.

airedItemsinteger required

How many entries at the head of the list have finished airing. An edit must keep them first, as they are. Staff may leave out the ones between this and startedItems: that takes them off the air at once.

Changes

    • breaking

      added to the oneOf[#/components/schemas/GrantsCreateValidationError]/errors/items response property oneOf list for the response status

    • info

      added the new optional request property items/items/duration

    • info

      added the new optional request property items/items/graphic

    3 more changes in this revision