Overview
This node manages order fulfillments on the Sapo platform, allowing users to perform various operations related to order fulfillment such as creating fulfillments, retrieving details, updating tracking information, canceling fulfillments, and managing fulfillment events. It is useful for automating and integrating order fulfillment workflows within e-commerce or logistics processes that use Sapo.
Common scenarios include:
- Creating a new fulfillment for an order with shipping and tracking details.
- Retrieving fulfillment details or lists of fulfillments for monitoring.
- Updating shipment tracking information to keep customers informed.
- Canceling fulfillments if orders are changed or canceled.
- Managing fulfillment events to track shipment status updates.
- Listing available carriers supported by Sapo.
Example: Automatically create a fulfillment with UPS tracking info when an order is placed, then update tracking as the package moves through the delivery process.
Properties
| Name | Meaning |
|---|---|
| operation | The action to perform. Options: "cancel", "create", "createEvent", "deleteEvent", "get", "getCarriers", "getMany", "listEvents", "updateTracking". |
| orderId | The ID of the order associated with the fulfillment (required for most operations). |
| fulfillmentId | The ID of the fulfillment to operate on (required for operations like get, updateTracking, cancel, createEvent, listEvents, deleteEvent). |
| returnAll | Boolean indicating whether to return all results or limit the number (used in listing fulfillments). |
| limit | Maximum number of results to return when not returning all (used in listing fulfillments). |
| additionalFields | Additional optional filters for listing fulfillments, including status (cancelled, error, failure, open, pending, success), created/updated date ranges. |
| eventId | The ID of a fulfillment event to delete (required for deleting an event). |
| data | JSON object containing data relevant to the operation: fulfillment creation, tracking update, or event creation. |
Output
The node outputs an array with one item per execution containing a json field. The structure of this json depends on the operation:
- For creation, retrieval, update, and cancellation operations, it returns the fulfillment object or confirmation.
- For listing fulfillments or events, it returns arrays of those objects.
- For deleting an event, it returns
{ success: true }. - For listing carriers, it returns
{ carriers: [...] }.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Sapo API.
- Depends on the external Sapo API service for all fulfillment-related operations.
- Needs proper configuration of the API credentials in n8n to function.
Troubleshooting
- Common issues may include invalid or missing order IDs or fulfillment IDs, resulting in errors from the Sapo API.
- Errors related to authentication usually indicate misconfigured or missing API credentials.
- If the node throws errors about invalid JSON in the
dataproperty, ensure the JSON is well-formed and matches expected fields. - Network or API downtime can cause request failures; retry or check Sapo service status.
- When using pagination (
returnAllfalse withlimit), ensure limits are within allowed ranges.
Links and References
- Sapo API Documentation (general reference for API endpoints and data structures)
- n8n documentation on Creating Custom Nodes