Actions6
Overview
This node integrates with the Myparcelasia shipping API to create shipments programmatically. It is designed for automating parcel shipment creation, allowing users to specify detailed sender and receiver information, package details, and shipping preferences. This node is beneficial in e-commerce workflows, logistics automation, or any scenario where bulk or automated shipment creation is needed.
For example, an online store can use this node to automatically generate shipment orders when a customer places an order, specifying parcel size, weight, sender and receiver addresses, and delivery options like cash on delivery (COD) or SMS notifications.
Properties
| Name | Meaning |
|---|---|
| CJ Token | The CJ Token used for authenticating API requests |
| API Key | The API Key for accessing the Myparcelasia service |
| Integration Order ID | Optional integration order identifier |
| Send Method | Shipping method (e.g., "pickup") |
| Send Date | Shipment date in YYYY-MM-DD format |
| Type | Type of shipment (e.g., "parcel") |
| Declared Weight | Weight of the shipment in kilograms (range 0.001 - 30 kg) |
| Size | Parcel size category (e.g., "flyers_m") |
| Width | Parcel width in centimeters (optional) |
| Length | Parcel length in centimeters (optional) |
| Height | Parcel height in centimeters (optional) |
| Provider Code | Optional code for the shipping service provider (e.g., "poslaju") |
| Content Type | Optional content type classification (e.g., "general") |
| Content Description | Optional description of the parcel contents |
| Content Value | Optional declared value of the contents in Malaysian Ringgit (RM) |
| Has COD | Whether Cash on Delivery is enabled ("yes" or "no") |
| Has SMS | Whether SMS notification is enabled ("yes" or "no") |
| Sender Name | Name of the sender |
| Sender Phone | Phone number of the sender |
| Sender Email | Optional email address of the sender |
| Sender Company Name | Optional company name of the sender |
| Sender Address Line 1 | First line of sender's address |
| Sender Address Line 2 | Optional second line of sender's address |
| Sender Address Line 3 | Optional third line of sender's address |
| Sender Address Line 4 | Optional fourth line of sender's address |
| Sender Postcode | Postcode of the sender |
| Sender City | Optional city of the sender |
| Sender State | Optional state of the sender |
| Sender Country Code | Optional country code of the sender (e.g., "MY") |
| Receiver Name | Name of the receiver |
| Receiver Phone | Phone number of the receiver |
| Receiver Email | Email address of the receiver |
| Receiver Address Line 1 | First line of receiver's address |
| Receiver Address Line 2 | Optional second line of receiver's address |
| Receiver Address Line 3 | Optional third line of receiver's address |
| Receiver Address Line 4 | Optional fourth line of receiver's address |
| Receiver Postcode | Postcode of the receiver |
| Receiver City | Optional city of the receiver |
| Receiver State | Optional state of the receiver |
| Receiver Country Code | Country code of the receiver (e.g., "MY") |
Output
The node outputs a JSON object containing the response from the Myparcelasia API after creating the shipment. This typically includes shipment confirmation details such as shipment keys, status, tracking numbers, or error messages if the request failed.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"shipment_key": "abc123",
"status": "success",
"tracking_number": "XYZ987654321",
"message": "Shipment created successfully"
}
Dependencies
- Requires valid authentication credentials: a CJ Token and an API Key.
- Connects to the Myparcelasia API endpoint at
https://api.customje.com/mpa-create-shipment.php. - Requires internet access from the n8n environment to reach the external API.
- No additional external libraries beyond standard n8n helpers are required.
Troubleshooting
- Authentication errors: If the CJ Token or API Key is invalid or missing, the API will reject the request. Ensure these credentials are correct and have necessary permissions.
- Validation errors: Missing required fields such as sender/receiver names, phone numbers, addresses, or shipment details will cause the API to return errors. Double-check all required inputs.
- Date format issues: The send date must be in
YYYY-MM-DDformat; incorrect formatting may cause failures. - Weight and size limits: Declared weight must be between 0.001 and 30 kg. Values outside this range may be rejected.
- Network issues: Connectivity problems to the API endpoint will cause request failures. Verify network access and proxy settings if applicable.
- API changes: If the external API changes its parameters or endpoints, the node may fail until updated accordingly.
Links and References
- Myparcelasia API Documentation (hypothetical link)
- n8n HTTP Request Helper Documentation