This API is to integrate 3rd party applications with the Kanton Aargau SmartServer Portal. The API provides vendors of municipality software the ability to receive tasks of sbmitted forms and update the portal and citizen with the status of the processed tasks
The following processes from the SmartService Portal are currently supported with the API.
A sample process diagram of how the workflow for the 5 supported processes works can be found here: here.
In the process diagram, the arrows going to the blue area are the webhook calls made based on the definition in the webhook api.
The arrows that going up from the blue area to the platform are status updates made Status Update API.
There are two interactions with the process.
All new developers must signup for a developer account to gain access to the subscription key. To get your subscription key, follow the steps below:
The initial step to kick off a process is the citizens (Smart Service Portal user) to submit a form. To simulate this process, we provide a set of similar forms as the citizens sees. Those are not part of the Smart Service Portal and only link to the Development Environment for vendors. The links to the forms can be found below:
After a form has been submitted, the registered webhooks are triggered and subsequently the status can be updated.
The API can be used to register the application for use by the municipality process. However, an administrator of the municipality needs to configure to use a registered application. To request for a test municipality, please email support.
Retrieves the vendor registration details. If no providerId is passed in the parameters, then all the vendor registrations are retrieved.
successfully executed the function and returns the vendor registration details if found.
Bad request
Unauthorized
A server side exception has occured, please contact support
[- {
- "providerId": "string",
- "providerName": "string",
- "plz": "5000",
- "place": "string",
- "address1": "string",
- "address2": "string",
- "address3": "string",
- "phone": "string",
- "email": "string",
- "website": "string"
}
]
Used to create a new vendor registration. Only one vendor needs to be registered per Software vendor. This provides contact details for the application registered for this vendor.
Success - vendor data
invalid input, object invalid
Unauthorized
A server side exception has occured, please contact support
{- "providerName": "string",
- "plz": "5000",
- "place": "string",
- "address1": "string",
- "address2": "string",
- "address3": "string",
- "phone": "string",
- "email": "string",
- "website": "string"
}
{- "providerId": "string",
- "providerName": "string",
- "plz": "5000",
- "place": "string",
- "address1": "string",
- "address2": "string",
- "address3": "string",
- "phone": "string",
- "email": "string",
- "website": "string",
- "apikey": "string"
}
Update the details of an existing vendor registration. All fields need to be updated. Missing fields will be overwritten if an empty value.
app registration created
invalid input, object invalid
Unauthorized
A server side exception has occured, please contact support
{- "providerName": "string",
- "plz": "5000",
- "place": "string",
- "address1": "string",
- "address2": "string",
- "address3": "string",
- "phone": "string",
- "email": "string",
- "website": "string"
}
{- "providerId": "string",
- "providerName": "string",
- "plz": "5000",
- "place": "string",
- "address1": "string",
- "address2": "string",
- "address3": "string",
- "phone": "string",
- "email": "string",
- "website": "string"
}
Regenerates a new API key. Will overwrite the api key generated initially by the POST vendorregistration api call.
successfully found the vendor registration
Bad request
Unauthorized
A server side exception has occured, please contact support
{- "apikey": "string"
}
This action retrieves a list of configured applications for a subscription
successfully found the application configuration
Bad request
Unauthorized
A server side exception has occured, please contact support
[- {
- "appid": "string",
- "appName": "string",
- "appDescription": "string",
- "processes": [
- {
- "processid": "string"
}
]
}
]
Create or update an application configuration. If the parameter is empty, a new application configuration is created. Otherwise an existing application configuration is updated.
app registration created
invalid input, object invalid
Unauthorized
A server side exception has occured, please contact support
{- "appName": "Your ApplicationName",
- "appDescription": "short description of the application",
- "processes": [
- {
- "processId": "string"
}
]
}
{- "appid": "f8bc07f6-3e6c-4d92-97a2-82c9f2ece44b"
}
This action deletes an application
successfully deleted the application configuration
Bad request
Unauthorized
A server side exception has occured, please contact support
Retrieves a list of municipalities with their unique Id.
successfull retrieved a list of municipalities
Bad request
Unauthorized
A server side exception has occured, please contact support
[- {
- "munid": 1,
- "munName": "Aarau"
}
]
Retrieves a list of processes that support third party integrations.
successfull retrieved a list of processes
Bad request
Unauthorized
A server side exception has occured, please contact support
[- {
- "processId": 7310,
- "processName": "Hauptwohnsitzbescheinigung bestellen"
}
]
Defining webhooks for processes and status updates occuring in the portal. Information on the data submitted as part of the webhook call is defined in the POST webhookconfig under 'Callback payload samples'
This action retrieves a list of configured webhooks
successfully found the webhook configuration
Bad request
Unauthorized
A server side exception has occured, please contact support
[- {
- "whid": "A123123",
- "whname": "Your Alert Name",
- "whcomment": "short comment on the alert",
- "applicationId": "d0db4b13-20d4-42c3-8268-37db22b36f98",
- "municipalityid": "d0db4b13-20d4-42c3-8268-37db22b36f98",
- "process": "process",
- "httprequestheaders": [
- {
- "key": "string",
- "value": "string"
}
], - "httprequestparameter": [
- {
- "key": "string",
- "value": "string"
}
], - "httprequestbody": [
- {
- "key": "string",
- "value": "string"
}
]
}
]
This endpoint allows you to create a new webhook. Webhooks allow you to specify a url to receive notifications for event types.
webhook created
invalid input, object invalid
Unauthorized
A server side exception has occured, please contact support
{- "whname": "Your Webhook Name",
- "whcomment": "short comment on the webhook",
- "applicationId": "d0db4b13-20d4-42c3-8268-37db22b36f98",
- "municipalityId": "d0db4b13-20d4-42c3-8268-37db22b36f98",
- "processes": [
- "string"
], - "httprequestheaders": [
- {
- "key": "string",
- "value": "string"
}
], - "httprequestparameter": [
- {
- "key": "string",
- "value": "string"
}
], - "httprequestbody": [
- {
- "key": "string",
- "value": "string"
}
]
}
{- "whid:": 20
}
{- "uniqueId": 123456,
- "datereceived": "2022-12-31 23:59:59",
- "cantonreference": "N123456",
- "status": "new",
- "amount": 20,
- "paymentStatus": "paid",
- "paymentRefId": "1234567",
- "paymentRefundId": 1234456,
- "paymentRefundStatus": "success",
- "municipalityName": "Aarau",
- "municipalityId": 1,
- "processName": "",
- "processId": "",
- "personaldata": {
- "company": "Beispiel AG",
- "ahvNumber": "123",
- "salutation": "Herr",
- "lastname": "Mustermann",
- "firstname": "Max",
- "dob": "2021-12-31",
- "street": "Musterstrasse",
- "streetnumber": "10a",
- "postcode": "5000",
- "place": "Aarau",
- "country": "Schweiz",
- "phone": "+41 799 999 999",
- "email": "thomas.mustermann@gmail.com"
}, - "deliveryaddress": {
- "differentDeliveryaddress": true,
- "company": "string",
- "lastname": "string",
- "firstname": "string",
- "street": "string",
- "streetnumber": "string",
- "postcode": "string",
- "place": "string",
- "country": "string"
}, - "deliveryandpayment": {
- "deliverymethod": "post",
- "payment": "paymentprovider"
}, - "comments": "string",
- "documentLanguage": "de",
- "residencesince": "string",
- "residenceto": "string"
}
This action deletes a specific webhook
webhook deleted
Bad request
Unauthorized
A server side exception has occured, please contact support
This endpoint allows you to update a webhook.
alert created
Bad request
Unauthorized
A server side exception has occured, please contact support
{- "whname": "Your Webhook Name",
- "whcomment": "short comment on the webhook",
- "applicationId": "d0db4b13-20d4-42c3-8268-37db22b36f98",
- "municipalityId": "d0db4b13-20d4-42c3-8268-37db22b36f98",
- "processes": [
- "string"
], - "httprequestheaders": [
- {
- "key": "string",
- "value": "string"
}
], - "httprequestparameter": [
- {
- "key": "string",
- "value": "string"
}
], - "httprequestbody": [
- {
- "key": "string",
- "value": "string"
}
]
}
{- "whid": "A123123",
- "whname": "Your Alert Name",
- "whcomment": "short comment on the alert",
- "applicationId": "d0db4b13-20d4-42c3-8268-37db22b36f98",
- "municipalityid": "d0db4b13-20d4-42c3-8268-37db22b36f98",
- "process": "process",
- "httprequestheaders": [
- {
- "key": "string",
- "value": "string"
}
], - "httprequestparameter": [
- {
- "key": "string",
- "value": "string"
}
], - "httprequestbody": [
- {
- "key": "string",
- "value": "string"
}
]
}
Update an existing task in the platform with a new status. For example when a task was in 'new' and now has to move to 'inprogress'. The status refund can also be used for canceling or aborted tasks, even if there is no refund or is not paid via the payment provier.
successfully created the status update
Bad Request
Unauthorized
A server side exception has occured, please contact support
{- "uniqueId": 123,
- "newStatus": "done"
}
Submit a document to an existing task.
successfully updated the task with the document
Unauthorized
A server side exception has occured, please contact support
{- "uniqueId": "1234567",
- "documentName": "test.pdf",
- "documentType": "Hauptwohnsitzbescheinigung",
- "documentBase64": "string"
}