Magnet Customer icon

Magnet Customer

Consume Magnet Customer API

Treatment → Search

AI-generated

Overview

This node performs a search operation on the 'Treatment' resource using the Magnet Customer API. It allows users to search for treatments based on a search string, with pagination support through page and limit parameters. This is useful for retrieving specific treatment records or browsing treatments in a paginated manner.

Use Case Examples

  1. Search for treatments containing a specific keyword in their name or description.
  2. Retrieve a paginated list of treatments, specifying the page number and the number of results per page.

Properties

Name Meaning
Authentication Method of authentication to use for the API request, either API Token or OAuth2.
Search The search string to filter treatments by relevant keywords.
Page The page number of the search results to retrieve.
Limit The maximum number of treatment results to return per page, with a minimum of 15.

Output

JSON

  • _id - Unique identifier of the treatment.
  • name - Name of the treatment.
  • description - Description or details of the treatment.
  • otherProperties - Additional properties returned by the API related to the treatment.

Dependencies

  • Magnet Customer API

Troubleshooting

  • Ensure the API credentials (API Token or OAuth2) are correctly configured and valid.
  • Verify that the search string is properly formatted and not empty if required by the API.
  • Check the page and limit values to be within acceptable ranges to avoid errors or empty results.
  • If custom fields are involved, ensure the 'resolveCustomFields' option is set correctly to get detailed field data instead of IDs.

Discussion