Nincs fiókja? Ingyenes regisztráció

Products & inventory

This API provides comprehensive functionality for managing product catalog, inventory, and related order/warehouse movements. All API calls require an API Key and a Session Key.

Sample PHP code to call Product methods

You must send a request body formatted as XML or JSON, containing a <command> tag or key with the target method.

// Example using cURL (adjust based on your environment)
$api_url = "https://co3app.com/api/product";

// Example command structure for getting all products:
$xml = '<command>
    <getProduct>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
        <filter>example filter string</filter>
    </getProduct>
</command>';

$ch = curl_init($api_url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: text/xml; charset=utf-8',
    'Content-Length: ' . strlen($xml)
]);
$response = curl_exec($ch);
curl_close($ch);

echo $response;

Every method will return with an XML or JSON response depending on the call format.


Methods for the Product plugin

getProduct

Description: Retrieves a list of all products available in the account, supporting filtering in manufacturer, name, product group, tags, SKU, foreign SKU, EAN fields. Returns: An array of product records. The maximum number of products in the response would be 1000. Parameters:

  • api_key (string, required): The API Key.
  • session_key (string, required): The active session key.
  • filter (string, required): The search filter string (can use wildcards like %).

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>
<command>
    <getProduct>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
        <filter>iPhone</filter>
    </getProduct>
</command>

Sample request JSON:

{
    "getProduct": {
        "api_key": "put-your-api-key-here",
        "session_key": "put-your-session-key-here",
        "filter": "iPhone"
    }
}

setProduct

Description: Creates or updates a product record. 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. Returns: Success confirmation with the ID of the product or error details. ID can be used for later reference for eg. in a webshop. Parameters:

  • api_key (string, required): The API Key.
  • session_key (string, required): The active session key.
  • product_name (string, required): Name of the product.
  • action (integer, optional): Product status (0 = default, 1 = the product is under sale or any other special action).
  • list_price (number, optional): Standard list price.
  • wholesale_price (number, optional): Wholesale cost price.
  • purchase_price (number, optional): Purchase/acquisition cost.
  • currency (string, required): Currency code in ISO 4217 format.
  • vat (number, required): VAT rate.
  • unit (string, required): Unit of measurement (e.g., pcs).
  • discount1 (number, optional): First discount percentage/value.
  • discount2 (number, optional): Second discount percentage/value.
  • discount3 (number, optional): Third discount percentage/value.
  • id (integer, optional): 0 when creating new product or the internal product ID (if updating).
  • manufacturer (string, optional): Manufacturer name.
  • item_number (string, optional): Internal item number.
  • ean_number (string, optional): EAN/GTIN barcode number.
  • foreign_item_number (string, optional): Foreign system item number.
  • vtsz_number (string, optional): VTSZ number.
  • product_group (string, optional): Product category.
  • description (string, optional): General description.
  • notes (string, optional): Internal notes.
  • tags (array, optional): Array of product tags.
  • photo (string, optional): URL or path to the main product photo.
  • size (string, optional): Physical size description.
  • color (string, optional): Color description.
  • net_weight (number, optional): Net weight.
  • accounting_number (string, optional): Accounting code.
  • service (integer, optional): If set to 0 it will be a product. If set to 1 it will be a service. Products has stock quantity and value meanwhile services has not.
  • country_code (string, optional): Manufacturing country code for the product. ISO 3166-1 alpha-2 code.
  • envfee_code (integer, optional): Environment fee code. Values can be defined on Products / Settings / Environmental fees page.
  • collective_product (array, optional): Array of IDs for related/part products.
    • Collective product Details (Per Item):
  • id (string, required): Name of the component.
  • qty (number, required): Quantity of the component.
    • Goods received details: Tags needed only if you like to take in some quantity of the product immediatelly. Otherwise do not specify them or leave them blank.
  • takein_quantity (number, optional): Quantity to take in.
  • takein_contact_id (number, optional): Supplier contact ID.
  • takein_product_type (number, optional): 1 means normal product, 3 means a voucher.
  • takein_start_serial_number (number, optional): 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"?>
<command>
    <setProduct>
        <id>0</id>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
        <product_name>New Smartphone Model</product_name>
        <product_name><![CDATA[iPhone 5S]]></product_name>
        <item_number><![CDATA[SKU1284287648]]></item_number>
        <ean_number><![CDATA[700285066104]]></ean_number>
        <foreign_item_number><![CDATA[TTI0003]]></foreign_item_number>
        <vtsz_number><![CDATA[13456789]]></vtsz_number>
        <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>
        <action>1</action>
        <list_price>1000.00</list_price>
        <wholesale_price>800.00</wholesale_price>
        <purchase_price>900.00</purchase_price>
        <currency>EUR</currency>
        <vat>27.00</vat>
        <unit><![CDATA[pcs]]></unit>
        <depreciation>3</depreciation>
        <discount1>10</discount1>
        <discount2>15</discount2>
        <discount3>20</discount3>
        <photo><![CDATA[http://images.apple.com/iphone-5s/specs/images/color_gray.jpg]]></photo>
        <size><![CDATA[125 x 65 x 13mm]]></size>
        <color><![CDATA[Light-blue]]></color>
        <net_weight>10.53</net_weight>
        <accounting_number>452</accounting_number>
        <service>0</service>
        <country_code>DK</country_code>
        <envfee_code>123</envfee_code>
        <collective_product>
            <id>1</id>
            <qty>2</qty>
        </collective_product>       
        <tags>
            <tag><![CDATA[mobile]]></tag>
            <tag><![CDATA[5G]]></tag>
            <tag><![CDATA[high end]]></tag>
        </tags>
        <takein_quantity>1</takein_quantity>
        <takein_price>125.50</takein_price>
        <takein_currency>EUR</takein_currency>
        <takein_fxrate>301.23</takein_fxrate> <!-- If the account's default currency is different -->
        <takein_contact_id>134</takein_contact_id>
        <takein_date>2015-12-01</takein_date>
        <takein_warehouse><![CDATA[Name-of-the-warehouse]]></takein_warehouse>
        <takein_product_type>1</takein_product_type>
        <takein_start_serial_number>2235435</takein_start_serial_number>
        <takein_gross_weight>12.4532</takein_gross_weight>
        <takein_package_type>1</takein_package_type>
        <takein_country_code>HU</takein_country_code> <!-- Origin country in ISO 3166-1 alpha-2 -->
        <takein_batch_no>123AB</takein_batch_no>
        <takein_expire_date>2022-12-12</takein_expire_date> 
     </setProduct>
</command>

Sample request JSON:

{
    "setProduct": {
        "api_key": "put-your-api-key-here",
        "session_key": "put-your-session-key-here",
        "product_name": "New Smartphone Model",
        "action": 1,
        "list_price": 45000.00,
        "wholesale_price": 30000.00,
        "purchase_price": 25000.00,
        "currency": "HUF",
        "vat": 27.00,
        "unit": "pcs",
        "discount1": 0,
        "discount2": 0,
        "discount3": 0,
        "id": 0,
        "manufacturer": "Samsung",
        "item_number": "SAM-100",
        "ean_number": "880123456789",
        "foreign_item_number": "XYZ999",
        "vtsz_number": "HU12345678",
        "product_group": "Electronics",
        "description": "High-end smartphone model.",
        "notes": "Used for promotion.",
        "tags": "Electronics, Phone",
        "photo": "http://example.com/images/phone.jpg",
        "size": "6.5 inches",
        "color": "Black",
        "net_weight": 0.2,
        "accounting_number": "ACC-001",
        "service": 1,
        "country_code": "HU",
        "envfee_code": 5,
        "collective_product": [
            {
                "id": 1,
                "qty": 2
            }
        ]
        "tags" : [
            {
                "tag": "mobile",
                "tag": "5G",
                "tag": "high end",
            }
        ]
    }
}

getQuantity

Description: Retrieves the current stock quantity and associated details for a product from the specified warehouse. Asterisk (*) can be used as warehouse name. Returns: An array containing current deliverable, pending and available quantities. Parameters:

  • api_key (string, required): The API Key.
  • session_key (string, required): The active session key.
  • product_id (numeric, required): Product internal ID.
  • warehouse (numeric, required): Warehouse name
  • stock_label (string, optional): Optional filter string for the stock label.

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>
<command>
    <getQuantity>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
        <product_id>1</product_id>
        <warehouse>WH001</warehouse>
        <stock_label></stock_label>
    </getQuantity>
</command>

Sample request JSON:

{
    "getQuantity": {
        "api_key": "put-your-api-key-here",
        "session_key": "put-your-session-key-here",
        "product_id": 1,
        "warehouse": "WH001",
        "stock_label": ""
    }
}

setQuantity

Description: Set quantity for the specified product. If the quantity less then zero (negative) a wasting receipt will be created. If the quantity more than zero (positive) a take in receipt will be created. Returns: An array containing current deliverable, pending and available quantities. Parameters:

  • api_key (string, required): The API Key.
  • session_key (string, required): The active session key.
  • product_id (numeric, required): Product internal ID.
  • quantity (numeric, required): Quantity to change the current stock volume
  • contact_id (numeric, required): 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.
  • warehouse (string, required): Warehouse name
  • price (numeric, optional): This is the purchase price of the product when the action is take in.
  • product_type (numeric, optional): 1 means normal product, 3 means a voucher.
  • start_serial_number (numeric, optional): If the product type is 3 you can define the first voucher number. Other cases it is optional.
  • currency (string, optional): The currency of the operation. Currency code in ISO 4217 format.
  • fxrate (numeric, optional): Foreign exchange rate if the currency is different than the product's default currency.
  • date (string, optional): Date of the operation.
  • gross_weight (numeric, optional): The gross weight of the package
  • package_type (string, optional): Type code of the package. This can be different account by account.
  • country_code (string, optional): Country of origin in ISO 3166-1 alpha-2 format.
  • batch_no (string, optional): Batch number if needed.
  • expire_date (string, optional): Expiry date if needed.
  • stock_label (string, optional): Optional filter string for the stock label.

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>
<command>
    <setQuantity>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
        <product_id>6</product_id>
        <quantity>5</quantity>
        <contact_id>1</contact_id>
        <warehouse><![CDATA[first]]></warehouse>
        <price>800.00</price>
        <product_type>1</product_type>
        <start_serial_number><![CDATA[]]></start_serial_number>
        <currency><![CDATA[EUR]]></currency>
        <fxrate>301.23</fxrate> <!-- if the currency is different from the currency of the product -->
        <date>2015-12-01</date>
        <gross_weight>12.4532</gross_weight>
        <package_type>1</package_type>
        <country_code>HU</country_code> <!-- Origin country in ISO 3166-1 alpha-2 -->
        <batch_no>123AB</batch_no>
        <expire_date>2022-12-12</expire_date>       
        <stock_label><![CDATA[any label]]></stock_label>       
    </setQuantity>
</command>

Sample request JSON:

{
    "setQuantity": {
        "api_key": "put-your-api-key-here",
        "session_key": "put-your-session-key-here",
        "product_id": 1,
        "quantity": 5,
        "contact_id": 123,
        "warehouse": "WH001",
        "price": 800.00,
        "product_type": 1,
        "start_serial_number": 34234,
        "currency": "EUR",
        "fxrate": 301.23,
        "date": "2015-12-01",
        "gross_weight": 12.4532,
        "package_type": 1,
        "country_code": "HU",
        "batch_no": "123AB",
        "expire_date": "2022-12-12",
        "stock_label": "any label
    }
}

setOrder

Description: Create a new order. You have to specify the header of the order first and then you can specify as many item rows as you like. Returns: If the sending was successful the response will include the order ID or error details. You can refer the order ID in other API methods if you like to follow up the status of the order. Parameters:

  • Header Data (Required):
    • api_key (string, required): The API Key.
    • session_key (string, required): The active session key.
    • warehouse (string, required): The warehouse location where the order originates. "Default" or the unique name of the warehouse. If you specify * the system will select the warehouse automatically
    • shipping_aim (string, required): Sale, Allocation or Overstore.
    • method (string, required): Payment method. Transfer, cash, bankcard, cheque, other, c.o.d. or direct debit.
    • issued_date (string, required, date): Order issuance date (YYYY-MM-DD).
    • selected_account (string, required): One of the account number which is defined in the system. Excat match needed.
    • contact_id (integer, required): The ID of the contact. You have to use the CRM API to get the id of the specific contact
    • currency (string, required): Currency code in ISO 4217 format.
    • language (string, optional): Supported locales are hu_HU, en_US, de_DE, pl_PL, es_ES
    • id (numeric, optional): If set and possible, the order can be modified. Only open order can be modified.
    • order_description (string, optional): Description of the order.
    • issuer_swift (string, optional): SWIFT code of the issuer.
    • issuer_email (string, optional): Email of the issuer.
    • issuer_phone (string, optional): Phone number of the issuer.
    • finalize_order (numeric, optional): 0 - Order just saved (default). 1 - Order will be finalized immediatelly. 2 - Proposal will be created.
    • order_all (numeric, optional): 0 - Order saved (default). 1 - Automatic back order creation. A PO will be created based on the items on the order.
    • task_id (numeric, optional): Related project ID of the order.
    • fx_rate (numeric, optional): Foreign exchange rate if the order's currency is different than the account's default currency.
    • `custom_fields - Can be used if any custom field was specified on the Products & stock / Settings / Custom fields page. The name of the tags have to be matched with the name of the specified custom fields.
  • Items (Array, Required):
    • product_id (integer, required): ID of the product ordered.
    • quantity (number, required): Quantity of the product.
    • unit (string, optional): Unit of measure.
    • custom_price (number, required): Price charged for this line item. If specified the product’s list price will be overwritten on the order. If empty the product's list price will be used.
    • discount (number, required): Discount applied to the line item.
    • description (string, optional): Description of the line item.

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>
<command>
    <setOrder>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
        <warehouse><![CDATA[Name of your warehouse]]></warehouse>
        <shipping_aim><![CDATA[sale]]></shipping_aim>
        <method><![CDATA[cash]]></method>
        <issued_date>2013-07-02</issued_date>
        <selected_account>12345678-12345678-12345678</selected_account>
        <contact_id>1</contact_id>
        <order_description><![CDATA[Order description]]></order_description>
        <currency>EUR</currency>
        <language>de_DE</language>
        <issuer_swift>COBADEFF</issuer_swift>
        <issuer_email>accounting@acme.com</issuer_email>
        <issuer_phone>123456789</issuer_phone>
        <items>
            <item>
                <product_id>1234</product_id>
                <quantity>1.00</quantity>
                <unit>pcs</unit>
                <custom_price>200.00</custom_price>
                <discount>0</discount>
                <description><![CDATA[Item description]]></description>
            </item>
        </items>
        <custom_fields>
            <example_checkbox>
                <node>yes</node>
            </example_checkbox>
            <example_text><![CDATA[Some text]]></example_text>
        </custom_fields>                
    </setOrder>
</command>

Sample request JSON:

{
    "setOrder": {
        "api_key": "put-your-api-key-here",
        "session_key": "put-your-session-key-here",
        "warehouse": "WH001",       
        "shipping_aim": "Sale",
        "method": "cash",
        "issued_date": "2023-10-20",
        "selected_account": "12345678-12345678-12345678",
        "contact_id": 1,
        "currency": "EUR",        
        "order_description": "Some general message",
        "language": "de_DE",
        "issuer_swift": "COBADEFF",
        "issuer_email": "accounting@acme.com",
        "issuer_phone": "123456789",
        "items": [
            {
                "product_id": 1,
                "quantity": 1,
                "unit": "pcs",
                "custom_price": 20000.00,
                "discount": 0.10,
                "description": "Item description"
            }
        ],
        "custom_fields": [
            {
                "example_text": "Some text"
            }
        ]
    }
}

setOrderItem

Description: Modifies the quantity of a specific product within an existing order. Returns: Success confirmation or error details. Parameters:

  • api_key (string, required): The API Key.
  • session_key (string, required): The active session key.
  • order_id (integer, required): The ID of the order to modify.
  • Product Items (Array, Required):
    • product_id (integer, required): The ID of the product to modify.
    • new_quantity (numeric, required): The updated quantity for the product.

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>
<command>
    <setOrderItem>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
        <order_id>123</order_id>
        <products>
            <product>
                <product_id>1</product_id>
                <new_quantity>2</new_quantity>
            </product>
        </products>
    </setOrderItem>
</command>

Sample request JSON:

{
    "setOrderItem": {
        "api_key": "put-your-api-key-here",
        "session_key": "put-your-session-key-here",
        "order_id": 123,
        "products": [
            {
                "product_id": 1,
                "new_quantity": 2
            }
        ]
    }
}

getOrderStatus

Description: 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 getting them. Returns: An object detailing the order id, status, payment status, and shipment details. Parameters:

  • api_key (string, required): The API Key.
  • session_key (string, required): The active session key.
  • order_id (integer, required): The ID of the sales order to check.

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>
<command>
    <getOrderStatus>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
        <order_id>123</order_id>
    </getOrderStatus>
</command>

Sample request JSON:

{
    "getOrderStatus": {
        "api_key": "put-your-api-key-here",
        "session_key": "put-your-session-key-here",
        "order_id": 123
    }
}

getPO

Description: Retrieves details and status information for a Purchase Order (PO). Returns: Details of the Purchase Order, including supplier and goods received. Parameters:

  • api_key (string, required): The API Key.
  • session_key (string, required): The active session key.
  • project_code (string, required): The project code associated with the PO.

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>
<command>
    <getPO>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
        <project_code>PROJECT-2023-ALPHA</project_code>
    </getPO>
</command>

Sample request JSON:

{
    "getPO": {
        "api_key": "put-your-api-key-here",
        "session_key": "put-your-session-key-here",
        "project_code": "PROJECT-2023-ALPHA"
    }
}

setPOTakeIn

Description: Goods receipt against a Purchase Order (PO). Returns: Success confirmation or details of the received goods. Parameters:

  • api_key (string, required): The API Key.
  • session_key (string, required): The active session key.
  • PO (integer, required): The Purchase Order ID.
  • gross_weight (number, optional): Total received weight.
  • package_type (integer, optional): Packaging type code.
  • country_code (string, optional): Country code of origin. ISO 3166-1 alpha-2 code.

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>
<command>
    <setPOTakeIn>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
        <PO>100</PO>
        <gross_weight>50.5</gross_weight>
        <package_type>1</package_type>
        <country_code>DE</country_code>
    </setPOTakeIn>
</command>

Sample request JSON:

{
    "setPOTakeIn": {
        "api_key": "put-your-api-key-here",
        "session_key": "put-your-session-key-here",
        "PO": 100,
        "gross_weight": 50.5,
        "package_type": 1,
        "country_code": "DE"
    }
}

getWarehouses

Description: Retrieves a list of configured warehouses. Returns: An array of warehouse records. Parameters:

  • api_key (string, required): The API Key.
  • session_key (string, required): The active session key.

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>
<command>
    <getWarehouses>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
    </getWarehouses>
</command>

Sample request JSON:

{
    "getWarehouses": {
        "api_key": "put-your-api-key-here",
        "session_key": "put-your-session-key-here"
    }
}

setWarehouse

Description: Creates a new warehouse record. Returns: Success confirmation or error details. Parameters:

  • api_key (string, required): The API Key.
  • session_key (string, required): The active session key.
  • name (string, required): The name of the warehouse.
  • postal_code (string, optional): Postal code.
  • city (string, optional): City name.
  • street (string, optional): Street address.

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>
<command>
    <setWarehouse>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
        <name>New Storage Facility</name>
        <postal_code>12345</postal_code>
        <city>Berlin</city>
        <street>Main Strasse</street>
    </setWarehouse>
</command>

Sample request JSON:

{
    "setWarehouse": {
        "api_key": "put-your-api-key-here",
        "session_key": "put-your-session-key-here",
        "name": "New Storage Facility",
        "postal_code": "12345",
        "city": "Berlin",
        "street": "Main Strasse"
    }
}

setWarehouseItem

Description: Links a specific product product ID to a warehouse location. Returns: Success confirmation or error details. Parameters:

  • api_key (string, required): The API Key.
  • session_key (string, required): The active session key.
  • order_id (integer, required): The related order ID (if linking an order).
  • product_id (integer, required): ID of the product.
  • quantity (number, required): Initial stock quantity.

Sample request XML:

<?xml version="1.0" encoding="utf-8"?>
<command>
    <setWarehouseItem>
        <api_key><![CDATA[put-your-api-key-here]]></api_key>
        <session_key><![CDATA[put-your-session-key-here]]></session_key>
        <order_id>123</order_id>
        <product_id>1</product_id>
        <quantity>100</quantity>
    </setWarehouseItem>
</command>

Sample request JSON:

{
    "setWarehouseItem": {
        "api_key": "put-your-api-key-here",
        "session_key": "put-your-session-key-here",
        "order_id": 123,
        "product_id": 1,
        "quantity": 100
    }
}