Distru icon

Distru

Interact with the Distru Public API v1

Actions35

Orders → Upsert

AI-generated

Overview

This node operation allows users to create or update orders in the Distru system via the Distru Public API v1. It is useful for managing customer orders by specifying company details, order items, charges, and additional order-related fields. For example, a user can upsert an order by providing the company ID, order date, delivery date, items with product IDs and quantities, and any applicable charges or discounts.

Use Case Examples

  1. Creating a new order for a customer by specifying the company ID, order date, and items purchased.
  2. Updating an existing order by providing the order ID and modifying the items or charges associated with the order.

Properties

Name Meaning
Company ID Customer company ID required for creating an order.
Additional Fields Optional fields for the order such as order date, delivery date, due date, internal notes, shipping location ID, and billing location ID.
Items List of items in the order, each with product ID, quantity, price per unit, location ID, batch ID, and package ID.
Charges List of charges applied to the order, including name, type (charge, discount, tax), price, and percentage.

Output

JSON

  • json - The JSON response from the Distru API representing the created or updated order data.

Dependencies

  • Distru Public API v1
  • API token credential

Troubleshooting

  • Missing or invalid API token will cause authentication errors; ensure the API token is set in credentials.
  • If the Resource ID (order ID) is required for update operations but not provided, the node will throw an error.
  • Missing binary data for operations requiring file uploads will cause errors; ensure the binary property is correctly set.

Links

Discussion