Declare item lost (v0.2)

http://localhost:9130

Table of contents

API for declaring loaned item lost

Declare item lost API

/circulation

POST /circulation/loans/{id}/declare-item-lost

POST /circulation/loans/{id}/declare-item-lost
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 declare item lost API",
  "properties": {
    "declaredLostDateTime": {
      "description": "The date and time when the item is to be declared lost",
      "type": "string",
      "format": "date-time"
    },
    "comment": {
      "description": "Comment explaining why the item has been declared lost",
      "type": "string"
    },
    "servicePointId": {
      "description": "Current service point, where the item is being declared lost",
      "type": "string",
      "$ref": "uuid.json"
    }
  },
  "required": [
    "declaredLostDateTime"
  ]
}

Response 204

The loaned item has been successfully declared lost

Response 404

The loan is not found

Response 422

The loan is closed

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": "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