Hfd icon

Hfd

Consume Hfd API (v.0.1.1)

Shipments → Cancel

AI-generated

Overview

This node integrates with the Hfd API to perform various operations related to shipping management. Specifically, for the Shipments - Cancel operation, it allows users to cancel an existing shipment by providing required identifiers. This is useful in scenarios where a shipment needs to be retracted or corrected after creation, such as when an order is canceled or a mistake was made during shipment setup.

Practical examples include:

  • Cancelling a shipment that was created erroneously.
  • Stopping a shipment due to customer request before dispatch.
  • Managing shipment lifecycle programmatically within automated workflows.

Properties

Name Meaning
APPNAME A hidden internal parameter set to "run" (used internally by the node, not user-facing).
PRGNAME A hidden internal parameter set to "bitul_mishloah" (used internally by the node).
P1 Random number returned in the response after shipment creation; used here to identify the shipment to cancel.
P2 Your customer number at the shipping company; must be obtained from the shipping company and identifies your account.

Output

The node outputs JSON data representing the response from the Hfd API regarding the cancellation request. This typically includes confirmation of cancellation status and any relevant metadata returned by the API.

If the API supports binary data responses (e.g., documents or labels), those would be included in the binary output field, but this is not explicitly indicated in the provided code snippet.

Dependencies

  • Requires an API key credential for authenticating with the Hfd API.
  • Uses an HTTP client internally to communicate with the Hfd API endpoints.
  • The node depends on the hfdApi credential configured in n8n for authentication.
  • No additional external services are explicitly required beyond the Hfd API itself.

Troubleshooting

  • Invalid or missing credentials: Ensure the API key credential is correctly configured and tested in n8n.
  • Incorrect P1 or P2 values: The random number (P1) and customer number (P2) must be accurate and correspond to valid shipment data; otherwise, the cancellation will fail.
  • API errors: If the API returns errors, check network connectivity and verify that the shipment exists and is cancellable.
  • Hidden parameters (APPNAME, PRGNAME): These are internal and should not be modified; altering them may cause unexpected behavior.

Common error messages might include authentication failures, invalid shipment identifiers, or permission denials. Resolving these usually involves verifying credentials, input parameters, and API access rights.

Links and References

Discussion