How to Test Unity in Swagger

Unity can be tested by accessing Swagger which is built into each instance of Unity. If you are able to access the Swagger page, it means that the Unity site is available but it doesn’t mean that Unity can communicate to the back-end POS. You have to authenticate into Unity and then manually run one of the API calls to verify communication to the back-end POS system.

Each customer typically has 2 instances of Unity and most are named, UnityTest and UnityProd however some customers have slightly different names (i.e. UnityPeakProd). Below are instructions on how to login and test an API call.

Instructions

Using Aspenware QA in this example

  1. Go to, https://unity.aspenwarecommerce.net/UnityQA/index.html

  2. Change the ‘V1’ dropdown at the top to 'V3'

  3. In Swagger, click green ‘Authorize’ button on the right

  4. Enter ClientID and ClientSecret and check the ‘access control service’ (first in the list) and ‘services’ (last in the list) Scopes and click Authorize at the bottom of the list. To get the ClientID and ClientSecret, look in Last Pass for notes with a name like, ‘Resort Name - Unity ClientID’.

     

  5. If the credentials are valid, you should see this success message:

  6. If you receive an ‘invalid scope’ error, typically uncheck the itinerary, entitlements and retail services (service.itinerary, service.entitlements, service.retail).

  7. Test an API call to verify data is returned from the POS. For RTP, an easy one is the Access call (/api/Access/locations)

  8. Click, ‘Get’ and then ‘Try it out’

  9. Then click 'Execute

  10. If you see POS data returned (like the access location list below), that means Unity can communicate to RTP

  11. Another API call that can be used for RTP and SW is the User authenticate

  12. Enter the credentials you use on the site. Replace ‘string’ in both places below w/ your actual username and password.

  13. If the results show the RTP or SW customer ID number (RTP IPCode or SW guest_no), that means Unity can communicate to the POS system. If this works but you can’t login from the site, it’s typically an issue in Nop.