Reserve items

POST /library/reserveitems

When taking items - must be phyiscal items - use this to Allocate it to the specified user

text/plain

Body Required

  • reserve_to integer

    The user ID of the person who the item is being reserved for

  • Whether to notify the owner of the library collection that this item has been reserved

    Values are 1 or 0.

  • message string

    A message to notify the owner with

  • items array[object]

    A list of physical items that this person is reserving

    Hide items attribute Show items attribute
    • itemid integer

      The ID of the item to reserve

Responses

  • 200

    OK

    Hide response attributes Show response attributes object
    • error integer

      When there is no error, this is set to 0

    • items array[object]

      The result of the reservation for each item

      Hide items attributes Show items attributes
      • Whether it was reserved or not

        Values are 1 or 0.

      • Only contains a message when the reserved_ok = 0

        Possible messages: There are no items available to allocate Invalid call

      • When successfully reserved, this is the number still available of this item

      • When successfully reserved, this is the total number reserved of this item

      • If a return required by number of days is setup for this library, then this returns a calculated date from today. If no number of days supplied, this is blank

      • A formatted date of the return_by_date_dmyas per system settings

  • 400

    Errors: 1 Missing itemid 5 Not enough items available 6 Invalid type of item. Can only reserve physical items

    Hide response attributes Show response attributes object
    • error integer

      When there is an error, this is set to 1

    • errors array[object]
      Hide errors attributes Show errors attributes
POST /library/reserveitems
curl \
 -X POST https://YOURSITE.infoodle.com/apiv2/library/reserveitems \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: text/plain" \
 -d '[{"reserve_to":12345,"notify_owner":1,"message":"Please leave at reception for me to collect","items":[{"itemid":5643}]}]'
Request example
[
  {
    "reserve_to": 12345,
    "notify_owner": 1,
    "message": "Please leave at reception for me to collect",
    "items": [
      {
        "itemid": 5643
      }
    ]
  }
]
Response examples (200)
{
  "error": 0,
  "items": [
    {
      "reserved_ok": 1,
      "reserved_ok_msg": "There are no items available to allocate",
      "number_available": 12,
      "number_not_available": 2,
      "return_by_date_dmy": "2022-10-12",
      "return_by_date_show": "12th Dec 2022"
    }
  ]
}
Response examples (400)
{
  "error": 1,
  "errors": [
    {
      "error": 1,
      "message": "The error description"
    }
  ]
}