Location API (v3.0)

http://github.com/org/folio/mod-inventory-storage

Table of contents

Locations API

This documents the API calls that can be made to query and manage (shelf) locations of the system

/locations

Collection of location items.

GET /locations

Return a list of locations

GET /locations
Query Parameters
  • query: (string)

    A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.

    with valid searchable fields

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    name=aaa
    
  • offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)

    Skip over a number of elements by specifying an offset value for the query

    Example:

    0
  • limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)

    Limit the number of elements returned in the response

    Example:

    10
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns a list of location items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "List of (shelf) locations.",
  "type": "object",
  "properties": {
    "locations": {
      "id": "locations",
      "description": "List of (shelf) locations.",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "A (shelf) location, the forth-level location unit below institution, campus, and library.",
        "properties": {
          "id": {
            "description": "id of this (shelf) location record as UUID.",
            "type": "string"
          },
          "name": {
            "description": "Name of the (shelf) location",
            "type": "string"
          },
          "code": {
            "description": "Code of the (shelf) location, usually an abbreviation of the name.",
            "type": "string"
          },
          "description": {
            "description": "Description of the (shelf) location.",
            "type": "string"
          },
          "discoveryDisplayName": {
            "description": "Name of the (shelf) location to be shown in the discovery.",
            "type": "string"
          },
          "isActive": {
            "description": "Whether this (shelf) location is active. Inactive (shelf) locations can no longer been used.",
            "type": "boolean"
          },
          "institutionId": {
            "description": "The UUID of the institution, the first-level location unit, this (shelf) location belongs to.",
            "type": "string"
          },
          "institution": {
            "description": "The institution, the first-level location unit, this (shelf) location belongs to.",
            "type": "object",
            "folio:$ref": "locinst.json",
            "readonly": true,
            "folio:isVirtual": true,
            "folio:linkBase": "location-units/institutions",
            "folio:linkFromField": "institutionId",
            "folio:linkToField": "id",
            "folio:includedElement": "locinsts.0"
          },
          "campusId": {
            "description": "The UUID of the campus, the second-level location unit, this (shelf) location belongs to.",
            "type": "string"
          },
          "campus": {
            "description": "The campus, the second-level location unit, this (shelf) location belongs to",
            "type": "object",
            "folio:$ref": "loccamp.json",
            "readonly": true,
            "folio:isVirtual": true,
            "folio:linkBase": "location-units/campuses",
            "folio:linkFromField": "campusId",
            "folio:linkToField": "id",
            "folio:includedElement": "loccamps.0"
          },
          "libraryId": {
            "description": "The UUID of the library, the third-level location unit, this (shelf) location belongs to.",
            "type": "string"
          },
          "library": {
            "description": "The library, the third-level location unit, this (shelf) location belongs to.",
            "type": "object",
            "folio:$ref": "locinst.json",
            "readonly": true,
            "folio:isVirtual": true,
            "folio:linkBase": "location-units/libraries",
            "folio:linkFromField": "libraryId",
            "folio:linkToField": "id",
            "folio:includedElement": "loclibs.0"
          },
          "details": {
            "description": "Details about this (shelf) location.",
            "type": "object"
          },
          "primaryServicePoint": {
            "description": "The UUID of the primary service point of this (shelf) location.",
            "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
            "type": "string"
          },
          "primaryServicePointObject": {
            "type": "object",
            "description": "Dereferenced object for primary service point. This should really just be called 'primaryServicePoint', but the field containing the ID of this object has that name -- it should really be called 'primaryServicePointId' -- so we need something different for this one.",
            "readonly": true,
            "folio:isVirtual": true,
            "folio:linkBase": "service-points",
            "folio:linkFromField": "primaryServicePoint",
            "folio:linkToField": "id",
            "folio:includedElement": "servicepoints.0",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "properties": {
              "id": {
                "type": "string",
                "description": "Id of service-point object"
              },
              "name": {
                "type": "string",
                "description": "service-point name, a required field"
              },
              "code": {
                "type": "string",
                "description": "service-point code, a required field"
              },
              "discoveryDisplayName": {
                "type": "string",
                "description": "display name, a required field"
              },
              "description": {
                "type": "string",
                "description": "description of the service-point"
              },
              "shelvingLagTime": {
                "type": "integer",
                "description": "shelving lag time"
              },
              "pickupLocation": {
                "type": "boolean",
                "description": "indicates whether or not the service point is a pickup location"
              },
              "holdShelfExpiryPeriod": {
                "type": "object",
                "description": "expiration period for items on the hold shelf at the service point",
                "$schema": "http://json-schema.org/draft-04/schema#",
                "properties": {
                  "duration": {
                    "type": "integer",
                    "description": "Duration interval"
                  },
                  "intervalId": {
                    "type": "string",
                    "description": "Unit of time for the duration",
                    "enum": [
                      "Minutes",
                      "Hours",
                      "Days",
                      "Weeks",
                      "Months"
                    ],
                    "default": "Days"
                  }
                },
                "required": [
                  "duration",
                  "intervalId"
                ],
                "additionalProperties": false
              },
              "staffSlips": {
                "type": "array",
                "description": "List of staff slips for this service point",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
                      "description": "The ID of the staff slip"
                    },
                    "printByDefault": {
                      "type": "boolean",
                      "description": "Whether or not to print the staff slip by default"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "printByDefault"
                  ]
                }
              },
              "metadata": {
                "type": "object",
                "readonly": true,
                "$schema": "http://json-schema.org/draft-04/schema#",
                "id": "metadata.schema",
                "title": "Metadata Schema",
                "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
                "properties": {
                  "createdDate": {
                    "description": "Date and time when the record was created",
                    "type": "string",
                    "format": "date-time"
                  },
                  "createdByUserId": {
                    "description": "ID of the user who created the record (when available)",
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                  },
                  "createdByUsername": {
                    "description": "Username of the user who created the record (when available)",
                    "type": "string"
                  },
                  "updatedDate": {
                    "description": "Date and time when the record was last updated",
                    "type": "string",
                    "format": "date-time"
                  },
                  "updatedByUserId": {
                    "description": "ID of the user who last updated the record (when available)",
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                  },
                  "updatedByUsername": {
                    "description": "Username of the user who last updated the record (when available)",
                    "type": "string"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "createdDate"
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "name",
              "code",
              "discoveryDisplayName"
            ]
          },
          "servicePointIds": {
            "description": "All service points that this (shelf) location has.",
            "type": "array",
            "items": {
              "description": "The UUID of a service point that belongs to this (shelf) location.",
              "type": "string",
              "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
              "not": {
                "type": "null"
              }
            }
          },
          "servicePoints": {
            "type": "array",
            "description": "List of dereferenced service points",
            "items": {
              "type": "object",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "description": "A service point",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Id of service-point object"
                },
                "name": {
                  "type": "string",
                  "description": "service-point name, a required field"
                },
                "code": {
                  "type": "string",
                  "description": "service-point code, a required field"
                },
                "discoveryDisplayName": {
                  "type": "string",
                  "description": "display name, a required field"
                },
                "description": {
                  "type": "string",
                  "description": "description of the service-point"
                },
                "shelvingLagTime": {
                  "type": "integer",
                  "description": "shelving lag time"
                },
                "pickupLocation": {
                  "type": "boolean",
                  "description": "indicates whether or not the service point is a pickup location"
                },
                "holdShelfExpiryPeriod": {
                  "type": "object",
                  "description": "expiration period for items on the hold shelf at the service point",
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "properties": {
                    "duration": {
                      "type": "integer",
                      "description": "Duration interval"
                    },
                    "intervalId": {
                      "type": "string",
                      "description": "Unit of time for the duration",
                      "enum": [
                        "Minutes",
                        "Hours",
                        "Days",
                        "Weeks",
                        "Months"
                      ],
                      "default": "Days"
                    }
                  },
                  "required": [
                    "duration",
                    "intervalId"
                  ],
                  "additionalProperties": false
                },
                "staffSlips": {
                  "type": "array",
                  "description": "List of staff slips for this service point",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
                        "description": "The ID of the staff slip"
                      },
                      "printByDefault": {
                        "type": "boolean",
                        "description": "Whether or not to print the staff slip by default"
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "id",
                      "printByDefault"
                    ]
                  }
                },
                "metadata": {
                  "type": "object",
                  "readonly": true,
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "id": "metadata.schema",
                  "title": "Metadata Schema",
                  "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
                  "properties": {
                    "createdDate": {
                      "description": "Date and time when the record was created",
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdByUserId": {
                      "description": "ID of the user who created the record (when available)",
                      "type": "string",
                      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                    },
                    "createdByUsername": {
                      "description": "Username of the user who created the record (when available)",
                      "type": "string"
                    },
                    "updatedDate": {
                      "description": "Date and time when the record was last updated",
                      "type": "string",
                      "format": "date-time"
                    },
                    "updatedByUserId": {
                      "description": "ID of the user who last updated the record (when available)",
                      "type": "string",
                      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                    },
                    "updatedByUsername": {
                      "description": "Username of the user who last updated the record (when available)",
                      "type": "string"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "createdDate"
                  ]
                }
              },
              "additionalProperties": false,
              "required": [
                "name",
                "code",
                "discoveryDisplayName"
              ]
            },
            "readonly": true,
            "folio:isVirtual": true,
            "folio:linkBase": "service-points",
            "folio:linkFromField": "servicePointIds",
            "folio:linkToField": "id",
            "folio:includedElement": "servicepoints"
          },
          "metadata": {
            "type": "object",
            "readonly": true,
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "metadata.schema",
            "title": "Metadata Schema",
            "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
            "properties": {
              "createdDate": {
                "description": "Date and time when the record was created",
                "type": "string",
                "format": "date-time"
              },
              "createdByUserId": {
                "description": "ID of the user who created the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "createdByUsername": {
                "description": "Username of the user who created the record (when available)",
                "type": "string"
              },
              "updatedDate": {
                "description": "Date and time when the record was last updated",
                "type": "string",
                "format": "date-time"
              },
              "updatedByUserId": {
                "description": "ID of the user who last updated the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "updatedByUsername": {
                "description": "Username of the user who last updated the record (when available)",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "createdDate"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "code",
          "institutionId",
          "campusId",
          "libraryId",
          "primaryServicePoint"
        ]
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "locations",
    "totalRecords"
  ]
}

Example:

{
  "locations": [
    {
      "id": "d9cd0bed-1b49-4b5e-a7bd-064b8d177231",
      "name": "Miller General Stacks",
      "code": "UA/CB/LC/GS",
      "isActive": true,
      "institutionId": "4b2a3d97-01c3-4ef3-98a5-ae4e853429b4",
      "campusId": "b595d838-b1d5-409e-86ac-af3b41bde0be",
      "libraryId": "e2889f93-92f2-4937-b944-5452a575367e",
      "details": {
        "a": "b",
        "foo": "bar"
      },
      "primaryServicePoint": "79faacf1-4ba4-42c7-8b2a-566b259e4641",
      "servicePointIds": [
        "79faacf1-4ba4-42c7-8b2a-566b259e4641"
      ]
    },
    {
      "id": "97ee6cd9-17ef-47f8-acbb-ec16fb2cb98d",
      "name": "Special Reading Room",
      "code": "UX/BB/LC/RR",
      "isActive": true,
      "institutionId": "4b2a3d97-01c3-4ef3-98a5-ae4e853429b4",
      "campusId": "b595d838-b1d5-409e-86ac-af3b41bde0be",
      "libraryId": "a23d1dbc-e7ba-4c00-baf4-9770bdfb87c6",
      "details": {
        "foo": "gryf"
      },
      "primaryServicePoint": "79faacf1-4ba4-42c7-8b2a-566b259e4641",
      "servicePointIds": [
        "79faacf1-4ba4-42c7-8b2a-566b259e4641"
      ]
    }
  ],
  "totalRecords": 2
}

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

unable to list locations -- malformed parameter 'query', syntax error at column 6

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to list locations -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /locations

Create a new location

POST /locations
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A (shelf) location, the forth-level location unit below institution, campus, and library.",
  "type": "object",
  "properties": {
    "id": {
      "description": "id of this (shelf) location record as UUID.",
      "type": "string"
    },
    "name": {
      "description": "Name of the (shelf) location",
      "type": "string"
    },
    "code": {
      "description": "Code of the (shelf) location, usually an abbreviation of the name.",
      "type": "string"
    },
    "description": {
      "description": "Description of the (shelf) location.",
      "type": "string"
    },
    "discoveryDisplayName": {
      "description": "Name of the (shelf) location to be shown in the discovery.",
      "type": "string"
    },
    "isActive": {
      "description": "Whether this (shelf) location is active. Inactive (shelf) locations can no longer been used.",
      "type": "boolean"
    },
    "institutionId": {
      "description": "The UUID of the institution, the first-level location unit, this (shelf) location belongs to.",
      "type": "string"
    },
    "institution": {
      "description": "The institution, the first-level location unit, this (shelf) location belongs to.",
      "type": "object",
      "folio:$ref": "locinst.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "location-units/institutions",
      "folio:linkFromField": "institutionId",
      "folio:linkToField": "id",
      "folio:includedElement": "locinsts.0"
    },
    "campusId": {
      "description": "The UUID of the campus, the second-level location unit, this (shelf) location belongs to.",
      "type": "string"
    },
    "campus": {
      "description": "The campus, the second-level location unit, this (shelf) location belongs to",
      "type": "object",
      "folio:$ref": "loccamp.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "location-units/campuses",
      "folio:linkFromField": "campusId",
      "folio:linkToField": "id",
      "folio:includedElement": "loccamps.0"
    },
    "libraryId": {
      "description": "The UUID of the library, the third-level location unit, this (shelf) location belongs to.",
      "type": "string"
    },
    "library": {
      "description": "The library, the third-level location unit, this (shelf) location belongs to.",
      "type": "object",
      "folio:$ref": "locinst.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "location-units/libraries",
      "folio:linkFromField": "libraryId",
      "folio:linkToField": "id",
      "folio:includedElement": "loclibs.0"
    },
    "details": {
      "description": "Details about this (shelf) location.",
      "type": "object"
    },
    "primaryServicePoint": {
      "description": "The UUID of the primary service point of this (shelf) location.",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
      "type": "string"
    },
    "primaryServicePointObject": {
      "type": "object",
      "description": "Dereferenced object for primary service point. This should really just be called 'primaryServicePoint', but the field containing the ID of this object has that name -- it should really be called 'primaryServicePointId' -- so we need something different for this one.",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "service-points",
      "folio:linkFromField": "primaryServicePoint",
      "folio:linkToField": "id",
      "folio:includedElement": "servicepoints.0",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of service-point object"
        },
        "name": {
          "type": "string",
          "description": "service-point name, a required field"
        },
        "code": {
          "type": "string",
          "description": "service-point code, a required field"
        },
        "discoveryDisplayName": {
          "type": "string",
          "description": "display name, a required field"
        },
        "description": {
          "type": "string",
          "description": "description of the service-point"
        },
        "shelvingLagTime": {
          "type": "integer",
          "description": "shelving lag time"
        },
        "pickupLocation": {
          "type": "boolean",
          "description": "indicates whether or not the service point is a pickup location"
        },
        "holdShelfExpiryPeriod": {
          "type": "object",
          "description": "expiration period for items on the hold shelf at the service point",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "properties": {
            "duration": {
              "type": "integer",
              "description": "Duration interval"
            },
            "intervalId": {
              "type": "string",
              "description": "Unit of time for the duration",
              "enum": [
                "Minutes",
                "Hours",
                "Days",
                "Weeks",
                "Months"
              ],
              "default": "Days"
            }
          },
          "required": [
            "duration",
            "intervalId"
          ],
          "additionalProperties": false
        },
        "staffSlips": {
          "type": "array",
          "description": "List of staff slips for this service point",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
                "description": "The ID of the staff slip"
              },
              "printByDefault": {
                "type": "boolean",
                "description": "Whether or not to print the staff slip by default"
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "printByDefault"
            ]
          }
        },
        "metadata": {
          "type": "object",
          "readonly": true,
          "$schema": "http://json-schema.org/draft-04/schema#",
          "id": "metadata.schema",
          "title": "Metadata Schema",
          "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
          "properties": {
            "createdDate": {
              "description": "Date and time when the record was created",
              "type": "string",
              "format": "date-time"
            },
            "createdByUserId": {
              "description": "ID of the user who created the record (when available)",
              "type": "string",
              "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
            },
            "createdByUsername": {
              "description": "Username of the user who created the record (when available)",
              "type": "string"
            },
            "updatedDate": {
              "description": "Date and time when the record was last updated",
              "type": "string",
              "format": "date-time"
            },
            "updatedByUserId": {
              "description": "ID of the user who last updated the record (when available)",
              "type": "string",
              "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
            },
            "updatedByUsername": {
              "description": "Username of the user who last updated the record (when available)",
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "createdDate"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "name",
        "code",
        "discoveryDisplayName"
      ]
    },
    "servicePointIds": {
      "description": "All service points that this (shelf) location has.",
      "type": "array",
      "items": {
        "description": "The UUID of a service point that belongs to this (shelf) location.",
        "type": "string",
        "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
        "not": {
          "type": "null"
        }
      }
    },
    "servicePoints": {
      "type": "array",
      "description": "List of dereferenced service points",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "A service point",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of service-point object"
          },
          "name": {
            "type": "string",
            "description": "service-point name, a required field"
          },
          "code": {
            "type": "string",
            "description": "service-point code, a required field"
          },
          "discoveryDisplayName": {
            "type": "string",
            "description": "display name, a required field"
          },
          "description": {
            "type": "string",
            "description": "description of the service-point"
          },
          "shelvingLagTime": {
            "type": "integer",
            "description": "shelving lag time"
          },
          "pickupLocation": {
            "type": "boolean",
            "description": "indicates whether or not the service point is a pickup location"
          },
          "holdShelfExpiryPeriod": {
            "type": "object",
            "description": "expiration period for items on the hold shelf at the service point",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "properties": {
              "duration": {
                "type": "integer",
                "description": "Duration interval"
              },
              "intervalId": {
                "type": "string",
                "description": "Unit of time for the duration",
                "enum": [
                  "Minutes",
                  "Hours",
                  "Days",
                  "Weeks",
                  "Months"
                ],
                "default": "Days"
              }
            },
            "required": [
              "duration",
              "intervalId"
            ],
            "additionalProperties": false
          },
          "staffSlips": {
            "type": "array",
            "description": "List of staff slips for this service point",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
                  "description": "The ID of the staff slip"
                },
                "printByDefault": {
                  "type": "boolean",
                  "description": "Whether or not to print the staff slip by default"
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "printByDefault"
              ]
            }
          },
          "metadata": {
            "type": "object",
            "readonly": true,
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "metadata.schema",
            "title": "Metadata Schema",
            "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
            "properties": {
              "createdDate": {
                "description": "Date and time when the record was created",
                "type": "string",
                "format": "date-time"
              },
              "createdByUserId": {
                "description": "ID of the user who created the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "createdByUsername": {
                "description": "Username of the user who created the record (when available)",
                "type": "string"
              },
              "updatedDate": {
                "description": "Date and time when the record was last updated",
                "type": "string",
                "format": "date-time"
              },
              "updatedByUserId": {
                "description": "ID of the user who last updated the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "updatedByUsername": {
                "description": "Username of the user who last updated the record (when available)",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "createdDate"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "code",
          "discoveryDisplayName"
        ]
      },
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "service-points",
      "folio:linkFromField": "servicePointIds",
      "folio:linkToField": "id",
      "folio:includedElement": "servicepoints"
    },
    "metadata": {
      "type": "object",
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "code",
    "institutionId",
    "campusId",
    "libraryId",
    "primaryServicePoint"
  ]
}

Example:

{
  "id": "d9cd0bed-1b49-4b5e-a7bd-064b8d177231",
  "name": "Miller General Stacks",
  "code": "UA/CB/LC/GS",
  "isActive": true,
  "description": "The very general stacks of Miller",
  "discoveryDisplayName": "Miller General",
  "institutionId": "4b2a3d97-01c3-4ef3-98a5-ae4e853429b4",
  "campusId": "b595d838-b1d5-409e-86ac-af3b41bde0be",
  "libraryId": "e2889f93-92f2-4937-b944-5452a575367e",
  "details": {
    "a": "b",
    "foo": "bar"
  },
  "primaryServicePoint": "79faacf1-4ba4-42c7-8b2a-566b259e4641",
  "servicePointIds": [
    "79faacf1-4ba4-42c7-8b2a-566b259e4641"
  ]

}

Response 201

Returns a newly created item, with server-controlled fields like 'id' populated

Headers
  • Location: required (string)

    URI to the created location item

Body

Media type: application/json

Type: any

Example:

{
  "id": "d9cd0bed-1b49-4b5e-a7bd-064b8d177231",
  "name": "Miller General Stacks",
  "code": "UA/CB/LC/GS",
  "isActive": true,
  "description": "The very general stacks of Miller",
  "discoveryDisplayName": "Miller General",
  "institutionId": "4b2a3d97-01c3-4ef3-98a5-ae4e853429b4",
  "campusId": "b595d838-b1d5-409e-86ac-af3b41bde0be",
  "libraryId": "e2889f93-92f2-4937-b944-5452a575367e",
  "details": {
    "a": "b",
    "foo": "bar"
  },
  "primaryServicePoint": "79faacf1-4ba4-42c7-8b2a-566b259e4641",
  "servicePointIds": [
    "79faacf1-4ba4-42c7-8b2a-566b259e4641"
  ]

}

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

"unable to add location -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create locations -- unauthorized

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "errors.schema",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "id": "error.schema",
        "description": "An error",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message text"
          },
          "type": {
            "type": "string",
            "description": "Error message type"
          },
          "code": {
            "type": "string",
            "description": "Error message code"
          },
          "parameters": {
            "description": "Error message parameters",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "parameters.schema",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "message"
        ]
      }
    },
    "total_records": {
      "description": "Total number of errors",
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

DELETE /locations

Delete all locations

DELETE /locations
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 204

All locations deleted

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

GET /locations/{id}

Retrieve location item with given {locationId}

GET /locations/{id}
URI Parameters
  • id: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns item with a given ID

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A (shelf) location, the forth-level location unit below institution, campus, and library.",
  "type": "object",
  "properties": {
    "id": {
      "description": "id of this (shelf) location record as UUID.",
      "type": "string"
    },
    "name": {
      "description": "Name of the (shelf) location",
      "type": "string"
    },
    "code": {
      "description": "Code of the (shelf) location, usually an abbreviation of the name.",
      "type": "string"
    },
    "description": {
      "description": "Description of the (shelf) location.",
      "type": "string"
    },
    "discoveryDisplayName": {
      "description": "Name of the (shelf) location to be shown in the discovery.",
      "type": "string"
    },
    "isActive": {
      "description": "Whether this (shelf) location is active. Inactive (shelf) locations can no longer been used.",
      "type": "boolean"
    },
    "institutionId": {
      "description": "The UUID of the institution, the first-level location unit, this (shelf) location belongs to.",
      "type": "string"
    },
    "institution": {
      "description": "The institution, the first-level location unit, this (shelf) location belongs to.",
      "type": "object",
      "folio:$ref": "locinst.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "location-units/institutions",
      "folio:linkFromField": "institutionId",
      "folio:linkToField": "id",
      "folio:includedElement": "locinsts.0"
    },
    "campusId": {
      "description": "The UUID of the campus, the second-level location unit, this (shelf) location belongs to.",
      "type": "string"
    },
    "campus": {
      "description": "The campus, the second-level location unit, this (shelf) location belongs to",
      "type": "object",
      "folio:$ref": "loccamp.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "location-units/campuses",
      "folio:linkFromField": "campusId",
      "folio:linkToField": "id",
      "folio:includedElement": "loccamps.0"
    },
    "libraryId": {
      "description": "The UUID of the library, the third-level location unit, this (shelf) location belongs to.",
      "type": "string"
    },
    "library": {
      "description": "The library, the third-level location unit, this (shelf) location belongs to.",
      "type": "object",
      "folio:$ref": "locinst.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "location-units/libraries",
      "folio:linkFromField": "libraryId",
      "folio:linkToField": "id",
      "folio:includedElement": "loclibs.0"
    },
    "details": {
      "description": "Details about this (shelf) location.",
      "type": "object"
    },
    "primaryServicePoint": {
      "description": "The UUID of the primary service point of this (shelf) location.",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
      "type": "string"
    },
    "primaryServicePointObject": {
      "type": "object",
      "description": "Dereferenced object for primary service point. This should really just be called 'primaryServicePoint', but the field containing the ID of this object has that name -- it should really be called 'primaryServicePointId' -- so we need something different for this one.",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "service-points",
      "folio:linkFromField": "primaryServicePoint",
      "folio:linkToField": "id",
      "folio:includedElement": "servicepoints.0",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of service-point object"
        },
        "name": {
          "type": "string",
          "description": "service-point name, a required field"
        },
        "code": {
          "type": "string",
          "description": "service-point code, a required field"
        },
        "discoveryDisplayName": {
          "type": "string",
          "description": "display name, a required field"
        },
        "description": {
          "type": "string",
          "description": "description of the service-point"
        },
        "shelvingLagTime": {
          "type": "integer",
          "description": "shelving lag time"
        },
        "pickupLocation": {
          "type": "boolean",
          "description": "indicates whether or not the service point is a pickup location"
        },
        "holdShelfExpiryPeriod": {
          "type": "object",
          "description": "expiration period for items on the hold shelf at the service point",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "properties": {
            "duration": {
              "type": "integer",
              "description": "Duration interval"
            },
            "intervalId": {
              "type": "string",
              "description": "Unit of time for the duration",
              "enum": [
                "Minutes",
                "Hours",
                "Days",
                "Weeks",
                "Months"
              ],
              "default": "Days"
            }
          },
          "required": [
            "duration",
            "intervalId"
          ],
          "additionalProperties": false
        },
        "staffSlips": {
          "type": "array",
          "description": "List of staff slips for this service point",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
                "description": "The ID of the staff slip"
              },
              "printByDefault": {
                "type": "boolean",
                "description": "Whether or not to print the staff slip by default"
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "printByDefault"
            ]
          }
        },
        "metadata": {
          "type": "object",
          "readonly": true,
          "$schema": "http://json-schema.org/draft-04/schema#",
          "id": "metadata.schema",
          "title": "Metadata Schema",
          "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
          "properties": {
            "createdDate": {
              "description": "Date and time when the record was created",
              "type": "string",
              "format": "date-time"
            },
            "createdByUserId": {
              "description": "ID of the user who created the record (when available)",
              "type": "string",
              "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
            },
            "createdByUsername": {
              "description": "Username of the user who created the record (when available)",
              "type": "string"
            },
            "updatedDate": {
              "description": "Date and time when the record was last updated",
              "type": "string",
              "format": "date-time"
            },
            "updatedByUserId": {
              "description": "ID of the user who last updated the record (when available)",
              "type": "string",
              "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
            },
            "updatedByUsername": {
              "description": "Username of the user who last updated the record (when available)",
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "createdDate"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "name",
        "code",
        "discoveryDisplayName"
      ]
    },
    "servicePointIds": {
      "description": "All service points that this (shelf) location has.",
      "type": "array",
      "items": {
        "description": "The UUID of a service point that belongs to this (shelf) location.",
        "type": "string",
        "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
        "not": {
          "type": "null"
        }
      }
    },
    "servicePoints": {
      "type": "array",
      "description": "List of dereferenced service points",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "A service point",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of service-point object"
          },
          "name": {
            "type": "string",
            "description": "service-point name, a required field"
          },
          "code": {
            "type": "string",
            "description": "service-point code, a required field"
          },
          "discoveryDisplayName": {
            "type": "string",
            "description": "display name, a required field"
          },
          "description": {
            "type": "string",
            "description": "description of the service-point"
          },
          "shelvingLagTime": {
            "type": "integer",
            "description": "shelving lag time"
          },
          "pickupLocation": {
            "type": "boolean",
            "description": "indicates whether or not the service point is a pickup location"
          },
          "holdShelfExpiryPeriod": {
            "type": "object",
            "description": "expiration period for items on the hold shelf at the service point",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "properties": {
              "duration": {
                "type": "integer",
                "description": "Duration interval"
              },
              "intervalId": {
                "type": "string",
                "description": "Unit of time for the duration",
                "enum": [
                  "Minutes",
                  "Hours",
                  "Days",
                  "Weeks",
                  "Months"
                ],
                "default": "Days"
              }
            },
            "required": [
              "duration",
              "intervalId"
            ],
            "additionalProperties": false
          },
          "staffSlips": {
            "type": "array",
            "description": "List of staff slips for this service point",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
                  "description": "The ID of the staff slip"
                },
                "printByDefault": {
                  "type": "boolean",
                  "description": "Whether or not to print the staff slip by default"
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "printByDefault"
              ]
            }
          },
          "metadata": {
            "type": "object",
            "readonly": true,
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "metadata.schema",
            "title": "Metadata Schema",
            "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
            "properties": {
              "createdDate": {
                "description": "Date and time when the record was created",
                "type": "string",
                "format": "date-time"
              },
              "createdByUserId": {
                "description": "ID of the user who created the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "createdByUsername": {
                "description": "Username of the user who created the record (when available)",
                "type": "string"
              },
              "updatedDate": {
                "description": "Date and time when the record was last updated",
                "type": "string",
                "format": "date-time"
              },
              "updatedByUserId": {
                "description": "ID of the user who last updated the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "updatedByUsername": {
                "description": "Username of the user who last updated the record (when available)",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "createdDate"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "code",
          "discoveryDisplayName"
        ]
      },
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "service-points",
      "folio:linkFromField": "servicePointIds",
      "folio:linkToField": "id",
      "folio:includedElement": "servicepoints"
    },
    "metadata": {
      "type": "object",
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "code",
    "institutionId",
    "campusId",
    "libraryId",
    "primaryServicePoint"
  ]
}

Example:

{
  "id": "d9cd0bed-1b49-4b5e-a7bd-064b8d177231",
  "name": "Miller General Stacks",
  "code": "UA/CB/LC/GS",
  "isActive": true,
  "description": "The very general stacks of Miller",
  "discoveryDisplayName": "Miller General",
  "institutionId": "4b2a3d97-01c3-4ef3-98a5-ae4e853429b4",
  "campusId": "b595d838-b1d5-409e-86ac-af3b41bde0be",
  "libraryId": "e2889f93-92f2-4937-b944-5452a575367e",
  "details": {
    "a": "b",
    "foo": "bar"
  },
  "primaryServicePoint": "79faacf1-4ba4-42c7-8b2a-566b259e4641",
  "servicePointIds": [
    "79faacf1-4ba4-42c7-8b2a-566b259e4641"
  ]

}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"location not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

PUT /locations/{id}

Update a location by id

PUT /locations/{id}
URI Parameters
  • id: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A (shelf) location, the forth-level location unit below institution, campus, and library.",
  "type": "object",
  "properties": {
    "id": {
      "description": "id of this (shelf) location record as UUID.",
      "type": "string"
    },
    "name": {
      "description": "Name of the (shelf) location",
      "type": "string"
    },
    "code": {
      "description": "Code of the (shelf) location, usually an abbreviation of the name.",
      "type": "string"
    },
    "description": {
      "description": "Description of the (shelf) location.",
      "type": "string"
    },
    "discoveryDisplayName": {
      "description": "Name of the (shelf) location to be shown in the discovery.",
      "type": "string"
    },
    "isActive": {
      "description": "Whether this (shelf) location is active. Inactive (shelf) locations can no longer been used.",
      "type": "boolean"
    },
    "institutionId": {
      "description": "The UUID of the institution, the first-level location unit, this (shelf) location belongs to.",
      "type": "string"
    },
    "institution": {
      "description": "The institution, the first-level location unit, this (shelf) location belongs to.",
      "type": "object",
      "folio:$ref": "locinst.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "location-units/institutions",
      "folio:linkFromField": "institutionId",
      "folio:linkToField": "id",
      "folio:includedElement": "locinsts.0"
    },
    "campusId": {
      "description": "The UUID of the campus, the second-level location unit, this (shelf) location belongs to.",
      "type": "string"
    },
    "campus": {
      "description": "The campus, the second-level location unit, this (shelf) location belongs to",
      "type": "object",
      "folio:$ref": "loccamp.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "location-units/campuses",
      "folio:linkFromField": "campusId",
      "folio:linkToField": "id",
      "folio:includedElement": "loccamps.0"
    },
    "libraryId": {
      "description": "The UUID of the library, the third-level location unit, this (shelf) location belongs to.",
      "type": "string"
    },
    "library": {
      "description": "The library, the third-level location unit, this (shelf) location belongs to.",
      "type": "object",
      "folio:$ref": "locinst.json",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "location-units/libraries",
      "folio:linkFromField": "libraryId",
      "folio:linkToField": "id",
      "folio:includedElement": "loclibs.0"
    },
    "details": {
      "description": "Details about this (shelf) location.",
      "type": "object"
    },
    "primaryServicePoint": {
      "description": "The UUID of the primary service point of this (shelf) location.",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
      "type": "string"
    },
    "primaryServicePointObject": {
      "type": "object",
      "description": "Dereferenced object for primary service point. This should really just be called 'primaryServicePoint', but the field containing the ID of this object has that name -- it should really be called 'primaryServicePointId' -- so we need something different for this one.",
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "service-points",
      "folio:linkFromField": "primaryServicePoint",
      "folio:linkToField": "id",
      "folio:includedElement": "servicepoints.0",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of service-point object"
        },
        "name": {
          "type": "string",
          "description": "service-point name, a required field"
        },
        "code": {
          "type": "string",
          "description": "service-point code, a required field"
        },
        "discoveryDisplayName": {
          "type": "string",
          "description": "display name, a required field"
        },
        "description": {
          "type": "string",
          "description": "description of the service-point"
        },
        "shelvingLagTime": {
          "type": "integer",
          "description": "shelving lag time"
        },
        "pickupLocation": {
          "type": "boolean",
          "description": "indicates whether or not the service point is a pickup location"
        },
        "holdShelfExpiryPeriod": {
          "type": "object",
          "description": "expiration period for items on the hold shelf at the service point",
          "$schema": "http://json-schema.org/draft-04/schema#",
          "properties": {
            "duration": {
              "type": "integer",
              "description": "Duration interval"
            },
            "intervalId": {
              "type": "string",
              "description": "Unit of time for the duration",
              "enum": [
                "Minutes",
                "Hours",
                "Days",
                "Weeks",
                "Months"
              ],
              "default": "Days"
            }
          },
          "required": [
            "duration",
            "intervalId"
          ],
          "additionalProperties": false
        },
        "staffSlips": {
          "type": "array",
          "description": "List of staff slips for this service point",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
                "description": "The ID of the staff slip"
              },
              "printByDefault": {
                "type": "boolean",
                "description": "Whether or not to print the staff slip by default"
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "printByDefault"
            ]
          }
        },
        "metadata": {
          "type": "object",
          "readonly": true,
          "$schema": "http://json-schema.org/draft-04/schema#",
          "id": "metadata.schema",
          "title": "Metadata Schema",
          "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
          "properties": {
            "createdDate": {
              "description": "Date and time when the record was created",
              "type": "string",
              "format": "date-time"
            },
            "createdByUserId": {
              "description": "ID of the user who created the record (when available)",
              "type": "string",
              "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
            },
            "createdByUsername": {
              "description": "Username of the user who created the record (when available)",
              "type": "string"
            },
            "updatedDate": {
              "description": "Date and time when the record was last updated",
              "type": "string",
              "format": "date-time"
            },
            "updatedByUserId": {
              "description": "ID of the user who last updated the record (when available)",
              "type": "string",
              "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
            },
            "updatedByUsername": {
              "description": "Username of the user who last updated the record (when available)",
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "createdDate"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "name",
        "code",
        "discoveryDisplayName"
      ]
    },
    "servicePointIds": {
      "description": "All service points that this (shelf) location has.",
      "type": "array",
      "items": {
        "description": "The UUID of a service point that belongs to this (shelf) location.",
        "type": "string",
        "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
        "not": {
          "type": "null"
        }
      }
    },
    "servicePoints": {
      "type": "array",
      "description": "List of dereferenced service points",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "A service point",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of service-point object"
          },
          "name": {
            "type": "string",
            "description": "service-point name, a required field"
          },
          "code": {
            "type": "string",
            "description": "service-point code, a required field"
          },
          "discoveryDisplayName": {
            "type": "string",
            "description": "display name, a required field"
          },
          "description": {
            "type": "string",
            "description": "description of the service-point"
          },
          "shelvingLagTime": {
            "type": "integer",
            "description": "shelving lag time"
          },
          "pickupLocation": {
            "type": "boolean",
            "description": "indicates whether or not the service point is a pickup location"
          },
          "holdShelfExpiryPeriod": {
            "type": "object",
            "description": "expiration period for items on the hold shelf at the service point",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "properties": {
              "duration": {
                "type": "integer",
                "description": "Duration interval"
              },
              "intervalId": {
                "type": "string",
                "description": "Unit of time for the duration",
                "enum": [
                  "Minutes",
                  "Hours",
                  "Days",
                  "Weeks",
                  "Months"
                ],
                "default": "Days"
              }
            },
            "required": [
              "duration",
              "intervalId"
            ],
            "additionalProperties": false
          },
          "staffSlips": {
            "type": "array",
            "description": "List of staff slips for this service point",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
                  "description": "The ID of the staff slip"
                },
                "printByDefault": {
                  "type": "boolean",
                  "description": "Whether or not to print the staff slip by default"
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "printByDefault"
              ]
            }
          },
          "metadata": {
            "type": "object",
            "readonly": true,
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "metadata.schema",
            "title": "Metadata Schema",
            "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
            "properties": {
              "createdDate": {
                "description": "Date and time when the record was created",
                "type": "string",
                "format": "date-time"
              },
              "createdByUserId": {
                "description": "ID of the user who created the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "createdByUsername": {
                "description": "Username of the user who created the record (when available)",
                "type": "string"
              },
              "updatedDate": {
                "description": "Date and time when the record was last updated",
                "type": "string",
                "format": "date-time"
              },
              "updatedByUserId": {
                "description": "ID of the user who last updated the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "updatedByUsername": {
                "description": "Username of the user who last updated the record (when available)",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "createdDate"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "code",
          "discoveryDisplayName"
        ]
      },
      "readonly": true,
      "folio:isVirtual": true,
      "folio:linkBase": "service-points",
      "folio:linkFromField": "servicePointIds",
      "folio:linkToField": "id",
      "folio:includedElement": "servicepoints"
    },
    "metadata": {
      "type": "object",
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "code",
    "institutionId",
    "campusId",
    "libraryId",
    "primaryServicePoint"
  ]
}

Example:

{
  "id": "d9cd0bed-1b49-4b5e-a7bd-064b8d177231",
  "name": "Miller General Stacks",
  "code": "UA/CB/LC/GS",
  "isActive": true,
  "description": "The very general stacks of Miller",
  "discoveryDisplayName": "Miller General",
  "institutionId": "4b2a3d97-01c3-4ef3-98a5-ae4e853429b4",
  "campusId": "b595d838-b1d5-409e-86ac-af3b41bde0be",
  "libraryId": "e2889f93-92f2-4937-b944-5452a575367e",
  "details": {
    "a": "b",
    "foo": "bar"
  },
  "primaryServicePoint": "79faacf1-4ba4-42c7-8b2a-566b259e4641",
  "servicePointIds": [
    "79faacf1-4ba4-42c7-8b2a-566b259e4641"
  ]

}

Response 204

Item successfully updated

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

"unable to update location -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"location not found"

Response 409

Optimistic locking version conflict

Body

Media type: text/plain

Type: any

Example:

version conflict

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "errors.schema",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "id": "error.schema",
        "description": "An error",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message text"
          },
          "type": {
            "type": "string",
            "description": "Error message type"
          },
          "code": {
            "type": "string",
            "description": "Error message code"
          },
          "parameters": {
            "description": "Error message parameters",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "parameters.schema",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "message"
        ]
      }
    },
    "total_records": {
      "description": "Total number of errors",
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

DELETE /locations/{id}

Delete location item with given {locationId}

DELETE /locations/{id}
URI Parameters
  • id: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 204

Item deleted successfully

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

"unable to delete location -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"location not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator