Configurazione
Risorse per la configurazione dei template e placeholders
Create a new template for sending messages to the govio services.
Spedizione Messaggio CIE
Pattern: .*
Segnala la scadenza della proprià C.I.E.
Pattern: [\s\S]*
Scadenza CIE n. ${cie.uppercase}
Pattern: .+
Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.
Pattern: [\s\S]+
POST /templates HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 322
{
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true
}
{
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
List the templates used for sending messages to the govio services,sorted by name.
Max number of provided items.
offset (zero-based) of indexed results.
0
generic query.
user_1
Pattern: ^[^\u0000]*$
Direction Sorting field.
desc
Possible values: GET /templates HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"page": {
"offset": 20,
"limit": 25,
"total": 32
},
"items": [
{
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
]
}
Reads a service template.
GovIO Template Id.
1
GET /templates/{id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
Update template data.
GovIO Template Id.
1
Specified operation.
add
Possible values: jsonPath of the mutating object.
/organizations
Pattern: ^.*$
updating value.
PATCH /templates/{id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 47
[
{
"op": "add",
"path": "/name",
"value": "Comune1"
}
]
{
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
Associate a placeholder to a template.
GovIO Template Id.
1
GovIO Placeholder Id.
1
POST /templates/{id}/placeholders HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 31
{
"mandatory": true,
"position": 1
}
{
"mandatory": true,
"position": 1,
"placeholder_id": 1,
"_links": {
"placeholder": {
"href": "https://govhub.it/govio/placeholders/1"
},
"template": {
"href": "https://govhub.it/govio/templates/1"
}
},
"_embedded": {
"placeholder": {
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/placeholders/1"
}
}
},
"template": {
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
}
}
List the template associated placeholders.
GovIO Template Id.
1
GET /templates/{id}/placeholders HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"items": [
{
"mandatory": true,
"position": 1,
"placeholder_id": 1,
"_links": {
"placeholder": {
"href": "https://govhub.it/govio/placeholders/1"
},
"template": {
"href": "https://govhub.it/govio/templates/1"
}
},
"_embedded": {
"placeholder": {
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/placeholders/1"
}
}
},
"template": {
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
}
}
]
}
Updates the whole template placeholder list.
GovIO Template Id.
1
PUT /templates/{id}/placeholders HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 167
{
"items": [
{
"mandatory": false,
"position": 0,
"placeholder_id": 1
},
{
"mandatory": false,
"position": 1,
"placeholder_id": 10
},
{
"mandatory": true,
"position": 4,
"placeholder_id": 2
}
]
}
{
"items": [
{
"mandatory": false,
"position": 0,
"placeholder_id": 1
},
{
"mandatory": false,
"position": 1,
"placeholder_id": 10
},
{
"mandatory": true,
"position": 4,
"placeholder_id": 2
}
]
}
Removes the placeholder from the template.
GovIO Template Id.
1
GovIO Placeholder Id.
1
DELETE /templates/{template_id}/placeholders/{placeholder_id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
No content
Placeholders can be reused across templates, this endpoints allows to list them.
Max number of provided items.
offset (zero-based) of indexed results.
0
generic query.
user_1
Pattern: ^[^\u0000]*$
GET /placeholders HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"page": {
"offset": 20,
"limit": 25,
"total": 32
},
"items": [
{
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/placeholders/1"
}
}
}
]
}
Placeholders can be reused across templates, this endpoints allows to create one.
cie
Pattern: .+
Numero carta d'identità elettronica.
Pattern: [\s\S]*
CA000000AA
Pattern: [\s\S]+
[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]
Pattern: [\s\S]*
POST /placeholders HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 206
{
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string"
}
{
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/placeholders/1"
}
}
}
Placeholders can be reused across templates, this endpoints allows to read one of them.
GovIO Placeholder Id.
1
GET /placeholders/{id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/placeholders/1"
}
}
}
Update placeholder data.
GovIO Placeholder Id.
1
Specified operation.
add
Possible values: jsonPath of the mutating object.
/organizations
Pattern: ^.*$
updating value.
PATCH /placeholders/{id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 43
[
{
"op": "add",
"path": "/name",
"value": "cie"
}
]
{
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/placeholders/1"
}
}
}
Read and Filter the Govio Service Instanes
Service identifier.
1
Organization identifier.
1
generic query.
user_1
Pattern: ^[^\u0000]*$
filter by status.
Max number of provided items.
offset (zero-based) of indexed results.
0
Direction Sorting field.
desc
Possible values: GET /service-instances HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"page": {
"offset": 20,
"limit": 25,
"total": 32
},
"items": [
{
"service_id": 1,
"organization_id": 1,
"template_id": 1,
"enabled": true,
"io_service_id": "text",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/service-instances/1"
},
"service": {
"href": "https://govhub.it/govio/services/1"
},
"organization": {
"href": "https://govhub.it/govio/organizations/1"
},
"template": {
"href": "https://govhub.it/govio/templates/1"
}
},
"_embedded": {
"service": {
"id": 1,
"service_name": "SUAP-Integrazione",
"description": "Service for customer management.",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/services/1"
},
"logo": {
"href": "https://govhub.it/govregistry/services/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/services/logo_miniature"
}
}
},
"organization": {
"id": 1,
"legal_name": "Giletti S.R.L.",
"tax_code": "01234567890",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/organizations/1"
},
"logo": {
"href": "https://govhub.it/govregistry/organizations/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/organizations/logo_miniature"
}
}
},
"template": {
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
}
}
]
}
An organization can subscribe to a service multiple times, each time with a different message template, then the clients can send messages to the IO service using the service instance.
POST /service-instances HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 106
{
"service_id": 1,
"organization_id": 1,
"template_id": 1,
"enabled": true,
"io_service_id": "text",
"apiKey": "text"
}
{
"service_id": 1,
"organization_id": 1,
"template_id": 1,
"enabled": true,
"io_service_id": "text",
"apiKey": "text",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/service-instances/1"
},
"service": {
"href": "https://govhub.it/govio/services/1"
},
"organization": {
"href": "https://govhub.it/govio/organizations/1"
},
"template": {
"href": "https://govhub.it/govio/templates/1"
}
},
"_embedded": {
"service": {
"id": 1,
"service_name": "SUAP-Integrazione",
"description": "Service for customer management.",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/services/1"
},
"logo": {
"href": "https://govhub.it/govregistry/services/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/services/logo_miniature"
}
}
},
"organization": {
"id": 1,
"legal_name": "Giletti S.R.L.",
"tax_code": "01234567890",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/organizations/1"
},
"logo": {
"href": "https://govhub.it/govregistry/organizations/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/organizations/logo_miniature"
}
}
},
"template": {
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
}
}
Returns the specified service instance.
Govio Service Instance Id.
1
GET /service-instances/{id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"service_id": 1,
"organization_id": 1,
"template_id": 1,
"enabled": true,
"io_service_id": "text",
"apiKey": "text",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/service-instances/1"
},
"service": {
"href": "https://govhub.it/govio/services/1"
},
"organization": {
"href": "https://govhub.it/govio/organizations/1"
},
"template": {
"href": "https://govhub.it/govio/templates/1"
}
},
"_embedded": {
"service": {
"id": 1,
"service_name": "SUAP-Integrazione",
"description": "Service for customer management.",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/services/1"
},
"logo": {
"href": "https://govhub.it/govregistry/services/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/services/logo_miniature"
}
}
},
"organization": {
"id": 1,
"legal_name": "Giletti S.R.L.",
"tax_code": "01234567890",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/organizations/1"
},
"logo": {
"href": "https://govhub.it/govregistry/organizations/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/organizations/logo_miniature"
}
}
},
"template": {
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
}
}
Only the apiKey can be modified by this operation.
Govio Service Instance Id.
1
Specified operation.
add
Possible values: jsonPath of the mutating object.
/organizations
Pattern: ^.*$
updating value.
PATCH /service-instances/{id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 49
[
{
"op": "add",
"path": "/organizations",
"value": {}
}
]
{
"service_id": 1,
"organization_id": 1,
"template_id": 1,
"enabled": true,
"io_service_id": "text",
"apiKey": "text",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/service-instances/1"
},
"service": {
"href": "https://govhub.it/govio/services/1"
},
"organization": {
"href": "https://govhub.it/govio/organizations/1"
},
"template": {
"href": "https://govhub.it/govio/templates/1"
}
},
"_embedded": {
"service": {
"id": 1,
"service_name": "SUAP-Integrazione",
"description": "Service for customer management.",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/services/1"
},
"logo": {
"href": "https://govhub.it/govregistry/services/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/services/logo_miniature"
}
}
},
"organization": {
"id": 1,
"legal_name": "Giletti S.R.L.",
"tax_code": "01234567890",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/organizations/1"
},
"logo": {
"href": "https://govhub.it/govregistry/organizations/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/organizations/logo_miniature"
}
}
},
"template": {
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
}
}
Last updated