PetjeAf icon

PetjeAf

Interact with the PetjeAf API

Cancel Membership

AI-generated

Overview

This node integrates with the PetjeAf API to perform various user-related operations, including canceling a user's membership. The "Cancel Membership" operation sends a request to the PetjeAf service to terminate the membership of a specified user by their User ID.

Common scenarios for this node include automating user management workflows such as deactivating memberships when users unsubscribe or are no longer eligible. For example, an organization could use this node to automatically cancel memberships in PetjeAf when a user cancels their subscription on another platform.

Properties

Name Meaning
User ID The unique identifier of the user whose membership will be canceled. This is a required string input.

Output

The output is a JSON object containing the response from the PetjeAf API after attempting to cancel the membership. The exact structure depends on the API's response but typically includes confirmation of cancellation or error details.

No binary data is output by this node.

Example output JSON:

{
  "status": "success",
  "message": "Membership canceled for user 12345"
}

Dependencies

  • Requires an active connection to the PetjeAf API.
  • Needs an API authentication token configured in n8n credentials (referred to generically as an API key credential).
  • The node makes HTTP requests to https://api.petjeaf.com/n8n.

Troubleshooting

  • Common issues:

    • Invalid or missing User ID: Ensure the User ID is correctly provided and corresponds to an existing user.
    • Authentication errors: Verify that the API key credential is valid and has sufficient permissions.
    • Network or API downtime: Check connectivity to the PetjeAf API endpoint.
  • Error messages:

    • "The operation \"cancelMembership\" is not supported!": This indicates an invalid operation parameter; ensure the operation is set to "Cancel Membership".
    • Errors returned from the API will be included in the output JSON under an error message field if "Continue On Fail" is enabled.
    • Generic errors will throw exceptions; review the error message for details.

Links and References

Discussion