WebCheckout API v0.1 Documentation

Non-entity Types

Besides the entity types covered elsewhere in this documentation there are several other data types the API returns and takes as arguments.

The types defined below are tied to the way Common Lisp, the language of the core, deals with data. In many cases multiple data types will manifest the same in JSON. This is another area likely to change somewhat in comming releases of the API.


allocationItems are a complex type that does not map to a specific framework entity. Though they are complex, they do not map directly to an entity stored in the database, but rather are context sensitive and derived from the state of an allocation and its related resource schedules.

Each allocationItem represents a single resource on an allocation (or instance of a type by RRT). They are added and edited within the context of a session, and will not persist until the allocation being edited is stored.

Following are the fields on an allocation item serialized from the api.

The nature of these slots is a bit of a moving target which we are working to formalize as we integrate the new scheduler

array, cons, list, or vector
A sequence of items. At the API level all four types are interchangeable and are represented as a JSON array.
integer and float
Equivilent to the JSON number type with iterger being limited to integers only and fload allowing for real numbers.
A simple true or false value. Equivilent to the JSON boolean.

A circulation period is used in rules determining how long an allocation may last or to determine default pickup and return times. Circualtion Periods are serialized as a JSON object with three values; type, duration, and period.

          "type": "duration",
          "duration": 8467200,
          "period": {
            "quantity": 14,
            "unit": "weeks"
A representation of a string including the strings collation (sorting) point; heavily used in the media module. Stored as a JSON object with keys "prefix" and "suffix" where the string is meant to be collated based on the first character of the suffix. For example "The Wind in the Willows" might be represented as
          "prefix": "The ",
          "suffix": "Wind in the Willows"
A JSON array of collatedString objects.
A hashtabke is a set of keys and values represneted in the API as a JSON object.
A properly formatted ISBN as a string
keyword, symbol, and tag
These are three roughly interchangeable symbolic values. Tags tend to be constrained to limited set of values, while symbols and keywords are not.

A duration is an amount of time. The API serializes durations as an integer representing whole seconds.


Timestamps in the API are formatted as ISO 8601 timestrings.

The API always assumes timezones are meaningful. The consumer of this data is strongly encouraged to use a propper time library (Moment.JS with timezones springs to mind) to deal with these dates rather than try to go it alone or *shudder* use the JavaScript Date library

Serialized to JSON as a string beginning with a currency symbol, followed by zero or more digits, a decimal place, and two digets. For example "$2.15".
A JSON object representing a rate of charge over time. "Amount" is the currency amount. "period" is the frequency of the charge, and "perSec" is the fractional amount per second of the charge.
          "amount": "$2.00",
          "period": {
            "quantity": 1,
            "unit": "hours"
	  "perSec": 0.000555555556

A sequence of UTF-8 characters. Interchangeable with JSON strings.