grants

PUT /api/grants/{id}

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

Path parameters

idinteger required

A unique integer value identifying this airtime grant.

Request body

state'cancelled'

Only 'cancelled': withdraw the grant and free its window.

  • cancelled - cancelled
locksAtstring date-time
lockExemptboolean
starttimestring date-time

Move the start, until the grant is on air. A start that has passed means now. Entries that no longer fit come off the list; an earlier start needs the extra time to be free.

endtimestring date-time

Move the end, even while the grant is on air: what is on air past it is cut short there. Entries that no longer fit come off the list. A later end needs the extra time to be free.

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/GrantsUpdateValidationError]/errors/items response property oneOf list for the response status

    • info

      added the new optional request property endtime

    • info

      added the new optional request property starttime

    3 more changes in this revision