{
"type": "object",
"properties": {
- "reserve_id": {
- "$ref": "../x-primitives.json#/reserve_id"
+ "hold_id": {
+ "type": "integer",
+ "description": "Internal hold identifier"
},
- "borrowernumber": {
+ "patron_id": {
"type": "integer",
"description": "Internal patron identifier"
},
- "reservedate": {
- "type": ["string", "null"],
- "description": "the date the hold was placed"
- },
- "biblionumber": {
- "$ref": "../x-primitives.json#/biblionumber"
- },
- "branchcode": {
+ "hold_date": {
"type": ["string", "null"],
- "description": "code of patron's home branch"
+ "format": "date",
+ "description": "The date the hold was placed"
},
- "notificationdate": {
- "type": ["string", "null"],
- "description": "currently unused"
+ "biblio_id": {
+ "type": "integer",
+ "description": "Internal biblio identifier"
},
- "reminderdate": {
+ "pickup_library_id": {
"type": ["string", "null"],
- "description": "currently unused"
+ "description": "Internal library identifier for the pickup library"
},
- "cancellationdate": {
+ "cancelation_date": {
"type": ["string", "null"],
- "description": "the date the hold was cancelled"
+ "format": "date",
+ "description": "The date the hold was cancelled"
},
- "reservenotes": {
+ "notes": {
"type": ["string", "null"],
- "description": "notes related to this hold"
+ "description": "Notes related to this hold"
},
"priority": {
"type": ["integer", "null"],
- "description": "where in the queue the patron sits"
+ "description": "Where in the queue the patron sits"
},
- "found": {
+ "status": {
"type": ["string", "null"],
- "description": "a one letter code defining what the status of the hold is after it has been confirmed"
+ "description": "A one letter code defining what the status of the hold is after it has been confirmed"
},
"timestamp": {
- "type": ["string", "null"],
- "description": "date and time the hold was last updated"
+ "type": "string",
+ "format": "date-time",
+ "description": "Timestamp for the latest hold update"
},
- "itemnumber": {
- "$ref": "../x-primitives.json#/itemnumber"
+ "item_id": {
+ "type": ["string", "null"],
+ "description": "Internal item identifier"
},
- "waitingdate": {
+ "waiting_date": {
"type": ["string", "null"],
- "description": "the date the item was marked as waiting for the patron at the library"
+ "format": "date",
+ "description": "The date the item was marked as waiting for the patron at the library"
},
- "expirationdate": {
+ "expiration_date": {
"type": ["string", "null"],
- "description": "the date the hold expires"
+ "format": "date",
+ "description": "The date the hold expires"
},
- "lowestPriority": {
+ "lowest_priority": {
"type": "boolean",
"description": "Controls if the hold is given the lowest priority on the queue"
},
- "suspend": {
+ "suspended": {
"type": "boolean",
"description": "Controls if the hold is suspended"
},
- "suspend_until": {
+ "suspended_until": {
"type": ["string", "null"],
+ "format": "date-time",
"description": "Date until which the hold has been suspended"
},
- "itemtype": {
+ "item_type": {
"type": ["string", "null"],
"description": "If record level hold, the optional itemtype of the item the patron is requesting"
}
"tags": ["patrons", "holds"],
"parameters": [
{
- "name": "reserve_id",
+ "name": "hold_id",
"in": "query",
"description": "Internal reserve identifier",
"type": "integer"
},
{
- "name": "borrowernumber",
+ "name": "patron_id",
"in": "query",
"description": "Internal patron identifier",
"type": "integer"
},
{
- "name": "reservedate",
+ "name": "hold_date",
"in": "query",
- "description": "Reserve date",
- "type": "string"
+ "description": "Hold",
+ "type": "string",
+ "format": "date"
},
{
- "name": "biblionumber",
+ "name": "biblio_id",
"in": "query",
"description": "Internal biblio identifier",
"type": "integer"
},
{
- "name": "branchcode",
- "in": "query",
- "description": "Branch code",
- "type": "string"
- },
- {
- "name": "notificationdate",
+ "name": "pickup_library_id",
"in": "query",
- "description": "Notification date",
+ "description": "Internal library identifier for the pickup library",
"type": "string"
},
{
- "name": "reminderdate",
+ "name": "cancelation_date",
"in": "query",
- "description": "Reminder date",
- "type": "string"
- },
- {
- "name": "cancellationdate",
- "in": "query",
- "description": "Cancellation date",
- "type": "string"
+ "description": "The date the hold was cancelled",
+ "type": "string",
+ "format": "date"
},
{
- "name": "reservenotes",
+ "name": "notes",
"in": "query",
- "description": "Reserve notes",
+ "description": "Notes related to this hold",
"type": "string"
},
{
"name": "priority",
"in": "query",
- "description": "Priority",
+ "description": "Where in the queue the patron sits",
"type": "integer"
},
{
- "name": "found",
+ "name": "status",
"in": "query",
"description": "Found status",
"type": "string"
"type": "string"
},
{
- "name": "itemnumber",
+ "name": "item_id",
"in": "query",
"description": "Internal item identifier",
"type": "integer"
},
{
- "name": "waitingdate",
+ "name": "waiting_date",
"in": "query",
"description": "Date the item was marked as waiting for the patron",
"type": "string"
},
{
- "name": "expirationdate",
+ "name": "expiration_date",
"in": "query",
"description": "Date the hold expires",
"type": "string"
},
{
- "name": "lowestPriority",
+ "name": "lowest_priority",
"in": "query",
"description": "Lowest priority",
- "type": "integer"
+ "type": "boolean"
},
{
- "name": "suspend",
+ "name": "suspended",
"in": "query",
"description": "Suspended",
- "type": "integer"
+ "type": "boolean"
},
{
- "name": "suspend_until",
+ "name": "suspended_until",
"in": "query",
"description": "Suspended until",
"type": "string"
}
},
"x-koha-authorization": {
- "allow-owner": true,
- "allow-guarantor": true,
"permissions": {
"borrowers": "edit_borrowers"
}
"schema": {
"type": "object",
"properties": {
- "borrowernumber": {
+ "patron_id": {
"description": "Internal patron identifier",
"type": "integer"
},
- "biblionumber": {
- "description": "Biblio internal identifier",
- "type": "integer"
+ "biblio_id": {
+ "description": "Internal biblio identifier",
+ "type": [ "integer", "null" ]
},
- "itemnumber": {
- "description": "Item internal identifier",
- "type": "integer"
+ "item_id": {
+ "description": "Internal item identifier",
+ "type": [ "integer", "null" ]
},
- "branchcode": {
- "description": "Pickup location",
+ "pickup_library_id": {
+ "description": "Internal library identifier for the pickup library",
"type": "string"
},
- "expirationdate": {
+ "expiration_date": {
"description": "Hold end date",
- "type": "string",
+ "type": ["string", "null"],
"format": "date"
},
- "itemtype": {
+ "notes": {
+ "description": "Notes related to this hold",
+ "type": [ "string", "null" ]
+ },
+ "item_type": {
"description": "Limit hold on one itemtype (ignored for item-level holds)",
- "type": "string"
+ "type": [ "string", "null" ]
}
- }
+ },
+ "required": [ "patron_id", "pickup_library_id" ]
}
}
],
}
},
"x-koha-authorization": {
- "allow-owner": true,
"permissions": {
"reserveforothers": "1"
}
}
}
},
- "/holds/{reserve_id}": {
+ "/holds/{hold_id}": {
"put": {
"x-mojo-to": "Hold#edit",
"operationId": "editHold",
"tags": ["holds"],
"parameters": [{
- "$ref": "../parameters.json#/holdIdPathParam"
+ "$ref": "../parameters.json#/hold_id_pp"
}, {
"name": "body",
"in": "body",
}
},
"x-koha-authorization": {
- "allow-owner": true,
- "allow-guarantor": true,
"permissions": {
"reserveforothers": "1"
}
"operationId": "deleteHold",
"tags": ["holds"],
"parameters": [{
- "$ref": "../parameters.json#/holdIdPathParam"
+ "$ref": "../parameters.json#/hold_id_pp"
}
],
"produces": ["application/json"],