Acquisitions invoices endpoint RFC

From Koha Wiki
Jump to navigation Jump to search

This RFC should be the basis for writing an endpoint for CRUD operations on invoices following the guidelines.

Actions and routes

The following table presents the proposed routes and actions mappings to be implemented.

Description Action
List invoices
 GET /acquisitions/invoices
Add an invoice
 POST /acquisitions/invoices
Get an invoice
 GET /acquisitions/invoices/{invoice_id}
Overwrite an invoice
 PUT /acquisitions/invoices/{invoice_id}
Delete an invoice
 DELETE /acquisitions/invoices/{invoice_id}
Partially update an invoice
 PATCH /acquisitions/invoices/{invoice_id}

Invoice object definition

DB schema Proposed API Details
invoiceid invoice_id Internal identifier for the invoice. Generated on POST
invoicenumber invoice_number Invoice number assigned by the vendor
booksellerid vendor_id Internal identifier for the vendor
shipmentdate shipping_date Date of shipping
billingdate invoice_date Date of billing
closed If the invoice is closed (BOOLEAN)
closedate closed_date Invoice close date (only when the invoice is closed)
shipmentcost shipping_cost Shipping cost
shipmentcost_budgetid shipping_fund_id Shipping cost linking to budget
message_id REMOVED EDIFACT related


  • closed = Where does this come form?
  • close_date = date_closed or closing_date?
  • shipping_cost_budget_id = shipping_cost_fund_id (we agreed to use terms from the GUI)

--Kfischer 17:35, 12 January 2020 (EST)