Holding detail (v1)

http://github.com/org/folio/mod-orders

Table of contents

Holding detail API

API retrieve to holding detail.

Holding detail

Holding detail. The endpoint is used to:

POST /orders/holding-detail

Holding detail

POST /orders/holding-detail
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A collection of holding ids to retrieved the holding details",
  "type": "object",
  "properties": {
    "holdingIds": {
      "description": "An array of holding ids",
      "id": "holdingIds",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "id": "uuid.schema",
        "description": "A universally unique identifier (UUID), this is a 128-bit number used to identify a record and is shown in hex with dashes, for example 6312d172-f0cf-40f6-b27d-9fa8feaf332f; the UUID version must be from 1-5; see https://dev.folio.org/guides/uuids/",
        "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "holdingIds"
  ]
}

Example:

{
  "holdingIds": [
    "e54b1f4d-7d05-4b1a-9368-3c36b75d8ac1",
    "f65c2g5e-8e16-5c2b-a479-4d47c86e9bd2"
  ]
}

Response 200

Returns processing result of the holding-detail

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A dynamic map of holding details",
  "type": "object",
  "additionalProperties": {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "description": "The contents of the dynamic map holding details",
    "properties": {
      "poLines_detail_collection": {
        "description": "Collection of poLine details for the holding",
        "type": "object",
        "properties": {
          "poLines_detail": {
            "description": "Array of poLine details",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "UUID of the poLine record",
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "id": "uuid.schema",
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
                }
              }
            }
          },
          "totalRecords": {
            "description": "Total number of records in the array",
            "type": "integer"
          }
        }
      },
      "pieces_detail_collection": {
        "description": "Collection of piece details for the holding",
        "type": "object",
        "properties": {
          "pieces_detail": {
            "description": "Array of piece details",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "UUID of the piece record",
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "id": "uuid.schema",
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
                },
                "poLineId": {
                  "description": "UUID of the associated poLine record",
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "id": "uuid.schema",
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
                },
                "itemId": {
                  "description": "UUID of the associated item record",
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "id": "uuid.schema",
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
                },
                "tenantId": {
                  "description": "Associated tenant in ECS-enabled environments",
                  "type": "string"
                }
              }
            }
          },
          "totalRecords": {
            "description": "Total number of records in the array",
            "type": "integer"
          }
        }
      },
      "items_detail_collection": {
        "description": "Collection of item details for the holding",
        "type": "object",
        "properties": {
          "items_detail": {
            "description": "Array of item details",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "UUID of the item record",
                  "$schema": "http://json-schema.org/draft-04/schema#",
                  "id": "uuid.schema",
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
                },
                "tenantId": {
                  "description": "Associated tenant in ECS-enabled environments",
                  "type": "string"
                }
              }
            }
          },
          "totalRecords": {
            "description": "Total number of records in the array",
            "type": "integer"
          }
        }
      }
    },
    "additionalProperties": false
  }
}

Example:

{
  "e54b1f4d-7d05-4b1a-9368-3c36b75d8ac1": {
    "poLines_detail_collection": {
      "poLines_detail": [
        {
          "id": "8f3a7d2b-6e1c-4b9a-a2d5-f9e8c3b1a0d4"
        }
      ],
      "totalRecords": 1
    },
    "pieces_detail_collection": {
      "pieces_detail": [
        {
          "id": "8d0e7e3e-8e4f-4f3c-9c9e-1a2b3c4d5e6f",
          "poLineId": "8f3a7d2b-6e1c-4b9a-a2d5-f9e8c3b1a0d4",
          "itemId": "7a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
          "tenantId": "consortium"
        },
        {
          "id": "9e1f2a3b-4c5d-6e7f-8a9b-0c1d2e3f4a5b",
          "poLineId": "8f3a7d2b-6e1c-4b9a-a2d5-f9e8c3b1a0d4",
          "itemId": "8b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e",
          "tenantId": "consortium"
        }
      ],
      "totalRecords": 2
    },
    "items_detail_collection": {
      "items_detail": [
        {
          "id": "7a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
          "tenantId": "university"
        },
        {
          "id": "8b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e",
          "tenantId": "university"
        }
      ],
      "totalRecords": 2
    }
  },
  "f65c2g5e-8e16-5c2b-a479-4d47c86e9bd2": {
    "poLines_detail_collection": {
      "poLines_detail": [
        {
          "id": "c9b4e1f7-0d2a-45c8-9e6b-3f2a1d7c0b5e"
        }
      ],
      "totalRecords": 1
    },
    "pieces_detail_collection": {
      "pieces_detail": [
        {
          "id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
          "poLineId": "c9b4e1f7-0d2a-45c8-9e6b-3f2a1d7c0b5e",
          "itemId": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
          "tenantId": "consortium"
        }
      ],
      "totalRecords": 1
    },
    "items_detail_collection": {
      "items_detail": [
        {
          "id": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
          "tenantId": "consortium"
        }
      ],
      "totalRecords": 1
    }
  }
}

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: application/json

Type: any

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Media type: text/plain

Type: any

Example:

"unable to update holding-detail -- malformed JSON at 13:4"

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "errors.schema",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "id": "error.schema",
        "description": "An error",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message text"
          },
          "type": {
            "type": "string",
            "description": "Error message type"
          },
          "code": {
            "type": "string",
            "description": "Error message code"
          },
          "parameters": {
            "description": "Error message parameters",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "parameters.schema",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "message"
        ]
      }
    },
    "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: application/json

Type: any

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Media type: text/plain

Type: any

Example:

internal server error, contact administrator