Change due date version v0.1
http://localhost:9130
API for changing due date for loans
Change loan due date API
/circulation/loans/{id}/change-due-date
post
post /circulation/loans/{id}/change-due-date
URI Parameters
- id: required(string)
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Request body schema for change loan due date API",
"properties": {
"dueDate": {
"description": "The date and time when the loan is due",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"dueDate"
]
}
HTTP status code 201
The due date for the loaned item has been successfully updated
HTTP status code 404
The loan is not found
HTTP status code 422
Unable to change the due date for the loan
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": "Loan item is Claimed returned",
"parameters": [
{
"key": "itemId",
"value": "91719676-e7b5-4f83-bdab-cb70dd10c1e3"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator