← Back to Documentation

Codelist Details

The extra details object each codelist type returns, and its structure.

Overview

Each entry returned by the codelist endpoint has a type, an id, a value, and an optional details object. Certain codelist types carry extra, type-specific information in details; the rest return null. The shape of details depends on the codelist type being returned - the possible shapes are listed below.


Entry Structure

Every codelist entry shares this top-level structure. The details object varies by codelist type.

{
    "type": "CodeListType",
    "id": "integer",
    "value": "string",
    "details": { /* type-specific, or null */ }
}

Details Objects

The codelist types below return a details object. Click one to view its structure.

Returned for codelist type: BespokeOptions

Structure
{
    "allowMultiple": "boolean",
    "availableBindings": "List`1",
    "choices": "List`1"
}
Example
{
    "type": "BespokeOptions",
    "id": 123,
    "value": "example",
    "details": {
        "allowMultiple": true,
        "availableBindings": null,
        "choices": null
    }
}

Returned for codelist type: Binding

Structure
{
    "minHeight": "integer",
    "minWidth": "integer",
    "portraitMaxHeight": "integer",
    "portraitMaxWidth": "integer",
    "landscapeMaxHeight": "integer",
    "landscapeMaxWidth": "integer",
    "minSpineWidth": "number",
    "maxSpineWidth": "number"
}
Example
{
    "type": "Binding",
    "id": 123,
    "value": "example",
    "details": {
        "minHeight": 123,
        "minWidth": 123,
        "portraitMaxHeight": 123,
        "portraitMaxWidth": 123,
        "landscapeMaxHeight": 123,
        "landscapeMaxWidth": 123,
        "minSpineWidth": 1.5,
        "maxSpineWidth": 1.5
    }
}

Returned for codelist type: Lamination

Structure
{
    "canFoil": "boolean"
}
Example
{
    "type": "Lamination",
    "id": 123,
    "value": "example",
    "details": {
        "canFoil": true
    }
}

Returned for codelist types: TextStocks CoverStocks FoilStocks

Structure
{
    "weight": "integer",
    "thickness": "number",
    "coated": "boolean",
    "creamy": "boolean",
    "forceToner": "boolean",
    "canFoil": "boolean",
    "bindingId": "integer"
}
Example
{
    "type": "TextStocks",
    "id": 123,
    "value": "example",
    "details": {
        "weight": 123,
        "thickness": 1.5,
        "coated": true,
        "creamy": true,
        "forceToner": true,
        "canFoil": true,
        "bindingId": 123
    }
}