| GET | /api/4PSBC/companies |
|---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
/** @description Get companies mapped to 4PS specific result set */
// @Api(Description="Get companies mapped to 4PS specific result set")
// @ApiResponse(Description="Companies are returned in the message body", IsDefaultResponse=true, StatusCode=200)
class Get4PSBCCompanies implements JsonSerializable
{
public function __construct(
/** @description Number of items in the resultset per page. Default = 100 */
// @ApiMember(Description="Number of items in the resultset per page. Default = 100")
/** @var int */
public int $PageSize=0,
/** @description Page number of paged resultset. Default = 1 */
// @ApiMember(Description="Page number of paged resultset. Default = 1")
/** @var int */
public int $PageNumber=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['PageSize'])) $this->PageSize = $o['PageSize'];
if (isset($o['PageNumber'])) $this->PageNumber = $o['PageNumber'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->PageSize)) $o['PageSize'] = $this->PageSize;
if (isset($this->PageNumber)) $o['PageNumber'] = $this->PageNumber;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/4PSBC/companies HTTP/1.1 Host: test-dogw.klokgroep.nl Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ArrayOfData_Company xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DO.Synchronization.IDB_4PSBC.DTO">
<Data_Company>
<address>String</address>
<blocked>false</blocked>
<city>String</city>
<cocCity>String</cocCity>
<cocLocationNo>String</cocLocationNo>
<cocRegistrationNo>String</cocRegistrationNo>
<companyId>00000000-0000-0000-0000-000000000000</companyId>
<companyName4ps>String</companyName4ps>
<countryRegionCodeId>String</countryRegionCodeId>
<countryRegionId>String</countryRegionId>
<customerNo>String</customerNo>
<digiOfficeId>00000000-0000-0000-0000-000000000000</digiOfficeId>
<eMail>String</eMail>
<homePage>String</homePage>
<mobilePhoneNo>String</mobilePhoneNo>
<name>String</name>
<name2>String</name2>
<nameAbbreviation>String</nameAbbreviation>
<no>String</no>
<phoneNo>String</phoneNo>
<phoneNo2>String</phoneNo2>
<postCode>String</postCode>
<systemId>00000000-0000-0000-0000-000000000000</systemId>
<vatRegistrationNo>String</vatRegistrationNo>
<vendorNo>String</vendorNo>
<visitAddress>String</visitAddress>
<visitAddress2>String</visitAddress2>
<visitAddressCity>String</visitAddressCity>
<visitAddressCountryRegionId>String</visitAddressCountryRegionId>
<visitAddressPostCode>String</visitAddressPostCode>
</Data_Company>
</ArrayOfData_Company>