Axonaut icon

Axonaut

Interact with Axonaut API - Complete coverage of all endpoints

Actions133

Product → Upsert

AI-generated

Summary

Create or update a product in Axonaut by specifying a unique identifier and desired fields.

Inputs

  • Unique Field (required) — Select the product field (Name or Reference) to identify existing products.
  • Unique Value (required) — Provide the value to search for in the selected unique field.
  • Add Fields — Specify additional product details such as Reference code, Description, Price, and Unit to set or update.

Output shape

a single record representing the created or updated product, including an _operation field indicating 'created' or 'updated'.

The operation searches for an existing product using the Unique Field and Unique Value. If found, it updates the product with the provided fields; otherwise, it creates a new product. Output includes the product data and an _operation annotation.

Examples

Example 1: Upsert a product using the product's Name as the unique identifier to update its price and description if it exists or create it if not.

Set Unique Field to 'Name', provide the Unique Value to identify the product, and specify any fields to add or update such as Price and Description.

Discussion