Return claims endpoint RFC

From Koha Wiki
Jump to navigation Jump to search

This RFC should be the basis for making the suggestions endpoint follow the guidelines. Bug has already been filed and patches submitted : https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14697

Actions and routes

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

Description Action Proposed path
Make a claim
 POST
 /return_claims/claim/{item_id}
Update claim notes
 PUT
 /return_claims/{claim_id}/notes
Resolve a claim
 PUT
 /return_claims/{claim_id}/resolve
Delete
 DELETE
 /return_claims/{claim_id}

suggestion object definition

Object definition will match the table definition

DB
API
id
id
itemnumber
itemnumber
issue_id
issue_id
old_issue_id
old_issue_id
borrowernumber
borrowernumber
notes
notes
created_on
created_on
created_by
created_by
updated_on
updated_on
updated_by
updated_by
resolution
resolution
resolved_on
resolved_on
resolved_by
resolved_by


All 200 responses will return the newly updated object as JSON.

Comments

  • itemnumber should be item_id
  • borrowernumber should be patron_id
  • issue_id should be checkout_id
  • *_on should be _date
  • *_by should be discussed to include _id as they reference ids


It looks like this bypassed the voting process?

--Kfischer 02:02, 14 January 2020 (EST)