The data object

The cite widget follows the CSL specification for data, however, we will go into more detail here on exactly what attribute we expect to be sent to the widget on initialisation.

Reference Object

{
    id: 'ID', // Required field
    type: 'TYPE', // Required field
    title: 'TITLE',
    author: [{AUTHOR OBJECT}],
    accessed: {DATE OBJECT},
    DOI: 'DOI',
    ISBN: 'ISBN',
    issue: '',
    issued: {DATE OBJECT},
    publisher: 'PUBLISHER',
    URL: 'URL',
    volume: 'VOLUME'
}

There are only two fields that are required in the reference object, the id and type field. The other fields are optional dependent on what information you have available. One thing to note here is that not all styles will output every piece of information sent, it is down to the Style to decipher what fields to output and how dependent on reference type.

id (string)

The id is a unique identifier for the reference, it is a required field and must be present in the object. This could be anything, however we recommend a number, this could be the DOI or ISBN.

type (string)

The type field describes the reference type of the citation that is being created. The list of accepted types is shown below, the type to insert is shown in inverted commas (‘type’):

Referencing Type Type ID
Book or E-Book book
Journal Article article-journal
Artwork graphic
Legal Bill bill
Blog Post post-weblog
Book Review review-book
TV / Radio Broadcast broadcast
Book Chapter chapter
Classical Work classic
Personal Communication personal_communication
Scientific Dataset dataset
Encyclopedia Entry entry-dictionary
Figure figure
Film / Movie (DVD, etc.) motion_picture
Gazette gazette
Hearing hearing
Interview interview
Legal Case legal_case
Legislation (Act / Statue) legislation
Magazine Article article-magazine
Manuscript manuscript
Map map
News Article article-newspaper
Pamphlet pamphlet
Conference Paper paper-conference
Patent patent
Periodical periodical
Post post
Regulation regulation
Report report
Review review
Musical Score musical_score
Song (CD, etc.) song
Speech speech
Standard standard
Thesis (or Dissertation) thesis
Treaty treaty
Video video
Website webpage

title (string) – optional

The title of the citation being created.

author (array) – optional

The author field expects an array of Author objects. The author object can be represented in two ways, both shown below:

{
    family: 'FAMILY NAME', // This is required
    given: 'GIVEN NAME'
}

or

{
    literal: 'LITERAL STRING'
}

The literal author object is used for when the author is a company or organisation.

accessed (object) – optional

The accessed field expects to receive a date object. This should be sent as follows:

{
    year: 'YYYY' // Year is required
    month: 'MM' // not required
    day: 'DD' // not required
}

DOI (string) – optional

The DOI of the citation being created.

ISBN (string) – optional

The ISBN of the citation being created.

issue (string) – optional

The issue of the citation being created. This should be sent as a string, even if it is a number.

issued (object) – optional

The issued field expects to receive a date object. This should be sent as follows:

{
    year: 'YYYY' // Year is required
    month: 'MM' // not required
    day: 'DD' // not required
}

publisher (string) – optional

The publisher of the citation being created.

URL (string) – optional

This is the URL of the citation you wish to create, for it to be accurate it should be the full url including any extra parameters.

volume (string) – optional

This is the volume of the citation, is should be sent as a string, even if it is a number.