Koha Test Wiki MW Canasta on Koha Portainer

Test major Koha Wiki changes or bug fixes here without fear of breaking the production wiki.

For the current Koha Wiki, visit https://wiki.koha-community.org .

Acquisitions baskets endpoint RFC

From Koha Test Wiki MW Canasta on Koha Portainer
Jump to navigation Jump to search

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

Actions and routes

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


Description Action
List baskets
 GET /acquisitions/baskets
Add an basket
 POST /acquisitions/baskets
Get an basket
 GET /acquisitions/baskets/{basket_id}
Overwrite an basket
 PUT /acquisitions/baskets/{basket_id}
Delete an basket
 DELETE /acquisitions/baskets/{basket_id}
Partially update an basket
 PATCH /acquisitions/baskets/{basket_id}

basket object definition

DB schema Proposed API Details
basketno basket_id Internal identifier for the basket
basketname name Basket name
note internal_note Internal note
booksellernote vendor_note Vendor note
contractnumber contract_id Internal identifier of the linked contract
creationdate creation_date The date the basket was created
closedate ordered_date The date the basket was closed (and thus the order was sent)
booksellerid vendor_id Internal identifier for the vendor
authorisedby creator_id Internal patron identifier of the basket creator
booksellerinvoicenumber REMOVED Bug 24311
basketgroupid basket_group_id links this basket to its group (aqbasketgroups.id)
deliveryplace delivery_library_id basket delivery location of a library designated by the library internal identifier
billingplace invoice_library_id library to receive bill or invoice for basket, designated by the library internal identifier
branch library_id Library the basket belongs to
is_standing standing If the orders in this basket are standing
create_items create_items When items should be created for orders in this basket (Options: 'ordering', 'receiving', 'cataloguing'. Null means system wide config)

Comments

  • internal_note = maybe change to internal_notes to match items and patrons.
    • To me, notes sounds like it would return an array, not sounds like it returns a single string MRenvoize 09:48, 15 January 2020 (EST)
  • vendor_note = vendor_notes (see above)
  • close_date = order_date (with closing the basket, the status is changed to ordered)
  • authorised_by = Don't like that one much - it feels like we should have 'id' in it somehow to indicate its character as a system id of another patron/staff user.
  • billing_library = on the invoices endpoint billing_date was changed to invoice_date - should we do the same change here?
  • standing = maybe use standing_order? Standing alone could be a confusing term.

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