Acquisitions vendors endpoint RFC

From Koha Wiki

Jump to: navigation, search

This RFC should be the basis for making the vendors endpoint follow the guidelines. Bug reports still need to be filed.

Actions and routes

The following table presents the current implementation, and the proposed changes.

Description Action Current path Proposed path
List vendors
 GET
 /acquisitions/vendors
 /acquisitions/vendors
Add a vendor
 POST
 /acquisitions/vendors
 /acquisitions/vendors
Get a vendor
 GET
 /acquisitions/vendors/{vendor_id}
 /acquisitions/vendors/{vendor_id}
Overwrite a vendor
 PUT
 /acquisitions/vendors/{vendor_id}
 /acquisitions/vendors/{vendor_id}
Delete a vendor
 DELETE
 /acquisitions/vendors/{vendor_id}
 /acquisitions/vendors/{vendor_id}
Partially update a vendor
 PATCH
 NOT IMPLEMENTED
 /acquisitions/vendors/{vendor_id}

Vendor object definition

DB schema Current API Proposal Katrin
id id vendor_id
name name name
address1 address1 address_1
address2 address2 address_2
address3 address3 address_3
address4 address4 address_4
phone phone phone
accountnumber accountnumber account_number
othersupplier REMOVED REMOVED
currency REMOVED REMOVED
booksellerfax REMOVED REMOVED
notes notes notes
bookselleremail REMOVED REMOVED
booksellerurl REMOVED REMOVED
postal postal postal_address
url url url
active active (boolean) active (boolean)
list_price list_currency list_currency
invoiceprice invoice_currency invoice_currency
gstreg gst gst tax_registered (?)
listincgst list_includes_gst list_includes_gst list_includes_tax
invoiceincgst invoice_includes_gst invoice_includes_gst invoice_includes_tax
tax_rate tax_rate tax_rate
discount discount discount_rate
fax fax fax
deliverytime deliverytime delivery_time

Comments

  • I think we should avoid gst in favor of tax which is a more general term, gst only applies to some countries. Also: tax is already used in the GUI.
  • How are we going to handle aqcontacts?

--Kfischer 17:07, 10 April 2018 (EDT)