An example JSON payload containing 2 products.

Save the content as products.json and use this curl command to upload the products using the bulk update api:


curl -H "X-OMNIVORE-CLIENT-ID: ***" -H "X-OMNIVORE-CLIENT-SECRET: ***" --request POST -T products.json "https://m1.omnivore.com.au/v2/retailer/example/products/bulkUpdate"


{
  "products": [
    {
      "sku": "TEST1",
      "name": "Test 1 Example Product",
      "description": "Html text describing the product.",
      "active": true,
      "variants": [
        {
          "sku": "TEST1",
          "sell_price": {
            "with_tax": "11.00",
            "without_tax": "10.00",
            "tax": "1.00",
            "currency": "AUD"
          },
          "quantity": 1,
          "images": [
            "https://example.com/image1.jpg"
          ]
        }
      ]
    },
    {
      "sku": "TEST2",
      "name": "Test 2 Example Product",
      "description": "Product with colour-based variants.",
      "active": true,
      "variants": [
        {
          "sku": "TEST2-RED",
          "sell_price": {
            "with_tax": "11.00",
            "without_tax": "10.00",
            "tax": "1.00",
            "currency": "AUD"
          },
          "quantity": 2,
          "options": [
            {
              "name": "Colour",
              "value": "Red"
            }
          ],
          "images": [
            "https://example.com/image21.jpg"
          ]
        },
        {
          "sku": "TEST2-BLUE",
          "sell_price": {
            "with_tax": "11.00",
            "without_tax": "10.00",
            "tax": "1.00",
            "currency": "AUD"
          },
          "quantity": 3,
          "options": [
            {
              "name": "Colour",
              "value": "Blue"
            }
          ],
          "images": [
            "https://example.com/image22.jpg"
          ]
        }
      ]
    }
  ]
}

Example response for the above:


{
  "retailer": {
    "code": "example",
    "name": "Example Store",
    "currency": "AUD"
  },
  "total_count": 2,
  "products_created": 0,
  "products_updated": 2,
  "errors": 0,
  "products": [
    {
      "id": 73259096,
      "sku": "TEST1",
      "name": "Test 1 Example Product",
      "warnings": [
        "No product brand, using retailer name",
        "No product condition, using the default value new",
        "No product categories, using the default category",
        "No variant rrp price, using sell price for sku TEST1"
      ],
      "result": "updated"
    },
    {
      "id": 73259097,
      "sku": "TEST2",
      "name": "Test 2 Example Product",
      "warnings": [
        "No product brand, using retailer name",
        "No product condition, using the default value new",
        "No product categories, using the default category",
        "No variant rrp price, using sell price for sku TEST2-RED",
        "No variant rrp price, using sell price for sku TEST2-BLUE"
      ],
      "result": "updated"
    }
  ]
}