Actions12
Overview
This node allows you to patch (update partially) an existing facility in the fulfillmenttools system via its API. It is useful when you want to modify specific details of a facility without replacing the entire record. Common scenarios include updating address information, contact details, operational hours, or status of a warehouse, store, or distribution center.
For example, you might use this node to update the phone number of a facility’s contact person, change the picking methods used at a location, or adjust the capacity planning timeframe.
Properties
| Name | Meaning |
|---|---|
| Facility ID | The unique identifier of the facility you want to patch. This is required to specify which facility record will be updated. |
| Facility | A JSON object representing the partial data to update on the facility. It supports complex nested structures including: actions array with detailed address info, contact details, picking times per weekday, services, status, tags, and more. You provide only the fields you want to change. |
The "Facility" JSON can include fields such as:
actions: Array of action objects describing updates, each containing:action: The type of action to perform (refer to API docs).address: Detailed address info including city, country, postal code, street, company name, phone numbers, email addresses, and custom attributes.closingDays: Dates when the facility is closed.contact: Contact person details like first name, last name, role description.locationType: Type of location (e.g., STORE).name: Facility name.pickingTimes: Daily schedules with start/end times and capacities.pickingMethods: Methods used for order picking (e.g., SINGLE_ORDER).scanningRule: Rules for scanning items.services: Services offered by the facility (e.g., SHIP_FROM_STORE).status: Operational status (e.g., ONLINE).tenantFacilityId: Tenant-specific facility identifier.capacityEnabled: Boolean flag for capacity management.tags: Tags associated with the facility.
version: Version number of the facility record being patched.
Output
The output JSON contains the updated facility object as returned by the fulfillmenttools API after applying the patch. This includes all current properties of the facility reflecting the changes made.
No binary data output is involved.
Dependencies
- Requires an active connection to the fulfillmenttools API.
- Needs an API authentication token or key configured in n8n credentials for fulfillmenttools.
- The node uses internal helper functions to make HTTP PATCH requests to
/facilities/{facilityId}endpoint.
Troubleshooting
Common issues:
- Invalid or missing Facility ID: Ensure the Facility ID provided exists and is correct.
- Malformed JSON in the Facility property: The JSON must be valid and follow the expected schema; otherwise, the API will reject the request.
- Version conflicts: If the version number does not match the current version on the server, the patch may fail due to optimistic locking.
- Insufficient permissions or invalid API credentials can cause authorization errors.
Error messages:
"404 Not Found": Facility ID does not exist."400 Bad Request": Invalid JSON structure or missing required fields in the patch data."409 Conflict": Version mismatch; try retrieving the latest version before patching."401 Unauthorized": Check your API authentication token or credentials.
To resolve these, verify input parameters, ensure proper JSON formatting, confirm API credentials, and handle versioning correctly.
Links and References
- Fulfillmenttools API Documentation (for facility patch actions and JSON schema):
https://docs.fulfillmenttools.com/api/facilities#patch-facility - n8n Documentation on creating and using credentials:
https://docs.n8n.io/credentials/ - JSON Schema validation tools to verify your patch JSON before sending.