Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
mod-orders/ramls/order-lines.raml
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
99 lines (94 sloc)
3.7 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#%RAML 1.0 | |
title: Order-lines | |
baseUri: https://github.com/folio-org/mod-orders | |
version: v1 | |
protocols: [ HTTP, HTTPS ] | |
documentation: | |
- title: Orders Business Logic API | |
content: <b>API for managing purchase orders</b> | |
types: | |
patch_order_line_request: !include acq-models/mod-orders/schemas/patch_order_line_request.json | |
create-inventory-type: !include acq-models/mod-orders/schemas/createInventoryType.json | |
composite-po-line: !include acq-models/mod-orders/schemas/composite_po_line.json | |
po-line-collection: !include acq-models/mod-orders-storage/schemas/po_line_collection.json | |
po-line: !include acq-models/mod-orders-storage/schemas/po_line.json | |
errors: !include raml-util/schemas/errors.schema | |
UUID: | |
type: string | |
pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ | |
validate_fund_distributions_request: !include acq-models/mod-orders/schemas/validate_fund_distributions_request.json | |
traits: | |
pageable: !include raml-util/traits/pageable.raml | |
searchable: !include raml-util/traits/searchable.raml | |
validate: !include raml-util/traits/validation.raml | |
resourceTypes: | |
collection: !include rtypes/collection-with-json-response.raml | |
collection-item: !include rtypes/item-collection-with-json-response.raml | |
/orders/order-lines: | |
displayName: Purchase Order Lines | |
description: Manage purchase order (PO) lines | |
type: | |
collection: | |
exampleCollection: !include acq-models/mod-orders-storage/examples/po_line_collection.sample | |
exampleItem: !include acq-models/mod-orders/examples/composite_po_line.sample | |
schemaCollection: po-line-collection | |
schemaItem: composite-po-line | |
is: [validate] | |
get: | |
is: [pageable, searchable: {description: "using CQL (indexes for PO lines)", example: "payment_status==\"Cancelled\""} ] | |
post: | |
description: Post a PO lines to corresponding PO | |
/{id}: | |
displayName: Purchase Order Line | |
description: Manage purchase order line (PO line) by id | |
uriParameters: | |
id: | |
description: The UUID of a purchase order line | |
type: UUID | |
type: | |
collection-item: | |
exampleItem: !include acq-models/mod-orders/examples/composite_po_line.sample | |
schema: composite-po-line | |
is: [validate] | |
get: | |
description: Return a purchase order line with given {id} | |
put: | |
description: Update a purchase order line with given {id} | |
delete: | |
description: Delete a purchase order line with given {id} | |
patch: | |
description: Apply partial modifications to a order line | |
body: | |
application/json: | |
description: Patch order line request | |
type: patch_order_line_request | |
example: | |
strict: false | |
value: !include acq-models/mod-orders/examples/patch_order_line_request.sample | |
responses: | |
204: | |
description: "Order line successfully updated" | |
404: | |
description: Not found | |
body: | |
text/plain: | |
500: | |
description: "Internal server error, e.g. due to misconfiguration" | |
body: | |
text/plain: | |
example: "internal server error, contact administrator" | |
/fund-distributions/validate: | |
displayName: Validate fund distributions amount | |
put: | |
description: Validate is cost amount equals to sum of all fund distributions | |
body: | |
application/json: | |
type: validate_fund_distributions_request | |
example: | |
strict: false | |
value: !include acq-models/mod-orders/examples/validate_fund_distributions_request.sample | |
responses: | |
204: | |
description: "Validation passes" | |
422: | |
description: "Validation failed, error with description and codes provided" |