GET api/Activities/GetActivities?pageIndex={pageIndex}&pageSize={pageSize}

Gets a list of all Activities. Pagination is supported.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
pageIndex

Optional page index (default is 0).

integer

None.

pageSize

Optional page size (default is 200).

integer

None.

Body Parameters

None.

Response Information

Resource Description

GetActivitiesResult
NameDescriptionTypeAdditional information
PagedActivites

A page with Activity rows.

GetActivityResult

None.

Response Formats

application/json, text/json

Sample:
{
  "PagedActivites": {
    "PageIndex": 0,
    "PageSize": 10,
    "TotalItems": 2,
    "TotalPages": 1,
    "Items": [
      {
        "SpecificPrices": null,
        "Currency": 1,
        "DefaultPrice": 0.0,
        "Unit": 3,
        "UnitLabel": null,
        "Id": 1,
        "Name": "Default activity",
        "Type": 1
      },
      {
        "SpecificPrices": [
          {
            "Id": 1,
            "Currency": 2,
            "CustomerGroupId": 1,
            "CustomerId": null,
            "Price": 45.0
          },
          {
            "Id": 1,
            "Currency": 2,
            "CustomerGroupId": null,
            "CustomerId": 1,
            "Price": 40.0
          }
        ],
        "Currency": 1,
        "DefaultPrice": 50.0,
        "Unit": null,
        "UnitLabel": "Km",
        "Id": 1,
        "Name": "Travelling",
        "Type": 2
      }
    ]
  }
}

application/xml, text/xml

Sample:
<GetActivitiesResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Results">
  <PagedActivites>
    <Items>
      <GetActivityResult>
        <Id xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures">1</Id>
        <Name xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures">Default activity</Name>
        <Type xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures">Time</Type>
        <Currency>CZK</Currency>
        <DefaultPrice>0</DefaultPrice>
        <SpecificPrices xmlns:d5p1="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures" i:nil="true" />
        <Unit>Hour</Unit>
        <UnitLabel i:nil="true" />
      </GetActivityResult>
      <GetActivityResult>
        <Id xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures">1</Id>
        <Name xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures">Travelling</Name>
        <Type xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures">General</Type>
        <Currency>CZK</Currency>
        <DefaultPrice>50</DefaultPrice>
        <SpecificPrices xmlns:d5p1="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures">
          <d5p1:SpecificPriceData>
            <d5p1:Currency>EUR</d5p1:Currency>
            <d5p1:CustomerGroupId>1</d5p1:CustomerGroupId>
            <d5p1:CustomerId i:nil="true" />
            <d5p1:Id>1</d5p1:Id>
            <d5p1:Price>45</d5p1:Price>
          </d5p1:SpecificPriceData>
          <d5p1:SpecificPriceData>
            <d5p1:Currency>EUR</d5p1:Currency>
            <d5p1:CustomerGroupId i:nil="true" />
            <d5p1:CustomerId>1</d5p1:CustomerId>
            <d5p1:Id>1</d5p1:Id>
            <d5p1:Price>40</d5p1:Price>
          </d5p1:SpecificPriceData>
        </SpecificPrices>
        <Unit i:nil="true" />
        <UnitLabel>Km</UnitLabel>
      </GetActivityResult>
    </Items>
    <PageIndex>0</PageIndex>
    <PageSize>10</PageSize>
    <TotalItems>2</TotalItems>
    <TotalPages>1</TotalPages>
  </PagedActivites>
</GetActivitiesResult>