foliolib.folio.api.orders.ReceivingHistory

class foliolib.folio.api.orders.ReceivingHistory(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)

Bases: foliolib.folio.FolioApi

Orders Business Logic API

API for retriving receiving history

Parameters
  • tenant (str) – Tenant id

  • okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.

Methods

get_receivingHistories(**kwargs)

Get receiving history matching the provided criteria

get_receivingHistories(**kwargs)

Get receiving history matching the provided criteria

GET /orders/receiving-history

Parameters

**kwargs (properties) – Keyword Arguments

Keyword Arguments
  • totalRecords (str) –

    (default=auto) How to calculate the totalRecords property. “exact” for the correct number, “estimated” for an estimation, “auto” to automatically select “exact” or “estimated”, “none” for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords

    Example

    • none

  • offset (int) –

    (default=0) Skip over a number of elements by specifying an offset value for the query

    Example

    • 0

  • limit (int) –

    (default=10) Limit the number of elements returned in the response

    Example

    • 10

  • query (str) –

    A query expressed as a CQL string (see [dev.folio.org/reference/glossary#cql](https://dev.folio.org/reference/glossary#cql)) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.

    With valid searchable fields

    Example

    • (username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode

    • titleOrPackage==Harry Potter AND receiving_status==received sortBy po_line_number

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiRequestNotFound – Not Found

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "collection of receiving history",
  "type": "object",
  "properties": {
    "receivingHistory": {
      "description": "collection of receiving history",
      "type": "array",
      "id": "receivingHistory",
      "items": {
        "type": "object",
        "$ref": "receiving_history.json"
      }
    },
    "totalRecords": {
      "description": "The number of objects contained in this collection",
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "required": [
    "receivingHistory",
    "totalRecords"
  ]
}