Search for locations

POST /location/search/{fromthisid}

Filtered by the posted fields. Returned in ID order

Path parameters

  • fromthisid integer Required

    The ID that is previous to the one to start from e.g. if IDs are 1,2,3 fromthisid as 1 will return 2,3

application/json

Body

1 or more Search parameters

  • search array[object]
    Hide search attributes Show search attributes object
    • by string

      any of the field names that are output from item or list calls

    • value string

      the search value for the term specified by the 'by'

Responses

  • 200 application/json

    List returned OK

    Hide response attributes Show response attributes object
    • locationId integer

      ID to be used in other calls in the system

    • A short code entered by the user - optional

    • User who created this location

      Additional properties are allowed.

      Hide createdBy attributes Show createdBy attributes object
    • manager object

      User who who manages this location

      Additional properties are allowed.

      Hide manager attributes Show manager attributes object
    • User to notify when things change on this location

      Additional properties are allowed.

      Hide notifyUserId1 attributes Show notifyUserId1 attributes object
    • User to notify when things change on this location

      Additional properties are allowed.

      Hide notifyUserId2 attributes Show notifyUserId2 attributes object
    • User to notify when things change on this location

      Additional properties are allowed.

      Hide notifyUserId3 attributes Show notifyUserId3 attributes object
    • Group to notify when things change on this location

    • Values are Y or N.

    • Values are Y or N.

    • Additional properties are allowed.

      Hide rateMultiplier attributes Show rateMultiplier attributes object
      • code string

        H: Hour P: Half Day D: Day F: Fixed Price

        Values are H, P, D, or F.

      • decode string
    • The physical address of this location

  • 401 application/json

    Authentication unauthorised

    Hide response attribute Show response attribute object
  • 403 application/json

    Invalid permission

    Hide response attribute Show response attribute object
POST /location/search/{fromthisid}
curl \
 -X POST https://YOURSITE.infoodle.com/apiv2/location/search/4 \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"search":[{"by":"name","value":"Test Item"}]}'
Request examples
{
  "search": [
    {
      "by": "name",
      "value": "Test Item"
    }
  ]
}
Response examples (200)
[
  {
    "locationId": 1,
    "shortCode": "AU3",
    "createdBy": {
      "userid": 779,
      "showname": "John Smith"
    },
    "manager": {
      "userid": 144274,
      "showname": "Jane Smith"
    },
    "notifyUserId1": {
      "userid": 210000,
      "showname": "Jamine Khan"
    },
    "notifyUserId2": {
      "userid": 874371,
      "showname": "George Best"
    },
    "notifyUserId3": {
      "userid": 874344,
      "showname": "Arthur Dent"
    },
    "notifyGroup": 636,
    "informManagerEachUse": "Y",
    "availableForExternalBookings": "Y",
    "externalRate": 3.45,
    "internalRate": 1.33,
    "rateMultiplier": {
      "code": "P",
      "decode": "Per Half Day"
    },
    "publicAddress": "1 High Street, High Wycome, W1A 1AA"
  }
]
Response examples (401)
{
  "error": "Unauthorised"
}
Response examples (403)
{
  "error": "Invalid Permission"
}