Syntax

Syntax: updateProduct( product_id, data )

Modifies a user’s product on Digistore24. To view a sample, take a look at the DigiMember source code: http://www.digimember.de?package=digimember There in the following folder: \application\model\logic\digistore_sync.php (digistore_connector.php in the same folder handle the API key creation and the API calls in general)

Access rights

Full access required.

Parameters

product_id – the Digistore24 product ID

data – array with product properties to change. Accessible properties are (all are optional):

  • name_de/en/es/...: string[63]
  • name_intern: string[63]
  • description_de/en/es/...: text (filtered html)
  • salespage_url: string[255]
  • upsell_salespage_url: string[255] (optional)
  • thankyou_url: string[255]
  • image_url: string[255]
  • product_type_id: int – call up API function getGlobalSettings for valid product type IDs (see array element product_types). If you need a special product type, ask us: we will set it up for your community.
  • currency: List of possible currencies for payments for this product. E.g. USD,EUR. Default value is the currency set in the your Digistore24 account.
  • approval_status: new|pending (applies to all resellers of the vendor) To set the status for a single reseller, use: RESELLER_ID:STATUS E.g.: 1:new oder 2:pending
  • affiliate_commision: float
  • buyer_type: consumer – prices include VAT/ business = prices exclude VAT
  • is_address_input_mandatory: bool
    • Y – the buyer must always enter their address
    • N – the buyer must only then enter their address, if it is required for delivery
  • add_order_data_to_thankyou_page_url: bool
    • Y – order data is added to URL, when directing the buyer to the thankyou page
    • N – no order data is added. You may use placeholders – see tooltip of this setting in the product editor, under the tab “Properties”

Example

https://digitest24.de/api/call/123-aaaaabbbbbcccccdddddeeee/json/updateProduct?product_id=123&data[name]=Some+test+product&data[use_communtiy]=Y

Return data

In case of error

Array
(
[api_version] => 1.010
[current_time] => 2016-04-12 20:51:45
[result] => error
[message] => Permission denied
)

In case of success

Array
(
[api_version] => 1.010
[current_time] => 2016-04-12 20:57:29
[result] => success
[data] => Array
(
[modified] => Y
)
)