FIS CodeConnect

Test REST Service

The following will guide you to test a ReST-based API using the Developer Tool. To begin this guide, please already have an application created.

If you do not have an application, please refer to the Getting Started guide.

Generate Keys

In order to properly use your application, you'll need to generate your consumer key, consumer secret, and your authorization token to use the APIs.

  1. First, you'll need to access your application. Starting from the Marketplace, locate your application by selecting the Applications button from the navigation menu.

  2. Select your application.

  3. Go to Production Keys and increase the Access token validity period. The validity period takes numbers in the form of seconds. Typically, you'd only want your authorization token to last a few seconds. Since we're testing, increasing the validity period allows you to use the token as long as you want before it needs to be refreshed.

  4. Scroll to the bottom of the page. The Regenerate button is available if the access token can be refreshed or is expired. The authorization token may then be copied and used.

  5. Now you can use these keys and token for your application.

Select And Subscribe API

To connect your application to the API of your choice, you will need to subscribe to the API. For this tutorial, we will be connecting to the Customer API.

  1. From the Marketplace, click on the Enterprise Customer group.

  2. Click on the Customer API v1.2. We'll be using sample parameters to test this API.

  3. Under the Applications menu, select your application name and click Subscribe.

  4. At the following pop-up, click to "Stay on this page" so that we can get started on testing the Customer API.

Test For Sample Response

The Customer API creates and retrieves customer details. For now, we will be using this API to create a customer and then retrieving that customer's details. This is a mocked response, so you are not creating a new customer account in a real environment.

  1. Within the Customer API, go to the API Console tab. Make sure that the Application you created is selected, that you are using the Production keys, and that your Authorization Header is filled in.

  2. This API specifically creates and retrieves customer details. Click on POST /customers, which is the API call to create a customer.

  3. By looking at the Example Value, you will see that there are numerous fields that need to be filled in to create a customer. Instead of filling all the fields out, we'll be using a sample input that's been provided by the API Team.

  4. To get the sample input, go to Documentation > Samples > View Content under the Create Customer Sample name. This should open a new tab in your window.

  5. Copy the entire sample input. You will be creating a new customer named Ram Bharath.

  6. Go back to the API Console, click POST /customers, and paste this inside the input field where customer details should be added. Side note: If you're creating your own customer and require a copy of the empty JSON file, you can click on the Example Value box on the right of the newCustomer field to automatically fill in the input box.

    As for the feId, we'll put in "5100" for its sample parameter.

  7. Click Try it out!

  8. The proper response should be that you recieve an ipId, which acts as the customer's account number. You can use this number in the next API call, GET /customer/{customerId}. For now, copy the account number.

  9. GET /customers/{customerId} pulls a customer's details by using a customer ID. Since you've created a customer, you can now pull that customer's information by using this call. Scroll down to GET /customers/{customerId} and click it.

  10. Paste the ipId you copied from the last API call into the customerId field. Like before, put "5100" as the value for the feId. Click Try it out! when you're finished.

    Congrats! You've successfully created a customer and retrieved that same customer's details.

If you'd like to learn how to test FIS APIs using a third party software, please go to the Test in Postman tutorial.

Testing in Postman

The following will guide you to test an API using a third-party software. This is useful for debugging an API that isn't giving back a response or if you want to quickly check on the response. We'll be using Postman as the third-party application. This guide assumes that you already have an application created and an API that you are attempting to obtain a response from.

If you do not have an application, please refer to the Getting Started guide. If you need to know how to test an API within the API Console, please refer to the Test REST Service guide.

As an example, we'll be testing the Customer API.

Using Postman for POST

  1. First, we'll need to retrieve the sample data for POST /customers. Since using Postman is mainly for debugging purposes, you will need to have an API you are trying to retrieve a response from. Because you are using mocked data, this response will always work. For now, we will pretend that you are not receiving the correct response.

    In the Customer API, go to Documentation Tab > Samples > Create Customer View Content and copy the sample data. Paste it into the newCustomer field. Put 5100 in the feId field. Click Try it Out!

    Multiple text boxes should appear. Copy the URL you see under Request URL.

  2. Click on Authorization tab and make sure that Type is set to No Auth.

  3. Back to POST /customers, look at the CURL Response. You will see that --header appears four times. This means that there are four HTTP headers required for this call. These headers are Content-Type, Accept, feId, and Authorization. We'll be listing these headers in Postman.

    Going back to Postman, click on the Headers tab. HTTP headers are case-sensitive. Under Key should be the header names: Content-Type, Accept, feId, and Authorization. Under Value should be their values. Look at the following screenshot to make sure they've been typed in correctly.

  4. Go to the Body tab, make sure that you've selected the raw radio button, and paste in the input that would have gone in the API Console. If you don't have this, you can go to Documentation > Samples > View Content in the Create Customer row. Copy that sample information and paste it in.

  5. Click Send and you should receive the ipId in the Body tab.

    If your API call still does not work, then you will need to contact Code Connect support. The email to contact is at the bottom of this page.

Using Postman for GET

You can also try to use the GET /customers/{customerId} function to retrieve the customer details. The steps are the same. Open a new tab in Postman, make sure that the call is set to GET, copy in the appropriate Request URL, retrieve the correct HTTP headers, and then click Send.

Below is what the call should look like after you have clicked Send.

If you need help, please contact Code Connect Support and we will assist you as soon as possible.

Test SOAP Service

The following will guide you to test a desired Soap/XML-based API outside of FIS Code Connect with tools such as SoapUI or Postman.

Selecting the WSDL

  1. Once you have determined the API to test, download the WSDLs zip file and extract to your desired location.

    Make note of the WSDL that corresponds to the particular service that you will be testing and importing into SoapUI. The WSDLs typically reside in a folder called "interfaces".


  2. Importing WSDL into SoapUI

  3. After launching SoapUI select File - New SOAP Project from the menu bar. Click the browse button and select the desired WSDL.

    Once the new project is created there will be a corresponding entry on the left window pane containing an empty sample xml Request 1.


  4. Getting Your Sample XML

  5. The sample XML to test with can be retrieved by clicking on the Samples link in the Service List tab for the specific service that you are testing with.

    Once the Sample XML pops up in another window save it (cntl + S) to a desired location and open it up with your preferred XML editor (XmlSpy, XmlPad, Notepad, etc.).

    Copy the content from the xml editor and overlay it in Request 1 from SoapUI.


  6. Getting the Endpoint URL

  7. The endpoint URL can be found by clicking the Try Out button on the Services List tab.

    The URLs are located in the Resource URL section. Any of the URLs will work, but it's up to your implementation to choose which one makes sense.

    Copy the desired Resource URL and click the URL drop down in SoapUI and select [add new endpoint..]. Paste the copied endpoint and click OK.


  8. Getting the Header Parameters

  9. The Header Parameters can be found by clicking the Try Out button on the Services List tab.

    The Header Parameters are located in the Set Request Header section. If you don't have an Authorization key, get it from the API Console.

    Set the headers in SoapUI.

    Once the headers are defined, click on the green play button to run the test in SoapUI. A successful response should be displayed.