Change due date (v0.1)

http://localhost:9130

Table of contents

API for changing due date for loans

Change loan due date API

/circulation/loans/{id}/change-due-date

POST /circulation/loans/{id}/change-due-date

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"
  ]
}

Response 201

The due date for the loaned item has been successfully updated

Response 404

The loan is not found

Response 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#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "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"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator