acceptTermsAndConditions

Accept the Terms and Conditions for the Account.

acceptTermsAndConditions

Accept the Terms and Conditions for the Account.

Top ↑

Syntax

bool acceptTermsAndConditions( string api_key, string terms_key );

Parameters

api_key (string)

The key required to access the API. See Getting Started for more information.

terms_key (string)

The Terms and Conditions key returned by the getTermsAndConditions method.

Return Value

Returns true if successful.

Examples

// This key must be retrieved from the getTermsAndConditions method first:
$terms_key = "TC262edd411104c2f41550eacac80289893";

$api = new Api($url, 'YOURAPIKEY');
$terms_accepted = $api->invokeMethod('acceptTermsAndConditions', $terms_key);
{
    "id": 1,
    "method": "acceptTermsAndConditions",
    "params": [
        "YOURAPIKEY",
        "TC262edd411104c2f41550eacac80289893"
    ]
}
{
    "id": 1,
    "result": true,
    "error": null
}

Remarks

The getTermsAndConditions method must be called prior to using the acceptTermsAndConditions method. In order to make sure that the API session is aware of the Terms and Conditions of the product, the Terms Key returned in the first item of the getTermsAndConditions result must be passed as an argument to the acceptTermsAndConditions method.

Error Codes

This method may return the following error code in addition to the standard error codes:

Code Error Description
310 Invalid key getTermsAndConditions method has not been invoked before trying to accept the terms and conditions

See Also