Skip to main content
POST
/
v3
/
products
/
update-create
Update or Create Product
curl --request POST \
  --url http://localhost/api/v3/products/update-create \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "handle": "<string>",
  "external_id": "<string>",
  "brand": "<string>",
  "variants": [
    {
      "sku": "<string>",
      "price": 123,
      "position": 123,
      "title": "<string>",
      "external_id": "<string>",
      "barcode": "<string>",
      "description": "<string>",
      "available_quantity": 123,
      "price_discounted": 123,
      "price_comparison": 123,
      "price_cost": 123,
      "tags": [
        "<string>"
      ],
      "images": [
        {
          "url": "<string>",
          "sort_order": 123
        }
      ],
      "options": [
        {
          "value": "<string>",
          "name": "<string>",
          "sort_order": 123
        }
      ]
    }
  ],
  "type": "appointment",
  "status": "new",
  "description": "<string>",
  "web_url": "<string>",
  "currency": "<string>",
  "position": 123,
  "systems": [
    "<string>"
  ],
  "channels": [
    "<string>"
  ],
  "tags": [
    "<string>"
  ],
  "images": [
    {
      "url": "<string>",
      "sort_order": 123
    }
  ]
}
'
{
  "data": {
    "id": 123,
    "title": "<string>",
    "handle": "<string>",
    "type": "<string>",
    "external_id": "<string>",
    "status": "<string>",
    "brand": "<string>",
    "department": "<string>",
    "link_brand": "<string>",
    "link_department": "<string>",
    "web_url": "<string>",
    "description": "<string>",
    "currency": "<string>",
    "position": 123,
    "images": "<string>",
    "systems": [
      "<string>"
    ],
    "channels": [
      "<string>"
    ],
    "tags": [
      "<string>"
    ],
    "options": "<string>",
    "custom_fields": [
      {
        "name": "<string>",
        "handle": "<string>",
        "namespace": "<string>",
        "value": "<string>",
        "type": "<string>",
        "custom_fieldable_type": "<string>",
        "custom_fieldable": {
          "id": "<string>",
          "external_id": "<string>",
          "profile_id": "<string>",
          "meta": "<string>",
          "total": "<string>",
          "total_original": "<string>",
          "rounding": "<string>",
          "margin": "<string>",
          "is_void": "<string>",
          "transacted_at": "<string>",
          "timezone": "<string>",
          "payments": "<string>",
          "receipt_is_email": "<string>",
          "receipt_ref": "<string>",
          "linked_receipt_ref": "<string>",
          "claimed_at": "<string>",
          "receipt_email": "<string>",
          "currency_id": "<string>",
          "currency_rate": "<string>",
          "currency": "<string>",
          "type": "<string>",
          "status": "<string>",
          "order_number": "<string>",
          "order_id": "<string>",
          "external_order_id": "<string>",
          "created_at": "<string>",
          "updated_at": "<string>"
        },
        "created_at": "<string>",
        "updated_at": "<string>",
        "version": 123,
        "is_index": 123
      }
    ],
    "variants": [
      {
        "id": 123,
        "product_id": 123,
        "sku": "<string>",
        "external_id": "<string>",
        "barcode": "<string>",
        "web_url": "<string>",
        "handle": "<string>",
        "title": "<string>",
        "description": "<string>",
        "position": 123,
        "price": 123,
        "price_discounted": 123,
        "price_comparison": 123,
        "price_cost": 123,
        "available_quantity": 123,
        "images": "<string>",
        "meta": [
          "<unknown>"
        ],
        "tags": [
          "<string>"
        ],
        "options": [
          {
            "name": "<string>",
            "value": "<string>",
            "sort_order": 123
          }
        ],
        "created_at": "<string>",
        "updated_at": "<string>"
      }
    ],
    "organisation": {
      "id": 123,
      "name": "<string>",
      "handle": "<string>",
      "description": "<string>",
      "short_description": "<string>",
      "icon": "<string>",
      "image_url": "<string>",
      "notes": "<string>",
      "type": "<string>",
      "status": "<string>",
      "is_tenant": 123,
      "is_active": 123,
      "phone": "<string>",
      "email": "<string>",
      "secondary_phone": "<string>",
      "domain": "<string>",
      "authorised_domains": [
        "<unknown>"
      ],
      "meta": [
        "<unknown>"
      ],
      "locations": [
        {
          "id": 123,
          "type": "<string>",
          "name": "<string>",
          "handle": "<string>",
          "description": "<string>",
          "phone": "<string>",
          "email": "<string>",
          "timezone": "<string>",
          "external_id": "<string>",
          "external_code": "<string>",
          "is_published": true,
          "is_permanently_closed": true,
          "address": {
            "id": 123,
            "address_line_1": "<string>",
            "address_line_2": "<string>",
            "address_line_3": "<string>",
            "company": "<string>",
            "latitude": 123,
            "longitude": 123,
            "city": "<string>",
            "postcode": "<string>",
            "state": "<string>",
            "country": "<string>",
            "notes": "<string>",
            "external_id": "<string>",
            "is_default": true,
            "created_at": "<string>",
            "updated_at": "<string>",
            "meta": [
              "<unknown>"
            ],
            "name": "<string>",
            "type": "<string>",
            "phone": "<string>",
            "iso": "<string>",
            "iso_state": "<string>",
            "profile_id": "<string>",
            "custom_fields": {}
          },
          "normal_hours": [
            [
              "<unknown>"
            ]
          ],
          "special_hours": [
            [
              "<unknown>"
            ]
          ],
          "tags": [
            "<string>"
          ],
          "custom_fields": {},
          "icon": "<string>",
          "country_iso_3": "<string>",
          "image_url": "<string>",
          "created_at": "<string>",
          "updated_at": "<string>",
          "departments": [
            {
              "id": 123,
              "name": "<string>",
              "handle": "<string>",
              "external_id": "<string>",
              "external_code": "<string>",
              "description": "<string>",
              "short_description": "<string>",
              "url": "<string>",
              "image_url": "<string>",
              "internal_note": "<string>",
              "meta": [
                "<unknown>"
              ],
              "brand_id": 123,
              "location_id": 123,
              "brand": {
                "name": "<string>",
                "handle": "<string>"
              },
              "created_at": "<string>",
              "updated_at": "<string>"
            }
          ]
        }
      ],
      "address": {
        "id": 123,
        "address_line_1": "<string>",
        "address_line_2": "<string>",
        "address_line_3": "<string>",
        "company": "<string>",
        "latitude": 123,
        "longitude": 123,
        "city": "<string>",
        "postcode": "<string>",
        "state": "<string>",
        "country": "<string>",
        "notes": "<string>",
        "external_id": "<string>",
        "is_default": true,
        "created_at": "<string>",
        "updated_at": "<string>",
        "meta": [
          "<unknown>"
        ],
        "name": "<string>",
        "type": "<string>",
        "phone": "<string>",
        "iso": "<string>",
        "iso_state": "<string>",
        "profile_id": "<string>",
        "custom_fields": {}
      },
      "custom_fields": {},
      "created_at": "<string>",
      "updated_at": "<string>"
    },
    "meta": [
      "<unknown>"
    ],
    "created_at": "<string>",
    "updated_at": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.omneo.io/llms.txt

Use this file to discover all available pages before exploring further.

Why use update-create?

Update expands the functionality of Add Product by first searching for an existing product with the provided external_id If a product sharing the same external_id is found, update the existing product with the provided data. Thehandle is removed if provided as part of the payload If no product is found with a matching external_id, create the product instead. This endpoint can save a call to the Browse Products or Read Product endpoints to first check if the product exists. With product variants attached to the product, a similar lookup is performed, except using the variants sku instead. If running an update-create on a product, and the product has matched by external_id the importer will then attempt to match variants on the matched product by sku. In a similar way to the master product, the variants will be updated or created according to the provided data on the update-create request

Payload

Provide an identical payload to if you were creating a new product with Add Product

Body

application/json
title
string
required
handle
string
required
external_id
string
required
brand
string
required
variants
object[]
required
Minimum array length: 1
type
enum<string> | null
Available options:
appointment,
simple,
configurable,
downloadable,
gift,
bundle,
voucher,
service,
subscription
status
enum<string>
Available options:
new,
active,
rundown,
discontinued,
ranged,
deleted,
archived,
draft
description
string | null
web_url
string | null
currency
string | null
position
integer
systems
string[]
Minimum array length: 1
channels
string[]
Minimum array length: 1
tags
string[]
images
object[]

Response

Product

data
Product · object
required