Skip to content

Tampere/ptv-php-client-v11

Repository files navigation

OpenAPIClient-php

Here you can see listed all the PTV Open Api methods.

For more information, please visit https://palveluhallinta.suomi.fi/fi/sivut/palvelutietovaranto/kayttoohjeet.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/Tampere/ptv-php-client-v11.git"
    }
  ],
  "require": {
    "Tampere/ptv-php-client-v11": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');




$apiInstance = new Tampere\PtvV11\Api\CodeListApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$type = 'type_example'; // string | Area type

try {
    $result = $apiInstance->apiV11CodeListGetAreaCodesTypeTypeGet($type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CodeListApi->apiV11CodeListGetAreaCodesTypeTypeGet: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
CodeListApi apiV11CodeListGetAreaCodesTypeTypeGet GET /api/v11/CodeList/GetAreaCodes/type/{type} Gets a list of area codes filtered by area type.
CodeListApi apiV11CodeListGetCountryCodesGet GET /api/v11/CodeList/GetCountryCodes Gets a list of country codes.
CodeListApi apiV11CodeListGetLanguageCodesGet GET /api/v11/CodeList/GetLanguageCodes Gets a list of language codes.
CodeListApi apiV11CodeListGetMunicipalityCodesGet GET /api/v11/CodeList/GetMunicipalityCodes Gets a list of municipality codes.
CodeListApi apiV11CodeListGetPostalCodesGet GET /api/v11/CodeList/GetPostalCodes Gets a list of postal codes.
CommonApi apiV11CommonChannelsWithoutServicesGet GET /api/v11/Common/ChannelsWithoutServices Gets information of user's organization's channels that have no connections to services.
CommonApi apiV11CommonEntitiesByOrganizationOrganizationIdGet GET /api/v11/Common/EntitiesByOrganization/{organizationId} Gets a list of published services and service channels by organization. Services/channels created/modified after certain date can be fetched by adding date as query string parameter. Services/channels created/modified before certain date can be fetched by adding dateBefore as query string parameter.
CommonApi apiV11CommonExpiringServiceChannelsGet GET /api/v11/Common/ExpiringServiceChannels Gets information of user's organization's expiring service channels.
CommonApi apiV11CommonNotMaintainedServiceChannelsGet GET /api/v11/Common/NotMaintainedServiceChannels Gets information of user's organization's not updated channels.
CommonApi apiV11CommonNotMaintainedServicesGet GET /api/v11/Common/NotMaintainedServices Gets information of user's organization's not updated services.
CommonApi apiV11CommonServicesWithoutChannelsGet GET /api/v11/Common/ServicesWithoutChannels Gets information of user's organization's services that have no connections to channels.
CommonApi apiV11CommonTranslationGet GET /api/v11/Common/Translation Gets information of translation processes within PTV. Translation items created/modified after certain date can be fetched by adding date as query string parameter. Translation items created/modified before certain date can be fetched by adding dateBefore as query string parameter.
ConnectionApi apiV11ConnectionASTIServiceChannelIdServiceChannelIdPut PUT /api/v11/Connection/ASTI/serviceChannelId/{serviceChannelId} Updates connections between a service channel and services with extra data. Request includes services for one certain service channel and missing ASTI connections are removed. Regular connections are left as they are. To delete all ASTI connections for a service channel set 'deleteAllServiceRelations' property to true. This is special endpoint for ASTI and users need to have special access right to be able use it.
ConnectionApi apiV11ConnectionASTIServiceIdServiceIdPut PUT /api/v11/Connection/ASTI/serviceId/{serviceId} Updates connections between a service and service channels with extra data. Request includes service channels for one certain service and missing ASTI connections are removed. Regular connections are left as they are. To delete all ASTI service channel connections for a service, set 'deleteAllChannelRelations' property to true. This is special endpoint for ASTI and users need to have special access right to be able use it.
ConnectionApi apiV11ConnectionASTIServiceSourceIdServiceSourceIdPut PUT /api/v11/Connection/ASTI/serviceSourceId/{serviceSourceId} Updates connections between a service and service channels with extra data. External source ids are used. Request includes service channels for one certain service and missing ASTI connections are removed. Regular connections are left as they are. To delete all ASTI service channel connections for a service set 'deleteAllChannelRelations' property to true. This is special endpoint for ASTI and users need to have special access right to be able use it.
ConnectionApi apiV11ConnectionPost POST /api/v11/Connection Creates a connections between services and service channels with extra data.
ConnectionApi apiV11ConnectionServiceIdServiceIdPut PUT /api/v11/Connection/serviceId/{serviceId} Updates connections between a service and service channels with extra data. Request includes service channels for one certain service so regular connections missing from request are removed. ASTI connections are left as they are. To delete all regular service channel connections for a service, set 'deleteAllChannelRelations' property to true.
ConnectionApi apiV11ConnectionServiceSourceIdServiceSourceIdPut PUT /api/v11/Connection/serviceSourceId/{serviceSourceId} Updates connections between a service and service channels with extra data. External source ids are used. Request includes service channels for one certain service so service channels missing from request are removed. To delete all service channel connections for a service set 'deleteAllChannelRelations' property to true. ASTI connections are not removed - data for those connections can be updated though.
ConnectionApi apiV11ConnectionSourcePost POST /api/v11/Connection/Source Creates a connections between services and service channels with extra data. External source ids are used.
GeneralDescriptionApi apiV11GeneralDescriptionGet GET /api/v11/GeneralDescription Gets all the statutory service general descriptions within PTV as a list of ids and names. General descriptions created/modified after certain date can be fetched by adding date as query string parameter. General descriptions created/modified before certain date can be fetched by adding dateBefore as query string parameter.
GeneralDescriptionApi apiV11GeneralDescriptionIdGet GET /api/v11/GeneralDescription/{id} Fetches all the information related to a single statutory service general description.
GeneralDescriptionApi apiV11GeneralDescriptionIdPut PUT /api/v11/GeneralDescription/{id} Updates the defined general description with the data provided as input.
GeneralDescriptionApi apiV11GeneralDescriptionListGet GET /api/v11/GeneralDescription/list Fetches all the information related to requested statutory service general descriptions.
GeneralDescriptionApi apiV11GeneralDescriptionNewGdListGet GET /api/v11/GeneralDescription/newGdList Gets the new statutory service general descriptions within PTV as a list of ids and names.
GeneralDescriptionApi apiV11GeneralDescriptionPost POST /api/v11/GeneralDescription Creates a new general description with the data provided as input.
OrganizationApi apiV11OrganizationAreaAreaCodeCodeGet GET /api/v11/Organization/area/{area}/code/{code} Gets a list of published organizations related to defined area and code. Organizations created/modified after certain date can be fetched by adding date as query string parameter. Organizations created/modified before certain date can be fetched by adding dateBefore as query string parameter.
OrganizationApi apiV11OrganizationBusinesscodeCodeGet GET /api/v11/Organization/businesscode/{code} Fetches all the information related to organizations with defined business identity code.
OrganizationApi apiV11OrganizationGet GET /api/v11/Organization Gets all the published organizations within PTV as a list of organization ids and names. Organizations created/modified after certain date can be fetched by adding date as query string parameter. Organizations created/modified before certain date can be fetched by adding dateBefore as query string parameter. Archived items can be fetched by setting status parameter as 'Archived' and withdrawn items can be fetched by setting status parameter as 'Withdrawn'.
OrganizationApi apiV11OrganizationHierarchyGet GET /api/v11/Organization/Hierarchy Gets a list of published organizations that do not have a parent organization. Organizations created/modified after certain date can be fetched by adding date as query string parameter. Organizations created/modified before certain date can be fetched by adding dateBefore as query string parameter.
OrganizationApi apiV11OrganizationHierarchyIdGet GET /api/v11/Organization/Hierarchy/{id} Get a single organization hierarchy. Returns the complete hierarchy starting from the root organization and including all the child and grandchild organizations.
OrganizationApi apiV11OrganizationIdGet GET /api/v11/Organization/{id} Fetches all the information related to a single organization.
OrganizationApi apiV11OrganizationIdPut PUT /api/v11/Organization/{id} Updates organization.
OrganizationApi apiV11OrganizationListAreaAreaCodeCodeGet GET /api/v11/Organization/list/area/{area}/code/{code} Fetches all the information of the organizations related to certain area.
OrganizationApi apiV11OrganizationListGet GET /api/v11/Organization/list Fetches all the information related to requested organizations.
OrganizationApi apiV11OrganizationOidOidGet GET /api/v11/Organization/oid/{oid} Fetches all the information related to a single organization with defined Oid.
OrganizationApi apiV11OrganizationPost POST /api/v11/Organization Creates a new organization with the data provided as input.
OrganizationApi apiV11OrganizationSahaGet GET /api/v11/Organization/saha Gets main organizations and two sub levels of organizations. Returns both published and archived organizations. NOTE! This is a restricted endpoint.
OrganizationApi apiV11OrganizationSahaIdGet GET /api/v11/Organization/saha/{id} Fetches Saha related information of a single organization. NOTE! This is a restricted endpoint.
OrganizationApi apiV11OrganizationSourceIdSourceIdPut PUT /api/v11/Organization/sourceId/{sourceId} Updates organization.
ServiceApi apiV11ServiceActiveGet GET /api/v11/Service/active Gets all services within PTV as a list of service ids and names. Also services with draft and modified versions are included. Services created/modified after certain date can be fetched by adding date as query string parameter. Services created/modified before certain date can be fetched by adding dateBefore as query string parameter. NOTE! This is a restricted endpoint.
ServiceApi apiV11ServiceActiveIdGet GET /api/v11/Service/active/{id} Fetches all the information related to a single service. Also services with only draft or modified versions are returned. NOTE! This is a restricted endpoint.
ServiceApi apiV11ServiceArchivedListGet GET /api/v11/Service/archived/list Fetches automatically/manually archived services
ServiceApi apiV11ServiceAreaAreaCodeCodeGet GET /api/v11/Service/area/{area}/code/{code} Gets a list of published services related to defined area and code. Services created/modified after certain date can be fetched by adding date as query string parameter. Services created/modified before certain date can be fetched by adding dateBefore as query string parameter.
ServiceApi apiV11ServiceGet GET /api/v11/Service Gets all the published services within PTV as a list of service ids and names. Services created/modified after certain date can be fetched by adding date as query string parameter. Services created/modified before certain date can be fetched by adding dateBefore as query string parameter. Archived items can be fetched by setting status parameter as 'Archived' and withdrawn items can be fetched by setting status parameter as 'Withdrawn'.
ServiceApi apiV11ServiceIdGet GET /api/v11/Service/{id} Fetches all the information related to a single service.
ServiceApi apiV11ServiceIdPut PUT /api/v11/Service/{id} Updates the defined service with the data provided as input.
ServiceApi apiV11ServiceIndustrialClassGet GET /api/v11/Service/industrialClass Gets a list of published services for defined industrial class. Services created/modified after certain date can be fetched by adding date as query string parameter. Services created/modified before certain date can be fetched by adding dateBefore as query string parameter.
ServiceApi apiV11ServiceListAreaAreaCodeCodeGet GET /api/v11/Service/list/area/{area}/code/{code} Fetches all the information of published services related to certain area and code. User can set serviceWithGD parameter to true to include possible attached general description data into the service data. In this case general description related descriptions are marked with prefix 'GD_' to separate them from service related descriptions.
ServiceApi apiV11ServiceListGet GET /api/v11/Service/list Fetches all the information related to requested services.
ServiceApi apiV11ServiceListOrganizationGet GET /api/v11/Service/list/organization Fetches all the information of the services related to certain organization. Either organizationId, code or oid needs to be added as a parameter. User can also set serviceWithGD parameter to true to include possible attached general description data into the service data. In this case general description related descriptions are marked with prefix 'GD_' to separate them from service related descriptions.
ServiceApi apiV11ServicePost POST /api/v11/Service Creates a new service with the data provided as input.
ServiceApi apiV11ServiceServiceChannelServiceChannelIdGet GET /api/v11/Service/serviceChannel/{serviceChannelId} Gets a list of published services for defined service channel. Services joined to service channel after certain date can be fetched by adding date as query string parameter. Services joined to service channel before certain date can be fetched by adding dateBefore as query string parameter.
ServiceApi apiV11ServiceServiceClassGet GET /api/v11/Service/serviceClass Gets a list of published services for defined service class. Services created/modified after certain date can be fetched by adding date as query string parameter. Services created/modified before certain date can be fetched by adding dateBefore as query string parameter.
ServiceApi apiV11ServiceServiceWithGDIdGet GET /api/v11/Service/serviceWithGD/{id} Fetches all the information related to a single service. If general description is attached also general description data is returned within the service data. General description related descriptions are marked with prefix 'GD_' to separate them from service related descriptions.
ServiceApi apiV11ServiceServiceWithGDListGet GET /api/v11/Service/serviceWithGD/list Fetches all the information related to requests services. If general description is attached to a service also general description data is returned within the service data. General description related descriptions are marked with prefix 'GD_' to separate them from service related descriptions.
ServiceApi apiV11ServiceSourceIdSourceIdPut PUT /api/v11/Service/sourceId/{sourceId} Updates the defined service with the data provided as input.
ServiceApi apiV11ServiceTargetGroupGet GET /api/v11/Service/targetGroup Gets a list of published services for defined target group. Services created/modified after certain date can be fetched by adding date as query string parameter. Services created/modified before certain date can be fetched by adding dateBefore as query string parameter.
ServiceApi apiV11ServiceTypeTypeGet GET /api/v11/Service/type/{type} Gets a list of published services of defined service type. Services created/modified after certain date can be fetched by adding date as query string parameter. Services created/modified before certain date can be fetched by adding dateBefore as query string parameter.
ServiceChannelApi apiV11ServiceChannelActiveGet GET /api/v11/ServiceChannel/active Gets all service channels within PTV as a list of service channel ids and names. Also service channels with draft and modified versions are included. Service channels created/modified after certain date can be fetched by adding date as query string parameter. Service channels created/modified before certain date can be fetched by adding dateBefore as query string parameter. Certain type of service channels can be fetched by setting query string parameter type. NOTE! This is a restricted endpoint.
ServiceChannelApi apiV11ServiceChannelActiveIdGet GET /api/v11/ServiceChannel/active/{id} Fetches all the information related to a single service channel. Also service channels with only draft or modified versions are returned. NOTE! This is a restricted endpoint.
ServiceChannelApi apiV11ServiceChannelArchivedListGet GET /api/v11/ServiceChannel/archived/list Fetches automatically/manually archived service channels
ServiceChannelApi apiV11ServiceChannelAreaAreaCodeCodeGet GET /api/v11/ServiceChannel/area/{area}/code/{code} Gets a list of service channels related to defined area and code. Service channels created/modified after certain date can be fetched by adding date as query string parameter. Service channels created/modified before certain date can be fetched by adding dateBefore as query string parameter.
ServiceChannelApi apiV11ServiceChannelEChannelIdPut PUT /api/v11/ServiceChannel/EChannel/{id} Updates electronic channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelEChannelPost POST /api/v11/ServiceChannel/EChannel Creates a new electronic channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelEChannelSourceIdSourceIdPut PUT /api/v11/ServiceChannel/EChannel/sourceId/{sourceId} Updates electronic channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelGet GET /api/v11/ServiceChannel Gets all published service channels within PTV as a list of service channel ids and names. Service channels created/modified after certain date can be fetched by adding date as query string parameter Service channels created/modified before certain date can be fetched by adding dateBefore as query string parameter. Archived items can be fetched by setting status parameter as 'Archived' and withdrawn items can be fetched by setting status parameter as 'Withdrawn'.
ServiceChannelApi apiV11ServiceChannelIdGet GET /api/v11/ServiceChannel/{id} Fetches all the information related to a single service channel.
ServiceChannelApi apiV11ServiceChannelListAreaAreaCodeCodeGet GET /api/v11/ServiceChannel/list/area/{area}/code/{code} Gets a list of service channels related to defined area and code. Service channels created/modified after certain date can be fetched by adding date as query string parameter. Service channels created/modified before certain date can be fetched by adding dateBefore as query string parameter.
ServiceChannelApi apiV11ServiceChannelListGet GET /api/v11/ServiceChannel/list Fetches all the information related to requested service channels.
ServiceChannelApi apiV11ServiceChannelListOrganizationGet GET /api/v11/ServiceChannel/list/organization Fetches all the information of service channels related to certain organization. Either organizationId, code or oid needs to be added as a parameter.
ServiceChannelApi apiV11ServiceChannelOrganizationOrganizationIdGet GET /api/v11/ServiceChannel/organization/{organizationId} Gets a list of published service channels for defined organization. Service channels created/modified after certain date can be fetched by adding date as query string parameter. Service channels created/modified before certain date can be fetched by adding dateBefore as query string parameter.
ServiceChannelApi apiV11ServiceChannelOrganizationOrganizationIdTypeTypeGet GET /api/v11/ServiceChannel/organization/{organizationId}/type/{type} Gets a list of certain type of published service channels for defined organization. Service channels created/modified after certain date can be fetched by adding date as query string parameter. Service channels created/modified before certain date can be fetched by adding dateBefore as query string parameter.
ServiceChannelApi apiV11ServiceChannelPhoneIdPut PUT /api/v11/ServiceChannel/Phone/{id} Updates phone channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelPhonePost POST /api/v11/ServiceChannel/Phone Creates a new phone channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelPhoneSourceIdSourceIdPut PUT /api/v11/ServiceChannel/Phone/sourceId/{sourceId} Updates phone channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelPrintableFormIdPut PUT /api/v11/ServiceChannel/PrintableForm/{id} Updates printable form channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelPrintableFormPost POST /api/v11/ServiceChannel/PrintableForm Creates a new printable form channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelPrintableFormSourceIdSourceIdPut PUT /api/v11/ServiceChannel/PrintableForm/sourceId/{sourceId} Updates printable form channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelServiceLocationIdPut PUT /api/v11/ServiceChannel/ServiceLocation/{id} Updates service location channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelServiceLocationPost POST /api/v11/ServiceChannel/ServiceLocation Creates a new service location channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelServiceLocationSourceIdSourceIdPut PUT /api/v11/ServiceChannel/ServiceLocation/sourceId/{sourceId} Updates service location channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelTypeTypeGet GET /api/v11/ServiceChannel/type/{type} Gets a list of certain type of published service channels. Service channels created/modified after certain date can be fetched by adding date as query string parameter. Service channels created/modified before certain date can be fetched by adding dateBefore as query string parameter.
ServiceChannelApi apiV11ServiceChannelWebPageIdPut PUT /api/v11/ServiceChannel/WebPage/{id} Updates webpage channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelWebPagePost POST /api/v11/ServiceChannel/WebPage Creates a new web page channel with the data provided as input.
ServiceChannelApi apiV11ServiceChannelWebPageSourceIdSourceIdPut PUT /api/v11/ServiceChannel/WebPage/sourceId/{sourceId} Updates webpage channel with the data provided as input.
ServiceCollectionApi apiV11ServiceCollectionGet GET /api/v11/ServiceCollection Gets all the published service collections within PTV as a list of service collection ids and names. Service collections created after certain date can be fetched by adding date as query string parameter. Service collections created before certain date can be fetched by adding dateBefore as query string parameter. Archived items can be fetched by setting parameter archived to true.
ServiceCollectionApi apiV11ServiceCollectionIdGet GET /api/v11/ServiceCollection/{id} Fetches all the information related to a single service collection.
ServiceCollectionApi apiV11ServiceCollectionIdPut PUT /api/v11/ServiceCollection/{id} Updates the defined service collection with the data provided as input.
ServiceCollectionApi apiV11ServiceCollectionOrganizationGet GET /api/v11/ServiceCollection/organization Gets the published service collections within PTV related to certain organization. Either organizationId or code needs to be added as a parameter.
ServiceCollectionApi apiV11ServiceCollectionPost POST /api/v11/ServiceCollection Creates a new service collection with the data provided as input.
ServiceCollectionApi apiV11ServiceCollectionSourceIdSourceIdPut PUT /api/v11/ServiceCollection/sourceId/{sourceId} Updates the defined service collection with the data provided as input.

Models

Authorization

Authentication schemes defined for the API:

oauth2

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: https://palveluhallinta.suomi.fi/api/auth/connect/authorize
  • Scopes:
    • dataEventRecords: Access event records

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v11
    • Package version: 2.0.0
    • Build date: 2023-06-30T11:12:38.413080+03:00[Europe/Helsinki]
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen