Teamleader icon

Teamleader

Consume Teamleader API

Actions60

Overview

This node integrates with the Teamleader API to perform various operations on different resources. Specifically, for the Invoices resource with the Delete operation, it allows users to delete an invoice by specifying its ID. This is useful in scenarios where invoices need to be removed from the system, such as correcting mistakes or cleaning up outdated records.

Practical example:

  • Automatically deleting an invoice after a refund has been processed externally.
  • Removing test invoices created during development or testing phases.

Properties

Name Meaning
ID The unique identifier of the invoice to delete. This is a required string input.

Output

The output of this node is a JSON array containing the response data from the Teamleader API after attempting to delete the specified invoice. Typically, the response will confirm the deletion or provide relevant status information.

If no data is returned but the request was successful, the output will contain an object with a message indicating "No data returned but request was successful".

In case of errors, the output may include error messages if the node is configured to continue on failure.

The node does not output binary data.

Dependencies

  • Requires an OAuth2 API credential for authenticating with the Teamleader API.
  • The node makes HTTP POST requests to the Teamleader API endpoint https://api.focus.teamleader.eu with the appropriate operation path.
  • Proper configuration of the OAuth2 credentials within n8n is necessary for successful API calls.

Troubleshooting

  • Common issues:

    • Invalid or missing invoice ID: Ensure the ID provided corresponds to an existing invoice.
    • Authentication failures: Verify that the OAuth2 credentials are correctly set up and have sufficient permissions.
    • Network or API downtime: Check connectivity and Teamleader API status.
  • Common error messages:

    • "No data got returned": Indicates the API response did not include expected data; verify the invoice ID and API availability.
    • API errors returned by Teamleader (e.g., unauthorized, not found): Review the error message details and adjust inputs or credentials accordingly.

Links and References

Discussion