Service Provider API GetParkingTrackingProviderToken

Synopsis
public array GetParkingTrackingProviderToken( array $entries )
Description

Returns configured parking tracking provider tokens.

XML
This function can be called using GET / POST requests.
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)
string $provider no

Provider to filter tokens for.

Supported providers:

  • facebook
  • tiktok
  • snapchat
string $version no

Provider API version to filter tokens for.

Only relevant for providers:

  • facebook
  • tiktok
string $token no Token to filter for. (max. 500 characters)
int $limit no Maximum amount of records to return.
int $offset no Record offset to start at.
Returns
Type Description
array

The return value contains the following elements:

Type Parameter Description
string provider Provider the token belongs to.
string version Provider API version.
string token Content of the token.
string alias Alias to access the token with.
Version
1.0
<?php
/* URL to Sedo's API */
$baseUrl = 'https://api.sedo.com/api/v1/GetParkingTrackingProviderToken?';

/* API function parameters */
$params = [
    'username'      => 'johndoe',
    'password'      => 'secret',
    'partnerid'     => 'johndoe',
    'signkey'       => 'abcdefghijklmnopqrstuvwxyz0123456789',
    'output_method' => 'xml',
    'provider'      => 'facebook',
    'version'       => 'v11.0',
    'token'         => 'abcdefghijklmnopqrstuvwxyz',
    'limit'         => 1,
    'offset'        => 0,
];

/* build request URL */
$request = $baseUrl . http_build_query($params);

/* fire API request */
$fp = @fopen($url . $request, 'r');

/* read response line by line */
while (!@feof($fp)) {
    echo fread($fp, 4096);
}

/* close the connection */
fclose($fp);

For a successful request, you will receive an XML document as response in this format:

<?xml version="1.0" encoding="UTF-8"?>
<SEDOLIST ver="1.0">
    <item>
        <provider type="xsd:string">facebook</provider>
        <version type="xsd:string">v11.0</version>
        <token type="xsd:string">abcdefghijklmnopqrstuvwxyz</value>
        <alias type="xsd:string">fb3fb1c5b9d93e9a8e</value>
    </item>
    <item>
        <provider type="xsd:string">facebook</provider>
        <version type="xsd:string">v11.0</version>
        <token type="xsd:string">yetanothertrackingprovidertoken</value>
        <alias type="xsd:string">fb7efbe8e3e977c7c0</value>
    </item>
</SEDOLIST>

For an unsuccessful request, you will receive an XML document as response in this format:

<?xml version="1.0" encoding="UTF-8"?>
<SEDOFAULT ver="1.0">
    <faultcode type="xsd:string">Exxx</faultcode>
    <faultstring type="xsd:string">xxxxxx</faultstring>
</SEDOFAULT>