Actions2
- Action Actions
Overview
This node integrates with the Parceldaily API to perform custom operations related to parcel shipping. Specifically, the Check Rate operation under the Action resource allows users to calculate shipping rates based on package details and shipment parameters.
Typical use cases include:
- Calculating shipping costs before creating a shipment.
- Comparing rates for different origins, destinations, weights, or cash-on-delivery amounts.
- Automating rate checks in logistics workflows to dynamically select shipping options.
For example, an e-commerce platform could use this node to fetch real-time shipping rates from Parceldaily based on customer delivery addresses and package weight, enabling accurate shipping cost display at checkout.
Properties
| Name | Meaning |
|---|---|
| CJ Token | The CJ token used for authentication with the Parceldaily API. |
| Origin | The origin postcode from where the package will be shipped. |
| Destination | The destination postcode where the package is to be delivered. |
| Weight | The weight of the package in kilograms. |
| COD | Cash on Delivery amount (if applicable). |
| Origin Country | The country of the origin address (default: Malaysia). |
| Destination Country | The country of the destination address (default: Malaysia). |
| Is Next Day Remittance | Boolean flag indicating whether next day remittance service is required. |
| Token | An additional authentication token required by the API. |
| Merchant ID | The merchant identifier associated with the API credentials. |
Output
The node outputs a JSON object containing the response from the Parceldaily API's rate check endpoint. This typically includes detailed rate information such as shipping cost, estimated delivery time, and any applicable fees.
The output structure is directly derived from the API response and may contain nested fields describing various rate components.
No binary data output is produced by this operation.
Dependencies
- Requires access to the Parceldaily API endpoint
https://api.customje.com/pd-check-rate.php. - Needs valid authentication tokens (
CJ Token,Token) and aMerchant IDto authorize requests. - The node uses an internal helper function to make HTTP POST requests with JSON payloads.
- No additional external dependencies beyond standard n8n environment and network connectivity.
Troubleshooting
Common issues:
- Invalid or expired tokens leading to authentication errors.
- Incorrect or missing required parameters such as postcodes or weight.
- Network connectivity problems preventing API calls.
- Unsupported operation or resource errors if misconfigured.
Error messages:
"The operation "check-rate" is not supported!": Indicates the operation parameter is incorrect or unsupported."The resource "actions" is not known!": Indicates the resource parameter is invalid.- API error responses returned in the JSON output may indicate specific issues like invalid credentials or parameter validation failures.
Resolutions:
- Verify all required input properties are correctly set.
- Ensure tokens and merchant IDs are current and have proper permissions.
- Check network access to the Parceldaily API endpoint.
- Use the node’s "Continue On Fail" option to handle errors gracefully in workflows.
Links and References
- Parceldaily API Documentation (assumed base URL)
- n8n Documentation on Creating Custom Nodes
- General info on Shipping Rate APIs (for conceptual understanding)