If the API request that was added in the Integration Details section does not return the information that is required, you add an additional request to return the information.
Before you start
In the Integration details section, select the checkbox in the Enable Extra Details subsection.
Note
Review the information provided here to find out how to enter the Web Service URL for the additional API request and how to enter values in the Result field which is used to extract information from the external API request.
Format of the additional API request
Let's say that the Web Service URL that was entered on the Integration details page was:
https://api.cosc.com/generic_users_list? And, the unique identifier for each item returned is external_id.
The format of the additional API request is as follows:
<web_service_url><item_identifier>={{list_response_item.<item_identifier>}}
Example
https://api.cosc.com/generic_users_list?external_id={{list_response_item.external_id}}
Result
To return the information you require depends on the format of the response.
If the information required is returned as a flat object, you enter {{detail_response}}.
If the information required is nested in an object, and you want to return all of the items in the object, the format of the response is {{detail_response.<object_name>[0]}}. In this case, you enter [0], because it is the first object in the list.
Examples
Items not nested in object: {{detail_response}}
Items nested in object: {{detail_response.users[0]}}
Review the response for the detail API call
When you complete and save the configuration, go to the Response section, click Review response , and select INTEGRATION DETAIL RESPONSE. A list of the fields and values that are returned by the API call for the first few records are displayed and a list of the fields and values that can be mapped to Oomnitza are displayed.
Procedure
- Enter the Web Service URL.
- Ensure the Method is set to GET.
- Optional. Enter headers and parameters.
- Enter code to extract the information from the API request.
- Save your changes.
Next
Schedule the integration
Comments
0 comments
Please sign in to leave a comment.