Uploaded image for project: 'CFA MX '
  1. CFA MX
  2. CFAMX-10611

Stand up an API EndPoint (get Reason Codes)

    Details

    • Sprint:
      CFAMX 2020R4 Sprint 2
    • SCRUM Team:
      Brotherhood of Mutants
    • Story Points:
      8
    • Work Type Classification:
      Sustaining

      Description

      As a third party system I want to be able to get active available Waste Reason Codes from InFORM so that when I send a Waste transaction I can include an appropriate code

      Notes

      • Note: We do not have any details about the solutions that CFA are planning to implement, other than they would like to use APIs to inject waste, this story is a part of the effort to provide robust, external facing API calls that can be used to GET and POST data.
      • Response should include details that we will require when sending a waste transaction to InFORM
      • For example:
      • Id
      • WasteReasonId
      • Description
      • Filter Note: Filter was implemetned under the first iteration of Food Donations, CFAMX-1636, but I don't think that it is any longer valid, as we changed the direction of Food donations, but maybe didn't back this out? Is this actually necessary?

      The Reason Codes displayed on the Record Waste page are viewed/maintained through the List Maintenance page:

      • Admin > Admin > List Maintenance
      • List = Adjustment - Waste
      • 7/20 - This story was used to stand up an endpoint, and prove out that the new framework worked. This story was cloned to CFAMX-11082 to implement the Get Reason Code API

      Acceptance Criteria

      1. Confirm that a generic call can be made to get reason codes
        • Reason codes are used across all stores, and are NOT store specific
      2. Confirm that the response is as streamlined as possible, and only returns data that truly needs to be passed back to InFORM to inject a Waste transaction via the new API calls being developed under this feature
      3. Confirm that the response includes details that will allow CFA to POST back a Waste transaction
        • Id / Waste Reason Id
        • There is no reason for CFA to pass back the description
      4. Confirm that there is support for US vs CA stores, although this is not something that we support today
        • From a security perspective we should require a store number on each call
      5. Confirm that the call is documented in Confluence
      6. Updated 7/15 Confirm that the developer has documented the call in Confluence
      Notes about what was implemented

      You will need this in your HOSTS file:

      10.85.101.155 api.inform.jatesting.cfahome.com

      and then browse to this URL:

      http://api.inform.jatesting.cfahome.com/swagger/ui/index

      Note: This apparently only works in Chrome. Running the page in IE was not working for me at all.

      The basic functionality is that through Swagger (or I guess Postman or another API utility) if you supply a valid StoreNumber you will get back the ReasonCode list, otherwise you will get an error message.

        Attachments

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              • Assignee:
                will.englefield Will Englefield (Inactive)
                Reporter:
                will.englefield Will Englefield (Inactive)
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 16h
                  16h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 25m Time Not Required
                  3h 25m

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.