Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
118 lines (111 sloc) 3.88 KB
#%RAML 1.0
title: Voucher
version: v1.0
protocols: [ HTTP, HTTPS ]
baseUri: https://github.com/folio-org/mod-invoice
documentation:
- title: Voucher API
content: This documents the API calls that can be made to manage vouchers
types:
sequenceNumber: !include acq-models/common/schemas/sequence_number.json
voucherLine: !include acq-models/mod-invoice-storage/schemas/voucher_line.json
voucher: !include acq-models/mod-invoice-storage/schemas/voucher.json
voucherCollection: !include acq-models/mod-invoice-storage/schemas/voucher_collection.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}$
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:
get-only: !include raml-util/rtypes/get-only.raml
/voucher:
/vouchers:
displayName: Vouchers
description: Get list of voucher
type:
get-only:
schema: voucherCollection
exampleCollection: !include acq-models/mod-invoice-storage/examples/voucher_collection.sample
get:
description: Retrieve a list of voucher items.
is: [ pageable, searchable: {description: "using CQL (indexes for voucher)", example: "voucherNumber==\"1000\""}, validate ]
/{id}:
uriParameters:
id:
description: The UUID of an voucher
type: UUID
displayName: voucher
description: Get specific voucher
type:
get-only:
schema: voucher
exampleCollection: !include acq-models/mod-invoice-storage/examples/voucher.sample
get:
description: Return an voucher with given {id}
/voucher-lines/{id}:
uriParameters:
id:
description: The UUID of a voucher line
type: UUID
displayName: Voucher Lines
description: Get specific voucher lines
is: [validate, language]
type:
get-only:
schema: voucherLine
exampleCollection: !include acq-models/mod-invoice-storage/examples/voucher_line.sample
get:
description: Return an voucher line with given {id}
put:
description: Update a voucher line with given {id}
body:
application/json:
type: voucherLine
example:
strict: false
value: !include acq-models/mod-invoice-storage/examples/voucher_line.sample
/voucher-number/start/{value}:
displayName: Voucher Number
description: Manage voucher number
is: [validate, language]
post:
description: (Re)set the start value of the voucher number sequence
responses:
204:
description: "Start value successfully updated"
400:
description: "Bad request"
body:
text/plain:
example: "Bad request"
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "internal server error, contact administrator"
application/json:
example:
strict: false
value: !include examples/errors_500.sample
/voucher-number/start:
displayName: Voucher number sequence
description: Get or set the start value of the voucher number sequence
is: [validate, language]
get:
description: Get the current start value of the voucher number sequence
responses:
200:
body:
application/json:
type: sequenceNumber
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
application/json:
example:
strict: false
value: !include examples/errors_500.sample
You can’t perform that action at this time.