Basic API GetParkingTemplateList

Synopsis
public array GetParkingTemplateList()
Description

Returns a list of available templates and their IDs.

XML
This function can be called using GET / POST requests.
Returns
Type Description
array

Array of template data arrays.

The template data array contains the following elements:

Type Key Description
integer id Template ID.
string name Template name.
Version
1.0
<?php
/* URL to Sedo's API */
$baseUrl = 'https://api.sedo.com/api/v1/GetParkingTemplateList?';

/* API function parameters */
$params = [
    'output_method' => 'xml',
];

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

/* fire API request */
$fp = @fopen($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 the following format:

<?xml version="1.0" encoding="UTF-8"?>
<SEDOLIST xmlns="https://api-integration.i.sedorz.net/api/v1/?wsdl">
    <item type="tns:GetParkingTemplateList[]">
        <id type="xsd:int">-1</id>
        <name type="xsd:string">disable template auto selection</name>
    </item>
    <item type="tns:GetParkingTemplateList[]">
        <id type="xsd:int">-2</id>
        <name type="xsd:string">enable template auto selection</name>
    </item>
    <item type="tns:GetParkingTemplateList[]">
        <id type="xsd:int">3013</id>
        <name type="xsd:string">Crushed Boxes</name>
    </item>
    <item type="tns:GetParkingTemplateList[]">
        <id type="xsd:int">3000</id>
        <name type="xsd:string">Just Ads</name>
    </item>
    <item type="tns:GetParkingTemplateList[]">
        <id type="xsd:int">3004</id>
        <name type="xsd:string">Sales Crush</name>
    </item>
</SEDOLIST>