Actions37
- Booking Actions
- Catalog Actions
- Customer Actions
- Invoice Actions
- Order Actions
Order → Update
AI-generatedOverview
This node updates an existing order in the Square system using the Square API. It is useful for scenarios where you need to modify order details such as line items, taxes, or other order attributes programmatically. For example, you can update an order's version, line items, or clear specific fields by providing the updates in JSON format.
Use Case Examples
- Updating an order's line items after a customer changes their order.
- Clearing specific fields like taxes from an order.
- Applying an idempotency key to ensure the update is applied only once.
Properties
| Name | Meaning |
|---|---|
| Order ID | The ID of the order to update. |
| Order Updates (JSON) | The order updates as JSON. This includes the fields to clear and the updated order details. |
| Additional Fields | Optional additional fields for the update, such as an idempotency key to ensure the update is applied only once. |
Output
JSON
order_id- The ID of the updated order.orderversion- The version number of the updated order.line_items- The updated line items of the order.fields_to_clear- Fields that were cleared during the update.
Dependencies
- Square API with an API key credential for authentication.
Troubleshooting
- Ensure the 'Order Updates (JSON)' field contains valid JSON; otherwise, a parsing error will occur.
- If no fields are provided to update, the API may reject the request or no changes will be made.
- Use a unique idempotency key to avoid duplicate updates if the request is retried.
- Common error messages include JSON parsing errors and API errors returned by Square, which should be handled by checking the error message and correcting the input accordingly.
Links
- Square API - Update Order - Official Square API documentation for updating orders.