Myparcelasia icon

Myparcelasia

Custom operations

Overview

This node integrates with the Myparcelasia API to perform various shipping-related actions. Specifically, the Get Content Types operation retrieves a list of content types supported by the service, which can be useful when preparing shipment details or categorizing packages.

Common scenarios where this node is beneficial include:

  • Automating shipment creation workflows by dynamically fetching valid content types.
  • Validating or populating dropdowns in user interfaces with up-to-date content type options from Myparcelasia.
  • Integrating with logistics systems that require accurate content classification for customs or shipping purposes.

Example use case: Before creating a shipment, you call the Get Content Types operation to fetch all available content types and then select the appropriate one for your package description.

Properties

Name Meaning
CJ Token The authentication token required to access the Myparcelasia API.
API Key The API key credential used alongside the CJ Token for secure API access.

Output

The output is a JSON object containing the response from the Myparcelasia API endpoint that lists content types. The exact structure depends on the API but typically includes an array or dictionary of content type identifiers and their descriptions.

Example output structure (simplified):

{
  "content_types": [
    {
      "id": "type1",
      "name": "Electronics"
    },
    {
      "id": "type2",
      "name": "Clothing"
    }
  ]
}

No binary data is returned by this operation.

Dependencies

  • Requires network access to https://api.customje.com/mpa-get-content-types.php.
  • Needs valid credentials: a CJ Token and an API Key for authentication.
  • Uses HTTP POST requests with JSON payloads.
  • No additional environment variables or n8n-specific configurations are required beyond providing these credentials.

Troubleshooting

  • Authentication errors: If the CJ Token or API Key is invalid or expired, the API will reject the request. Ensure credentials are correct and have necessary permissions.
  • Network issues: Failure to reach the API endpoint may occur due to connectivity problems or firewall restrictions.
  • Unexpected response format: If the API changes its response schema, downstream nodes expecting certain fields might fail. Verify the API documentation if issues arise.
  • Operation not implemented error: This node only supports predefined operations; ensure you select "Get Content Types" under the "Action" resource.

Links and References

Discussion