Search stock items

POST /stock/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
    • id integer

      Minimum value is 1.

    • stockcode string
    • description string
    • location_id integer

      If supplied, must link to a valid Location

    • campaign_id integer

      If supplied, must link to a valid campaign that the logged in user can see

    • current_stock integer

      Minimum value is 0.

    • reorder_stock integer

      When to request a re-order

      Minimum value is 0.

    • administrator_user_id integer

      CORE user id for the person who administers this stock item

    • item_price number

      Minimum value is 0.

    • cost_price number

      Minimum value is 0.

    • event_id integer

      If supplied, must link to a valid event, and event_date

    • event_date string

      If supplied, must link to a valid event along with event_id

    • early_bird_end_date_local string

      If supplied, the last date a discount price is available

    • early_bird_price number

      Minimum value is 0.

  • 401 application/json

    Authentication unauthorised

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

    Invalid permission

    Hide response attribute Show response attribute object
    • error string
POST /stock/search/{fromthisid}
curl \
 --request POST 'https://YOURSITE.infoodle.com/apiv2/stock/search/4' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"search":[{"by":"name","value":"Test Item"}]}'
Request examples
{
  "search": [
    {
      "by": "name",
      "value": "Test Item"
    }
  ]
}
Response examples (200)
[
  {
    "id": 123,
    "stockcode": "EVT#1",
    "description": "Event Tickets",
    "location_id": 45,
    "campaign_id": 421,
    "current_stock": 100,
    "reorder_stock": 5,
    "administrator_user_id": 542123,
    "item_price": 120.5,
    "cost_price": 100.5,
    "event_id": 54,
    "event_date": "2026-02-29",
    "early_bird_end_date_local": "2026-01-01",
    "early_bird_price": 70.5
  }
]
Response examples (401)
{
  "error": "Unauthorised"
}
Response examples (403)
{
  "error": "Invalid Permission"
}