Product_UpdateInsert

Create a new product or update an existing one

This SOAP API endpoint is used to either create a new product, or if you run it for an existing product update it.

Request

  • Method: SOAP
  • Server: https://[app key here]-[site_ID here]-apps.worldsecuresystems.com. Take a look at the Authorize your API calls document for more info on how this URL is formed.
  • Path: /catalystwebservice/catalystcrmwebservice.asmx
  • The username and password fields:You can make SOAP API calls can be authorized either by using the actual username or password of an Admin username or, if you are making the calls from an app leave the username field empty and use the authorization token as the password.

Parameters

  • siteId - ID of the site (integer)
  • username - email address of user account, leave empty if using site token (string)
  • password - password of user account, or site authentication token for specified site (string) A Product_RetrieveResponse object with the following properties:
  • productId - (integer)
  • productCode - (string)
  • productName - (string)
  • description - (string)
  • smallImage - (string)
  • largeImage - (string)
  • cataloguesArray - (array)
  • pricesSaleArray - (array)
  • pricesRetailArray - (array)
  • pricesWholesaleArray - (array)
  • wholesaleTaxCodeArray - (array)
  • taxCodeArray - (array)
  • groupProducts - (array)
  • groupProductsDescriptions - (array)
  • supplierEntityId - (integer)
  • supplierCommission - (double)
  • weight - (integer)
  • relatedProducts - (array)
  • tags - (string)
  • unitType - (string)
  • minUnits - (integer)
  • maxUnits - (integer)
  • inStock - (integer)
  • onOrder - (integer)
  • reOrder - (integer)
  • inventoryControl - (boolean)
  • canPreOrder - (boolean)
  • custom1 - (string)
  • custom2 - (string)
  • custom3 - (string)
  • custom4 - (string)
  • popletImages - (string)
  • enabled - (boolean)
  • deleted - (boolean)
  • captureDetails - (boolean)
  • downloadLimitCount - (integer)
  • limitDownloadsToIP - (integer)
  • isOnSale - (boolean)
  • hideIfNoStock - (boolean)
  • productAttributes - (string) - if you have product variations enabled and wish to make a call to edit parameters of the variations (stock levels, update or disable them and so on) you will need to remove the productAttributes parameter from the call
  • isGiftVoucher - (boolean)
  • enableDropShipping - (boolean)
  • productWeight - (double)
  • productWidth - (double)
  • productHeight - (double)
  • productDepth - (double)
  • excludeFromSearch - (boolean)
  • productTitle - (string)
  • cycletypeId - (integer)
  • cycletypeCount - (integer)
  • slug - (string)
  • hasVariations - (boolean)
  • variations - (array)

To use a site token instead of username/password, send an empty username field and the site token as the password. See example below.

Response

An empty Product_UpdateInsertResponse object with a header response code.

Examples

Accepts and returns XML as Content-Type.

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values, please note the data in the request and response is only for explanatory purposes.

Request:

POST /catalystwebservice/catalystecommercewebservice.asmx HTTP/1.1
Host: www.businesscatalyst.com.au
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Product_UpdateInsert xmlns="http://tempuri.org/CatalystDeveloperService/CatalystEcommerceWebservice">
      <username>jdoe@yourdomain.com</username>
      <password>Y0urP@ssw0rdH3re</password>
      <siteId>12345</siteId>
      <productList>
        <Products>
          <productId>12345</productId>
          <productCode>ZJAWEN</productCode>
          <productName>My test product</productName>
          <description>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</description>
          <smallImage>/images/product1/small.jpg</smallImage>
          <largeImage>/images/product1/large.jpg</largeImage>
         <cataloguesArray>
             <string>/Books/</string>
             <string>/Books/Computers/</string>
             <string>/Books/Business/</string>
          </cataloguesArray>
          <pricesSaleArray>
            <string>US/19.95,3/17.96,7/16.96</string>
          </pricesSaleArray>
          <pricesRetailArray>
            <string>US/20,5/19,8/20</string>
          </pricesRetailArray>
          <pricesWholesaleArray>
            <string>US/20,5/19,8/20</string>
          </pricesWholesaleArray>
          <wholesaleTaxCodeArray>
            <string>US/0.00</string>
          </wholesaleTaxCodeArray>
          <taxCodeArray>
            <string>GB/VAT</string>
          </taxCodeArray>
          <groupProducts>
            <string>580H0036BL</string>
            <string>ACAI60</string>
            <string>ABC-123</string>
          </groupProducts>
          <groupProductsDescriptions>
            <string>Lorem ipsum dolor sit amet</string>
            <string>consectetur adipisicing elit</string>
          </groupProductsDescriptions>
          <supplierEntityId>1234</supplierEntityId>
          <supplierCommission>0</supplierCommission>
          <weight>30</weight>
          <relatedProducts>
            <string>62NNEC836K</string>
            <string>FSLJQIMW08</string>
            <string>38CK6XO8MH</string>
          </relatedProducts>
          <tags>NEW!</tags>
          <unitType>string</unitType>
          <minUnits>0</minUnits>
          <maxUnits>2</maxUnits>
          <inStock>43</inStock>
          <onOrder>3</onOrder>
          <reOrder>2</reOrder>
          <inventoryControl>true</inventoryControl>
          <canPreOrder>true</canPreOrder>
          <custom1>Text in custom field 1</custom1>
          <custom2>Text in custom field 2</custom2>
          <custom3>Text in custom field 3</custom3>
          <custom4>Text in custom field 4</custom4>
          <popletImages>/images/image1.jpg;/images/image2.jpg;</popletImages>
          <enabled>true</enabled>
          <deleted>false</deleted>
          <captureDetails>true</captureDetails>
          <downloadLimitCount>20</downloadLimitCount>
          <limitDownloadsToIP>0</limitDownloadsToIP>
          <isOnSale>true</isOnSale>
          <hideIfNoStock>true</hideIfNoStock>
          <productAttributes>Size*|5|Y:L||UK/2|US/20,S||UK/1|US/10</productAttributes>
          <isGiftVoucher>false</isGiftVoucher>
          <enableDropShipping>true</enableDropShipping>
          <productWeight>0</productWeight>
          <productWidth>0</productWidth>
          <productHeight>0</productHeight>
          <productDepth>0</productDepth>
          <excludeFromSearch>false</excludeFromSearch>
          <productTitle>My product title</productTitle>
          <cycletypeId>3</cycletypeId>
          <cycletypeCount>-1</cycletypeCount>
          <slug>my-product</slug>
          <hasVariations>true</hasVariations>
          <variations>
            <ProductVariation xsi:nil="true" />
            <ProductVariation xsi:nil="true" />
          </variations>
        </Products>
        <Products>
          <productId>12345</productId>
          <productCode>ZJAWEN</productCode>
          <productName>My test product</productName>
          <description>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</description>
          <smallImage>/images/product1/small.jpg</smallImage>
          <largeImage>/images/product1/large.jpg</largeImage>
         <cataloguesArray>
             <string>/Books/</string>
             <string>/Books/Computers/</string>
             <string>/Books/Business/</string>
          </cataloguesArray>
          <pricesSaleArray>
            <string>US/19.95,3/17.96,7/16.96</string>
          </pricesSaleArray>
          <pricesRetailArray>
            <string>US/20,5/19,8/20</string>
          </pricesRetailArray>
          <pricesWholesaleArray>
            <string>US/20,5/19,8/20</string>
          </pricesWholesaleArray>
          <wholesaleTaxCodeArray>
            <string>US/0.00</string>
          </wholesaleTaxCodeArray>
          <taxCodeArray>
            <string>GB/VAT</string>
          </taxCodeArray>
          <groupProducts>
            <string>580H0036BL</string>
            <string>ACAI60</string>
            <string>ABC-123</string>
          </groupProducts>
          <groupProductsDescriptions>
            <string>Lorem ipsum dolor sit amet</string>
            <string>consectetur adipisicing elit</string>
          </groupProductsDescriptions>
          <supplierEntityId>1234</supplierEntityId>
          <supplierCommission>0</supplierCommission>
          <weight>30</weight>
          <relatedProducts>
            <string>62NNEC836K</string>
            <string>FSLJQIMW08</string>
            <string>38CK6XO8MH</string>
          </relatedProducts>
          <tags>NEW!</tags>
          <unitType>string</unitType>
          <minUnits>0</minUnits>
          <maxUnits>2</maxUnits>
          <inStock>43</inStock>
          <onOrder>3</onOrder>
          <reOrder>2</reOrder>
          <inventoryControl>true</inventoryControl>
          <canPreOrder>true</canPreOrder>
          <custom1>Text in custom field 1</custom1>
          <custom2>Text in custom field 2</custom2>
          <custom3>Text in custom field 3</custom3>
          <custom4>Text in custom field 4</custom4>
          <popletImages>/images/image1.jpg;/images/image2.jpg;</popletImages>
          <enabled>true</enabled>
          <deleted>false</deleted>
          <captureDetails>true</captureDetails>
          <downloadLimitCount>20</downloadLimitCount>
          <limitDownloadsToIP>0</limitDownloadsToIP>
          <isOnSale>true</isOnSale>
          <hideIfNoStock>true</hideIfNoStock>
          <productAttributes>Size*|5|Y:L||UK/2|US/20,S||UK/1|US/10</productAttributes>
          <isGiftVoucher>false</isGiftVoucher>
          <enableDropShipping>true</enableDropShipping>
          <productWeight>0</productWeight>
          <productWidth>0</productWidth>
          <productHeight>0</productHeight>
          <productDepth>0</productDepth>
          <excludeFromSearch>false</excludeFromSearch>
          <productTitle>My product title</productTitle>
          <cycletypeId>3</cycletypeId>
          <cycletypeCount>-1</cycletypeCount>
          <slug>my-product</slug>
          <hasVariations>true</hasVariations>
          <variations>
            <ProductVariation xsi:nil="true" />
            <ProductVariation xsi:nil="true" />
          </variations>
        </Products>
      </productList>
    </Product_UpdateInsert>
  </soap12:Body>
</soap12:Envelope>

Response:

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Product_UpdateInsertResponse xmlns="http://tempuri.org/CatalystDeveloperService/CatalystEcommerceWebservice" />
  </soap12:Body>
</soap12:Envelope>

When creating products that have Variations enabled you will need to include both the productAttributes and the variations tags.

When updating products that use variations you need to remove the productAttributes tag.