Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function lists the available cPanel Market providers.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_market_providers_list?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_market_providers_list?api.version=1
 Command Line
whmapi1 get_market_providers_list

Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{  
   "data":{  
      "payload":[  
         {  
            "enabled":1,
            "name":"cPStore",
            "display_name":"cPanel Store",
            "supports_commission":1,
            "even_commission_divisor":6
         },
         {  
            "enabled":0,
            "name":"Farnsworth",
            "display_name":"Farnsworth Industries",
            "supports_commission":1,
            "even_commission_divisor":6
         }
      ]
   },
   "metadata":{  
      "version":1,
      "result":1,
      "reason":"OK",
      "command":"get_market_providers_list"
   }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <command>get_market_providers_list</command>
        <result>1</result>
    </metadata>
    <data>
        <payload>
            <display_name>cPanel Store</display_name>
            <enabled>0</enabled>
            <name>cPStore</name>
            <supports_commission>1</supports_commission>
            <even_commission_divisor>6</even_commission_divisor>
        </payload>
        <payload>
            <supports_commission>0</supports_commission>
            <name>farnsworth</name>
            <enabled>1</enabled>
            <display_name>Farnsworth Industries/display_name>
        </payload>
    </data>
</result>

Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
payloadarray of hashes

An array of hashes of the variable's information.

Each hash includes the enabled, display_name, supports_commission, even_commission_divisor, and name returns. 

enabled

Boolean

Whether the cPanel Market provider is enabled.

The function returns this value in the payload array.

  • 1 — Enabled.
  • 0 — Disabled.
1

name

string

The cPanel Market provider's name.

The function returns this value in the payload array.

A valid string.cPStore

display_name

string

The cPanel Market provider's display name.

The function returns this value in the payload array.

A valid string.cPanel Store

supports_commission

Boolean

Whether the cPanel Market provider supports sales commissions.

The function returns this value in the payload array.

  • 1 — The provider supports commissions.
  • 0 — The provider does not support commissions.
1

even_commission_divisor

integer

The price of the Market provider's products must be a multiple of this value.

Note:

This function returns the even_commission_divisor value only if the supports_commission value is 1.

The function returns this value in the payload array.

A valid integer.6