Web service

Web service

The 'web service' block can be used to create a connection to an external web service.

Web services can be defined in the general settings.

Note the web service block is available only after a Web service has been configured in the general settings.

Web service overview

Click the 'Add' button to add a new web service. Web services previously added are visible on this tab. The Web service can be modified, duplicated and deleted by clicking the three dots.


For each web service, the following information is displayed:
  • Name


Whether the web service may be tested:
  • Testing: allowed --> The web service may be used for testing purposes

  • Testing: Not Allowed --> The web service may not are used for testing purposes


In which environment the Web service may be used:
  • Campaign -> The web service is available in the Campaign Manager. Testing allowed must also be activated in the process.

  • Target audience -> The web service is available in the Target Manager. Testing allowed must also be activated in the process.



Add web service

Click on + Add top right to add an existing Web service or create a new Web service.


Using the search bar, you can check if the Web service is already available, or you can filter by category.


To create a new web service, click the add button.


Settings

In the Settings tab, set the basic information or the Web service.

Icons

Section

Function

Name

Give the web service a recognizable name.

URL

Enter Enter the endpoint URL or the remote Web service.

Icon

Customize the icon via Image Adjustment

Method

Choose the HTTPS method: Get, Post, Well or Delete

Authentication Type

Choose a authentication type: None, Basic, OAuth, HMAC


In addition, you set how the Web service is used via the following switches:

Icons

Section

Function

Testing Permit

Sta toe That the web service is being tested

Send multiple rows per call

Send multiple records in één API call. Note: to send multiple rows per call, the host Web service on this are furnished. You can compose the body expected by the web service on the tab body.

Use in Campaign Manager

Create the web service available In the Campaign Manager

Use in Target Manager

Create the web service available In the Target Manager

 

Body

In the Body tab, you set the content or the API call.

Icons

Section

Function

Content Type

Choose the size or the body

Body

Fill the body or the invocation in


Headers

In the Headers tab, add HTTP headers to the call.

Icons

Section

Function

+ Add header

Add a extra add header

Key

Give the key a naam

Waarde

Give the new header a value (e.g., authentication token/API key or content-type)

Type

Choose a type, e.g. Text

Remove Header

Remove an existing header

  

Output

In the Output tab, you set which data from the Web service response is stored.

Icons

Section

Function

Output Format

Choose between JSON or XML

Key in output

Indicate whether the key should be taken in the output. Choose the column name and select the sleutel

+ Add an output

Add a output field Add and name the field

Remove Output

Remove an existing output field


Add output

Kolomnaam

Name or column in campaign.

JSONPath expression

The value or the column in the API response

Choose key type

Define key type for campaign

Remove output

Click on the trash can icon to delete the output



Note: rows from the API response with a column length greater than 999 characters will not be processed in Ternair Campaign.

In case or a JSON selector, you can also use the following syntax: {{ select_json "JSON Path Expression" }}. This syntax supports the Scriban template language, for example: {{ select_json "$.name" }}.

Values with spaces can be retrieved with the following syntax: $.['value with space'].


Defining multiple keys

Multiple keys can be defined in one Web service. By clicking on the key field you can designate a master key.

Note: Designating a master key is not necessary.


Advanced

In the Advanced tab, you set how the Web service handles multiple results and pagination.

Icons

Section

Function

Result has multiple rows

Enable when the webservice returns multiple rows

Array Expression

Give the expression on which the array is identified in the response

Has Pagination

Enable if the Web service returns paginated results. Then choose between: Use page numbers (set the start and end page number), Use the 'next URL' property or Stop at the first blank page


Save the configuration via:

Option

Description

Apply

Save without the editor or the new
created web service to close

Save*

Save and close the editor

Cancel

Close the editor without saving changes



Good to know

Generate a unique value

Generate on the fly a guid value in your output. Ideal when your response contains multiple rows that do not contain a unique value.


Use syntax {{ math.uuid }} to get the following as a result:
019b3dad-be25-4ce9-bfc5-6c3a956cbc61
027ec66e-8317-45b9-9ddc-89083b89a8df



Copyright © 2026 Ternair.