# Schemas — Content API v0.6.5

48 schemas
Source: https://plas.redia.dk/en/content/v0.6.5/schemas/

Every named schema in the specification, one level deep. A field that points at another schema links to it rather than being expanded — the specification references itself in cycles, so expanding would not terminate.

## Address

`object`

- `city` (`string`, required) — This field refers to the city, town, or locality where the address is located.
- `country` (`string`, optional) — This field specifies the name of the country where the address is located.
- `postalCode` (`string`, optional) — This field represents the numeric or alphanumeric code assigned to a specific area for efficient mail sorting and delivery.
- `street` (`string`, required) — This field represents the name of the road, street, or thoroughfare where the address is located.  
The field should also contain the building number assigned to a building at the location, and
the field should also contain identifiers such as apartment numbers, suite numbers, or floor numbers.


## AllDayScheduling

`object`

All-day event scheduling information

- `endDate` (`string (date)`, required) — End date in RFC3339 _full-date_ format.
- `startDate` (`string (date)`, required) — Start date in RFC3339 _full-date_ format.
- `type` (`string enum`, required) — `all_day` — Type of scheduling for all-day events

## ConfigurationContentResponseBody

`object`

- `uiLanguages` (`object`, optional) — This contains the ui language settings.

All ui language codes should be on this list https://www.loc.gov/marc/languages/


## ContactInfo

`object`

Contact information for registration and tickets.

At least one of the fields must be provided: `url`, `email`, `phone`, or `info`.


- `email` (`string (email)`, optional) — Email for registration/tickets
- `info` (`string`, optional) — Instructions on where to register/buy tickets
- `phone` (`string`, optional) — Phone number with country prefix for registration/tickets
- `url` (`string (uri)`, optional) — URL to registration/ticket page

## Error

`object`

- `code` ([`ErrorCode`](https://plas.redia.dk/en/content/v0.6.5/schemas/#ErrorCode), required)
- `info` ([`ErrorInfo`](https://plas.redia.dk/en/content/v0.6.5/schemas/#ErrorInfo), required)

## ErrorCode

`integer enum`
`500` · `600` · `100001` · `100023` · `100211` · `100215` · `100221` · `100411` · `100611` · `101001` · `101047` · `101053` · `102001` · `102301` · `102311` · `110001` · `200001` · `200077` · `200101` · `200103` · `300001` · `300005` · `300009` · `300013` · `300301` · `300311` · `310001` · `310011` · `330001` · `330011` · `330101` · `330111`

A number representing the type of error.

List of error codes:

- \<error code\>: \<error description\>  

- 500: System error
- 600: Unsupported Open Library API version
- 10001: Endpoint disabled
- 71001: Consent has not been given for 'loan history'
- 100001: Wrong patron username or password
- 100023: Patron ID not found
- 100211: maxNumberOfEmailAddresses exceeded
- 100215: maxNumberOfPhoneNumbers exceeded
- 100221: Pickup location cannot contain sections
- 100411: Updating patron consent failed
- 100611: Updating patron notification settings failed
- 101001: Reservation ID not found
- 101047: Branch ID cannot be used as pick up branch
- 101053: Section ID cannot be used as pick up branch
- 102001: Loan ID not found
- 102301: Loan not renewable, because it is an interlibrary loan
- 102311: Loan not renewable, because it is reserved
- 110001: Branch ID not found
- 200001: Publication ID not found
- 200077: ui language not supported
- 200101: missing required query parameter
- 200103: invalid/unsupported query parameter value
- 300001: Initialize payment should not be used
- 300005: Initialize payment should be used
- 300009: Payment method not supported
- 300013: Payment method does not support partial payment
- 300301: Finalized payment can not de changed
- 300311: FinalizePaymentRequest.fees contains fees with the same ID
- 310001: Loan history ID not found
- 310011: Loan history ID already exists
- 330001: List ID not found
- 330011: List ID already exists
- 330101: List item ID not found
- 330111: List item ID already exists


No properties in the specification — see the schema index for its form.

## ErrorInfo

`string`

Starts with the text matching the error code field (defined above), and a describing text could be added.

No properties in the specification — see the schema index for its form.

## Errors

`object`

- `errors` ([`array of Error`](https://plas.redia.dk/en/content/v0.6.5/schemas/#Error), required) — The first error should always be the most relevant.

## Event

`object`

Complete event information.

Only the field `description` can contain formatting.


- `admission` ([`EventAdmission`](https://plas.redia.dk/en/content/v0.6.5/schemas/#EventAdmission), required)
- `audiences` ([`array of EventAudience`](https://plas.redia.dk/en/content/v0.6.5/schemas/#EventAudience), optional) — Target audiences for the event
- `branch` ([`EventBranch`](https://plas.redia.dk/en/content/v0.6.5/schemas/#EventBranch), required)
- `categories` ([`array of EventCategory`](https://plas.redia.dk/en/content/v0.6.5/schemas/#EventCategory), optional) — Event categories
- `description` (`string`, required) — A detailed description of the event. Is in limited html format. Supports following html tags - b - i - p - a - ul - ol - li
- `id` (`string`, required) — Unique identifier for the event.

If multi events have the same 'id' but different language, then they are the same event.

- `images` ([`array of ImageTypeContent`](https://plas.redia.dk/en/content/v0.6.5/schemas/#ImageTypeContent), optional)
- `language` (`string`, optional) — The language of this events content (https://www.loc.gov/marc/languages/).
- `location` ([`EventLocation`](https://plas.redia.dk/en/content/v0.6.5/schemas/#EventLocation), optional)
- `organizers` ([`array of EventOrganizer`](https://plas.redia.dk/en/content/v0.6.5/schemas/#EventOrganizer), optional) — Event organizers
- `promoted` ([`Promoted`](https://plas.redia.dk/en/content/v0.6.5/schemas/#Promoted), optional)
- `relatedEvents` ([`RelatedEvents`](https://plas.redia.dk/en/content/v0.6.5/schemas/#RelatedEvents), optional)
- `relevantWorks` ([`RelevantWorks`](https://plas.redia.dk/en/content/v0.6.5/schemas/#RelevantWorks), optional)
- `scheduling` ([`EventScheduling`](https://plas.redia.dk/en/content/v0.6.5/schemas/#EventScheduling), required)
- `series` ([`EventSeries`](https://plas.redia.dk/en/content/v0.6.5/schemas/#EventSeries), optional)
- `state` ([`EventState`](https://plas.redia.dk/en/content/v0.6.5/schemas/#EventState), required)
- `teaser` (`string`, optional) — A short, engaging text designed to spark interest in the event
- `title` (`string`, required) — Event title
- `updateTime` (`string (date-time)`, required) — When was the event last update (or create) in RFC3339 _date-time_ format.
- `url` (`string (uri)`, optional) — URL to the event's webpage

## EventAdmission

`one of OpenAdmission | TicketAdmission | RegistrationAdmission`

Admission and registration information for an event

No properties in the specification — see the schema index for its form.

## EventAudience

`object`

Information about an audience target for an event

- `id` (`string`, required) — Unique identifier for the audience target
- `label` (`string`, required) — Localized label for the audience target

## EventBranch

`object`

Branch information, this is the main branch associated with the event.

- `branchId` (`string`, required) — The branch ID (should exist in GET /locations)
- `branchName` (`string`, required) — Name of the branch

## EventCategory

`object`

Category classification for events

- `id` (`string`, required) — Category identifier
- `label` (`string`, required) — Localized category label

## EventLocation

`one of EventLocationAtBranch | EventLocationExternal`

The location where the event takes place

No properties in the specification — see the schema index for its form.

## EventLocationAtBranch

`object`

Location information for an event at the branch location.

- `location` (`string`, required) — The internal location used for the event
- `type` (`string enum`, required) — `at_branch`

## EventLocationExternal

`object`

Location information for an external venue.

- `address` ([`Address`](https://plas.redia.dk/en/content/v0.6.5/schemas/#Address), optional) — The physical address of the event location
- `name` (`string`, required) — External location name
- `type` (`string enum`, required) — `external`

## EventOrganizer

`object`

Information about an external event organizer

- `id` (`string`, optional) — Unique identifier for the external organizer
- `name` (`string`, required) — Name of the external organizer

## EventPriceCategory

`object`

- `amount` (`integer`, required) — The price for a ticket. 0 if free.

The amount is in minor unit (see ISO 4217).

- `currency` (`string`, required) — The currency of the price. ISO 4217 code.
- `label` (`string`, optional) — A label for the price, this can been used e.g. as prefix for the price type. E.g. "Adults" or "Children"

## EventPricing

`one of EventPricingSimple | EventPricingPriceCategories`

Pricing information for an event

No properties in the specification — see the schema index for its form.

## EventPricingPriceCategories

`object`

- `categories` ([`array of EventPriceCategory`](https://plas.redia.dk/en/content/v0.6.5/schemas/#EventPriceCategory), required) — Array of price categories for an event
- `type` (`string enum`, required) — `price_categories`

## EventPricingSimple

`object`

- `text` (`string`, required) — Simple pricing text, e.g. "0 - 100 DKK"
- `type` (`string enum`, required) — `simple` · `value`

## EventScheduling

`one of AllDayScheduling | TimeSpanScheduling`

No properties in the specification — see the schema index for its form.

## EventSeries

`object`

Information about an event series that this event belongs to

- `eventIds` (`array of string`, optional) — An array of event ids within the series. This list is restricted to events that fall within the date range specified by the API request.  
It does not include the event id of the current event itself.

- `seriesId` (`string`, required) — Identifier of the event-series. This searchId can be used with `GET /content/event/series/{seriesId}`.

## EventState

`string enum`
`scheduled` · `cancelled` · `finished`

The state of the event.

There are three event state type
- scheduled, Meaning that the event is scheduled and expected to be carried out as planned (See scheduling).
- cancelled, Meaning that the event is cancelled.
- finished, Meaning that the event is finished.


No properties in the specification — see the schema index for its form.

## GetContentEventsInSeriesResponseBody

`object`

- `events` ([`array of Event`](https://plas.redia.dk/en/content/v0.6.5/schemas/#Event), required)
- `total` (`integer`, required) — The total number of events in the series.

## GetContentEventsResponseBody

`object`

- `endOfResults` (`boolean`, required) — If this is false, we haven't reached the end of the search result yet, if it's false we have, and if it's missing or null we don't know.
- `events` ([`array of Event`](https://plas.redia.dk/en/content/v0.6.5/schemas/#Event), required)
- `total` (`integer`, optional) — The total number of events in the whole period.

## GetVersionResponseBody

`object`

- `version` ([`Version`](https://plas.redia.dk/en/content/v0.6.5/schemas/#Version), required) — This is recommended (by the provider) version of the Open Library API, that is supported by provider.

## ImageAlt

`object`

Alternative for accessibility

- `text` (`string`, required) — Alternative text for accessibility

## ImageCredit

`object`

Image credit information

- `text` (`string`, required)

## ImageFocalPoint

`one of ImageFocalPointHotspot`

No properties in the specification — see the schema index for its form.

## ImageFocalPointHotspot

`object`

Describes the point of the most important part of the image

- `type` (`string enum`, required) — `hotspot`
- `x` (`number`, required) — Horizontal position of hotspot (0-1)
- `y` (`number`, required) — Vertical position of hotspot (0-1)

## ImageOriginal

`all of ImageUrl + object`

The `url' is the un-cropped version of the image

No properties in the specification — see the schema index for its form.

## ImageTypeContent

`all of ImageUrl + object`

No properties in the specification — see the schema index for its form.

## ImageUrl

`object`

- `height` (`integer`, optional) — The image height in px.
- `mime` (`string enum`, optional) — `png` · `jpeg`
- `url` (`string`, required)
- `width` (`integer`, optional) — The image width in px.

## OpenAdmission

`object`

Open admission with no registration or tickets required

- `type` (`string enum`, required) — `open` — Type of admission - open access

## Promoted

`object`

- `endTime` (`string (date-time)`, optional) — End time in RFC3339 _date-time_ format.
- `startTime` (`string (date-time)`, optional) — Start time in RFC3339 _date-time_ format.
- `type` ([`PromotedType`](https://plas.redia.dk/en/content/v0.6.5/schemas/#PromotedType), required)

## PromotedType

`any of PromotedTypeEnum | PromotedTypeLiteral`

No properties in the specification — see the schema index for its form.

## PromotedTypeEnum

`string enum`
`promoted`

Pre-defined promotion states that we can "switch" on.

No properties in the specification — see the schema index for its form.

## PromotedTypeLiteral

`string`

Literal promotion states that are unknown beforehand.

No properties in the specification — see the schema index for its form.

## QueryRelevantWorks

`object`

Relevant works specified as a query string

- `query` (`string`, required) — Query string to find relevant works
- `type` (`string enum`, required) — `query` — Type of relevant works - query string

## RegistrationAdmission

`object`

Registration-based admission with contact information

- `contactInfo` ([`ContactInfo`](https://plas.redia.dk/en/content/v0.6.5/schemas/#ContactInfo), required)
- `state` ([`TicketState`](https://plas.redia.dk/en/content/v0.6.5/schemas/#TicketState), required) — State of the registration
- `type` (`string enum`, required) — `registration` — Type of admission - registration required

## RelatedEvents

`array of string`

Related events

No properties in the specification — see the schema index for its form.

## RelevantWorks

`one of WorksRelevantWorks | QueryRelevantWorks`

Books or other works relevant to the event

No properties in the specification — see the schema index for its form.

## TicketAdmission

`object`

Ticket-based admission with pricing and capacity

- `contactInfo` ([`ContactInfo`](https://plas.redia.dk/en/content/v0.6.5/schemas/#ContactInfo), required)
- `pricing` ([`EventPricing`](https://plas.redia.dk/en/content/v0.6.5/schemas/#EventPricing), required)
- `state` ([`TicketState`](https://plas.redia.dk/en/content/v0.6.5/schemas/#TicketState), required) — State of the ticket sale
- `ticketCapacity` (`string`, optional) — Total number of tickets which can be sold for the event. E.g. "100" or "unlimited"
- `type` (`string enum`, required) — `ticket` — Type of admission - ticket required

## TicketState

`string enum`
`ticket_sale_not_open` · `ticket_sale_open` · `almost_sold_out` · `sold_out`

State of ticket sales or registration

No properties in the specification — see the schema index for its form.

## TimeSpanScheduling

`object`

Time-span event scheduling information

- `endTime` (`string (date-time)`, required) — End time in RFC3339 _date-time_ format.
- `startTime` (`string (date-time)`, required) — Start time in RFC3339 _date-time_ format.
- `type` (`string enum`, required) — `time_span` — Type of scheduling for time-span events

## Version

`string`

Open Library API version.

No properties in the specification — see the schema index for its form.

## WorksRelevantWorks

`object`

Relevant works specified as an array of work IDs

- `type` (`string enum`, required) — `works` — Type of relevant works - array of work ids
- `workIds` (`array of string`, required) — Array of works
