Skip to content

Create or Update Products

Create or update the specified list of products. All products will be checked against the database for uniqueness. Any products unique within your organization will be created and all others will be updated. A product is considered unique if:

  • It's manufacturer is unique within your organization.
  • OR it's brand is unique within it's manufacturer.
  • OR it's name is unique within it's brand.
  • OR it's size and unitsForSize are uniqe within it's brand.

Custom fields DO NOT make a product unique. Supplying two products that only differ in their custom fields will cause a collision and an error will be returned.

Verb PUT
Endpoint {base-url}/products
Max Page Size N/A

Request Body

{
    "body": [{
        "manufacturer": "test manufacturer",
        "brand": "test brand",
        "productId": 1673,
        "name": "test product",
        "customData": null,
        "size": 2,
        "unitsForSize": "oz.",
        "container": "unknown",
        "upc": null,
        "productImage": null,
        "nutritionImage": null,
        "cost": 0.0,
        "defaultPrice": 0.0,
        "isACommonProduct": true,
        "vendSize": "unknown",
        "calories": 3720,
        "productGroup": "Other",
        "organizationId": 1,
        "number": "this is a number",
        "customField1": null,
        "customField2": null,
        "customField3": null,
        "customField4": null,
        "customField5": null,
        "customField6": null,
        "customField7": null,
        "customField8": null,
        "customField9": null,
        "customField10": null,
        "customField11": null,
        "customField12": null,
        "customField13": null,
        "customField14": null,
        "customField15": null,
        "isDeleted": false
    }, {
        "manufacturer": "test manufacturer",
        "brand": "test brand",
        "name": "test product 2",
        "customData": null,
        "size": 2,
        "unitsForSize": "oz.",
        "container": "unknown",
        "upc": "1212312",
        "productImage": null,
        "nutritionImage": null,
        "cost": 0.0,
        "defaultPrice": 0.0,
        "isACommonProduct": true,
        "vendSize": "unknown",
        "calories": 3720,
        "productGroup": "",
        "organizationId": 1,
        "number": "2this is a number",
        "customField1": null,
        "customField2": null,
        "customField3": null,
        "customField4": null,
        "customField5": null,
        "customField6": null,
        "customField7": null,
        "customField8": null,
        "customField9": null,
        "customField10": null,
        "customField11": null,
        "customField12": null,
        "customField13": null,
        "customField14": null,
        "customField15": null,
        "isDeleted": false
    }]
}

Returns

On Success

The ids of the created products.

Response Body

[
  1673,
  1674
]