Basic API SetKeywordForTopMarkets

Synopsis
public array SetKeywordForTopMarkets( array $keywordentries )
Description

Sets up to 5 targeted master keywords per domain for the top 3 markets.

SOAP
This function can be called using SOAP.
Parameters
Type Parameter Mandatory Description
integer $partnerid yes Partner ID.
string $signkey yes Sign key.
string $username yes User name. (max. 25 characters)
string $password yes Password. (max. 16 characters)
array[] $keywordentry yes

Array of keyword arrays. (max. 50 per request)

Keyword array elements:

Type Parameter Mandatory Description
string $domain yes Domain name in ACE format.
string $keyword yes Keyword in UTF-8 encoding.
Returns
Type Description
array

The array returned by the function references all keywords used in the request.

The return value contains the following elements:

Type Key Description
string domain Domain name in ACE format.
array marketdata
Type Key Description
string market Top market.
string keyword Keyword in UTF-8 encoding.
string status ok if everything is in order. Otherwise a fault code.
string message Clear if everything is ok. Otherwise a fault string.
string status ok if everything is in order. Otherwise a fault code.
string message Clear if everything is ok. Otherwise a fault string.
Version
1.0
<?php
try {
    // Create a new client by providing the endpoint to the constructor.
    $client = new SoapClient(
        null,
        [
            'location'     => 'https://api.sedo.com/api/v1/',
            'soap_version' => SOAP_1_1,
            'encoding'     => 'UTF-8',
            'uri'          => 'urn:SedoInterface',
            'style'        => SOAP_RPC,
            'use'          => SOAP_ENCODED,
        ]
    );

    // Set the values for the array
    $params = [
        'partnerid'    => 1234,
        'signkey'      => 'abcdefghijklmnopqrstuvwxyz0123456789',
        'username'     => 'johndoe',
        'password'     => 'secret',
        'keywordentry' => [
            [
                'domain'     => 'example.com',
                'keyword'    => 'Example',
            ],
            [
                'domain'     => 'example.com',
                'keyword'    => 'Beispiel',
            ],
            [
                'domain'     => 'example.com',
                'keyword'    => 'Exemple',
            ],
        ],
    ];

    // Call the SOAP method
    $result = $client->SetKeywordForTopMarkets($params);

    // Display the result
    print_r($result);
} catch (SoapFault $e) {
    echo 'Error: '.$e->getMessage();
}