Don't have account? Sign up here.

Products & inventory

Sample PHP code to call Products & stock methods

You have to create an XML to call a proper method. After creating the request XML you can use such kind of code.

$opts = array(
    'http' => array(
        'method'  => 'POST',
        'header'  => array(
            'Connection: close',
            'Content-Type: text/xml; charset=utf-8',
            'Content-Length: '.strlen($xml)
        'content' => $xml
$context = stream_context_create($opts);
$response = file_get_contents("", false, $context);
echo $response;

Every method will return with an XML response.

Methods for the Produts & stock plugin


Gives back all products from the account based on the given filter criteria. You have to set a search criteria for the products’ tags, manufacturer and name fields with the filter field. The maximum number of products in the response would be 1000.

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>


Create a new product or modify an existing one. The method will give back the product ID after succesfully created. This can be used for later reference for eg. in a webshop. The product’s photo will be downloaded automatically from the given URL and saved in the account. If the takein_ tags filled in automatic take in will be placed.

Special XML tags’ description:

  • action – 0 or 1. 1 means the product is under sale or any other special action.
  • id – 0 if you like to create a new product. If a valid product ID set the product will be modified
  • discount1, 2, 3 – The number means a percentage.
  • takein_quantity – Number to take in.
  • takein_contact_id – The contact from who the product came.
  • takein_product_type – 1 means normal product, 3 means a voucher.
  • takein_start_serial_number – If the product type is 3 you can define the first voucher number. Other cases it is optional.

Sample request XML:

        <?xml version="1.0" encoding="utf-8"?>
                <manufacturer><![CDATA[Apple Inc.]]></manufacturer>
                <product_name><![CDATA[iPhone 5S]]></product_name>
                <product_group><![CDATA[Mobile phones]]></product_group>
                <description><![CDATA[Put your marketing message and specification here.]]></description>
                <notes><![CDATA[The note should be used for internal use only.]]></notes>
                    <tag><![CDATA[high end]]></tag>
                <size><![CDATA[125 x 65 x 13mm]]></size>
                <takein_fxrate>301.23</takein_fxrate> <!-- If the account's default currency is different -->


Get the current quantity of product from the specified warehouse.

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>


Set quantity for the specified product. If the quantity decreased a wasting receipt will be created. If the quantity increased a take in receipt will be created.

Special XML tags’ description:

  • contact_id – The action has to be contacted to a partner from the partner database. You can read out the contact_id with the help of the CRM API method getContacts.
  • price – This is the purchase price of the product when the action is take in.
  • product_type – 1 means normal product, 3 means a voucher.
  • start_serial_number – If the product type is 3 you can define the first voucher number. Other cases it is optional.

Sample request XML:

        <?xml version="1.0" encoding="utf-8"?>


Get order status by ID. You can get the order ID after sending them through the API. If you build a webshop you should store the orders’ ID after sending them.

Sample request XML:

        <?xml version="1.0" encoding="utf-8"?>


Create a new order in CO3. You have to specify the header of the order first and then you can specify as many item rows as you like.

Value sets in the header:

  • warehouse – “Default” or the unique name of the warehouse. If you specify * the system will select the warehouse automatically
  • shipping_aim – Sale, Allocation or Overstore. If you need more options here please contact us.
  • method – transfer, cash, bankcard, cheque, other, c.o.d., direct debit
  • contact_id – you have to use the CRM API to get the id of the specific contact
  • currency – supported currenices: USD, GBP, EUR, HUF (if you need other please contact us)
  • language – supported locales are hu_HU, en_US, de_DE, pl_PL, es_ES
  • product_id – the ID of the product. This is a mandatory field.
  • custom_price – if specified the product’s price will be overwritten on the order.

You can handle the orders in the CO3 GUI after creating it. The orders will be created as delivery notes in Saved status. You can find them in Products & stock – Delivery notes.

Sample request XML:

        <?xml version="1.0" encoding="utf-8"?>
                <warehouse><![CDATA[Name of your warehouse]]></warehouse>
                <order_description><![CDATA[Order description]]></order_description>
                        <description><![CDATA[Item description]]></description>