REST lookups allow users to define custom lookups for REST destination integrations. These lookups can retrieve data that can then be used as a mappable field, part of a calculation or a restriction.
- Navigate to Service Lookups on the Rest Service Maintenance Page.
- Enter a Name for the Lookup and click the Edit Lookup button.
Settings
- Lookup Name – Name of the lookup. Value will be defaulted in from previous step, but can be changed here.
- Base Data Source – Uses field and endpoint settings from an existing Service Data Source. Leave blank to setup these settings manually.
- Endpoint – Enter the endpoint that will be used. For example, if the full endpoint is https://example.com/oauth/v1/contacts, the Endpoint would just be /contacts as everything before the slash should be the base url on the main settings page.
- Request Method – Choose the method that is required for the endpoint.
Body
Sometimes endpoints need to be given data before they can return data back. To do that you will need to send a body to the endpoint.
Type- Choose the body type to be sent.
Body- Enter the required data that needs to be sent to the endpoint.
Returnable Fields
Add fields that can be returned for a record found by the lookup. The fields needed will be selected later when creating an additional column within an integration.
You can manually enter each field available from the service endpoint or use the Load from File to select a json file that has the properly formatted fields.
When entering fields manually, enter the field name, the Path using dot notation and the field type.
Headers
- Default Headers Section- Default headers are headers available to use from the main headers setup page for the service.
- Use Default headers- Check this box if the default headers are to be used for the endpoint. When unchecked, the lower headers section will be used.
- Entity Headers Section- These are endpoint specific headers. Use these if headers are needed, but they are not setup as default headers or if there are default headers that shouldn’t be included for this endpoint.
- Clear Empty- Check this box to Clear the header when a request is made if it is blank.
Parameters
- Default Parameters Section- Default parameters are parameters available to use from the main parameters setup page for the service.
- Use Default Parameters- Check this box if the default parameters are to be used for the endpoint. When unchecked, the lower parameters section will be used.
- Parameters Section- These are endpoint specific parameters. Use these if parameters are needed, but they are not setup as default parameters or if there are default parameters that shouldn’t be included for this endpoint.
- Clear Empty- Check this box to Clear the parameter when a request is made if it is blank.
Filter Criteria
Filters can be applied to rest variables, parameters, or headers. You will need to refer to your service api to determine which option is best suited for your endpoint. Mark the Display in Filter checkbox to use it with the filtering of the lookup. This will be used later when setting up an additional column to use the lookup.
- Click Save to save the Service Lookup settings. The lookup can now be used on an integration.