Headers Input for GET: /Webservices/Lookup

**This resource provides a detailed explanation of the acceptable input structure for the header parameter in the GET: WebServices/Lookup endpoint. It outlines how custom headers should be formatted, how they interact with different authentication configurations, and best practices for avoiding conflicts when merging authentication and custom headers.

This parameter allows you to pass custom HTTP headers to be included in the subsequent API call made to the 3rd-party. This parameter is optional and works in conjunction with any authentication configured for the webservice host.

The value must be a JSON string representing a dictionary of header name-value pairs. Example:
{"Content-Type": "application/json","X-Custom-Header": "custom-value","Accept": "application/json"}

Header Behavior

1. No Authentication Configured

If the web service host has no authentication configured, your custom headers are passed through to the API request as-is.

Example:

  • Input: {"X-Custom-Header": "value"}
  • Result: Request includes X-Custom-Header: value

2. Token-Based Authentication Configured

If the web service host has a token URL configured for authentication, the system will:

  • Automatically obtain an authentication token
  • Generate authentication headers (typically Authorization: Bearer <token>)
  • Merge the authentication headers with your custom headers
  • Include both authentication and custom headers in the final request

Note: Avoid duplicating authentication-related headers, as conflicts may occur.


3. Basic Authentication Configured

If the web service host has a username and password configured, the system will:

  • Add an Authorization header with basic authentication credentials
  • Preserve any other custom headers you provide
  • Replace any Authorization header you include with the basic auth header

Example:

  • Input: {"X-Custom-Header": "value", "Content-Type": "application/xml"}
  • Result:
    • Authorization: Basic [encoded-credentials]
    • X-Custom-Header: value
    • Content-Type: application/xml

Best Practices

  1. Use valid JSON format for headers
  2. Check which authentication method your web service host uses
  3. Do not include Authorization headers when token-based auth is configured
  4. Common headers to include:
    • Content-Type: Specify request body format
    • Accept: Specify expected response format
    • Custom API keys or tracking headers (if required)

Null or Empty Values

If you don't need custom headers, you can pass:

  • null
  • An empty string ""
  • An empty JSON object {}
    All three are treated the same way (no custom headers added).