Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
#%RAML 1.0
title: Invoices
version: v4.0
protocols: [ HTTP, HTTPS ]
baseUri: http://github.com/folio-org/mod-invoice-storage
documentation:
- title: Invoice CRUD API
content: This documents the API calls that can be made to manage invoices
types:
invoiceDocument: !include acq-models/mod-invoice-storage/schemas/document.json
documentCollection: !include acq-models/mod-invoice-storage/schemas/document_collection.json
invoice: !include acq-models/mod-invoice-storage/schemas/invoice.json
invoiceCollection: !include acq-models/mod-invoice-storage/schemas/invoice_collection.json
invoiceLine: !include acq-models/mod-invoice-storage/schemas/invoice_line.json
invoiceLineCollection: !include acq-models/mod-invoice-storage/schemas/invoice_line_collection.json
errors: !include raml-util/schemas/errors.schema
sequenceNumber: !include acq-models/common/schemas/sequence_number.json
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}$
traits:
validate: !include raml-util/traits/validation.raml
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
resourceTypes:
collection: !include raml-util/rtypes/collection.raml
collection-item: !include raml-util/rtypes/item-collection.raml
get-delete: !include raml-util/rtypes/get-delete.raml
/invoice-storage:
/invoices:
type:
collection:
schemaCollection: invoiceCollection
schemaItem: invoice
exampleCollection: !include acq-models/mod-invoice-storage/examples/invoice_collection.sample
exampleItem: !include acq-models/mod-invoice-storage/examples/invoice.sample
get:
description: Get list of invoices
is: [
pageable,
searchable: {description: "with valid searchable fields: for example folioInvoiceNo", example: "folioInvoiceNo==\"123invoicenumber45\""}
]
/{id}:
uriParameters:
id:
description: The UUID of an invoice
type: UUID
type:
collection-item:
schema: invoice
exampleItem: !include acq-models/mod-invoice-storage/examples/invoice.sample
/documents:
displayName: Document
description: Manage documents associated with invoice
type:
collection:
schemaCollection: documentCollection
schemaItem: invoiceDocument
exampleCollection: !include acq-models/mod-invoice-storage/examples/document_collection.sample
exampleItem: !include acq-models/mod-invoice-storage/examples/document.sample
get:
description: Get list of documents
is: [
pageable,
searchable: {description: "with valid searchable fields: for example metadata.createdDate", example: "metadata.createdDate > '2018-07-19T00:00:00.000+0000'"}
]
/{documentId}:
description: Get and Delete a specific document attachments/links. Update operation is not allowed
uriParameters:
documentId:
description: The UUID of a document
type: UUID
type:
get-delete:
schema: invoiceDocument
exampleItem: !include acq-models/mod-invoice-storage/examples/document.sample
/invoice-lines:
type:
collection:
schemaCollection: invoiceLineCollection
schemaItem: invoiceLine
exampleCollection: !include acq-models/mod-invoice-storage/examples/invoice_line_collection.sample
exampleItem: !include acq-models/mod-invoice-storage/examples/invoice_line.sample
get:
description: Get list of invoice lines
is: [
pageable,
searchable: {description: "with valid searchable fields: for example poLineId", example: "poLineId==\"c0d08448-347b-418a-8c2f-5fb50248d67e\""}
]
/{id}:
uriParameters:
id:
description: The UUID of an invoice line
type: UUID
type:
collection-item:
schema: invoiceLine
exampleItem: !include acq-models/mod-invoice-storage/examples/invoice_line.sample
put:
is: [validate]