Configurazione

Risorse per la configurazione dei template e placeholders

Create a new template.

post

Create a new template for sending messages to the govio services.

Authorizations
Body
namestring · max: 255RequiredExample: Spedizione Messaggio CIEPattern: .*
descriptionstring · max: 9223372036854776000OptionalExample: Segnala la scadenza della proprià C.I.E.Pattern: [\s\S]*
subjectstring · max: 255RequiredExample: Scadenza CIE n. ${cie.uppercase}Pattern: .+
message_bodystring · max: 9223372036854776000RequiredExample: Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.Pattern: [\s\S]+
has_paymentbooleanRequired
has_due_datebooleanRequired
Responses
201
Successful operation.
application/hal+json
Responseall of
post
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.

get

List the templates used for sending messages to the govio services,sorted by name.

Authorizations
Query parameters
limitinteger · int32 · min: 1 · max: 100Optional

Max number of provided items.

offsetinteger · int64 · max: 9223372036854776000Optional

offset (zero-based) of indexed results.

Default: 0
qstring · max: 255Optional

generic query.

Example: user_1Pattern: ^[^\u0000]*$
sort_directionstring · enumRequired

Direction Sorting field.

Default: descPossible values:
Responses
200
Successful operation.
application/hal+json
Responseall of
and
get
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.

get

Reads a service template.

Authorizations
Path parameters
idinteger · int64Required

GovIO Template Id.

Example: 1
Responses
200
Successful operation.
application/hal+json
Responseall of
get
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.

patch

Update template data.

Authorizations
Path parameters
idinteger · int64Required

GovIO Template Id.

Example: 1
Bodyobject[]
opstring · enumRequired

Specified operation.

Example: addPossible values:
pathstring · max: 4096Required

jsonPath of the mutating object.

Example: /organizationsPattern: ^.*$
valueobjectOptional

updating value.

Responses
200
Succsessful operation.
application/hal+json
Responseall of
patch
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"
    }
  }
}

Assign a placeholder to a template.

post

Associate a placeholder to a template.

Authorizations
Path parameters
idinteger · int64Required

GovIO Template Id.

Example: 1
Query parameters
placeholder_idinteger · int64Required

GovIO Placeholder Id.

Example: 1
Body
mandatorybooleanRequired
positioninteger · int32 · max: 2147483647Required
Responses
201
Successful operation.
application/hal+json
Responseall of
and
post
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 placeholders.

get

List the template associated placeholders.

Authorizations
Path parameters
idinteger · int64Required

GovIO Template Id.

Example: 1
Query parameters
Responses
200
Successful operation.
application/hal+json
get
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"
            }
          }
        }
      }
    }
  ]
}

Update the template placeholders.

put

Updates the whole template placeholder list.

Authorizations
Path parameters
idinteger · int64Required

GovIO Template Id.

Example: 1
Body
Responses
201
Successful operation.
application/hal+json
put
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.

delete

Removes the placeholder from the template.

Authorizations
Path parameters
template_idinteger · int64Required

GovIO Template Id.

Example: 1
placeholder_idinteger · int64Required

GovIO Placeholder Id.

Example: 1
Responses
200
Successful operation.
delete
DELETE /templates/{template_id}/placeholders/{placeholder_id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*

No content

List the placeholders.

get

Placeholders can be reused across templates, this endpoints allows to list them.

Authorizations
Query parameters
limitinteger · int32 · min: 1 · max: 100Optional

Max number of provided items.

offsetinteger · int64 · max: 9223372036854776000Optional

offset (zero-based) of indexed results.

Default: 0
qstring · max: 255Optional

generic query.

Example: user_1Pattern: ^[^\u0000]*$
Responses
200
Successful operation.
application/hal+json
Responseall of
and
get
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"
        }
      }
    }
  ]
}

Create a new template placeholder.

post

Placeholders can be reused across templates, this endpoints allows to create one.

Authorizations
Body
namestring · max: 255RequiredExample: ciePattern: .+
descriptionstring · max: 9223372036854776000OptionalExample: Numero carta d'identità elettronica.Pattern: [\s\S]*
examplestring · max: 255RequiredExample: CA000000AAPattern: [\s\S]+
patternstring · max: 255OptionalExample: [A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]Pattern: [\s\S]*
typestring · enumRequiredPossible values:
Responses
201
Successful operation.
application/hal+json
Responseall of
and
post
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"
    }
  }
}

Read the specified placeholder.

get

Placeholders can be reused across templates, this endpoints allows to read one of them.

Authorizations
Path parameters
idinteger · int64Required

GovIO Placeholder Id.

Example: 1
Responses
200
Successful operation.
application/hal+json
Responseall of
and
get
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.

patch

Update placeholder data.

Authorizations
Path parameters
idinteger · int64Required

GovIO Placeholder Id.

Example: 1
Bodyobject[]
opstring · enumRequired

Specified operation.

Example: addPossible values:
pathstring · max: 4096Required

jsonPath of the mutating object.

Example: /organizationsPattern: ^.*$
valueobjectOptional

updating value.

Responses
200
Succsessful operation.
application/hal+json
Responseall of
and
patch
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"
    }
  }
}

List Govio Service Instances

get

Read and Filter the Govio Service Instanes

Authorizations
Query parameters
service_idinteger · int64 · max: 9223372036854776000Optional

Service identifier.

Example: 1
organization_idinteger · int64 · max: 9223372036854776000Optional

Organization identifier.

Example: 1
io_service_idstring · min: 1 · max: 255Optional
qstring · max: 255Optional

generic query.

Example: user_1Pattern: ^[^\u0000]*$
enabledbooleanOptional

filter by status.

limitinteger · int32 · min: 1 · max: 100Optional

Max number of provided items.

offsetinteger · int64 · max: 9223372036854776000Optional

offset (zero-based) of indexed results.

Default: 0
sort_directionstring · enumRequired

Direction Sorting field.

Default: descPossible values:
Responses
200
Successful operation.
application/hal+json
Responseall of
and
get
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"
            }
          }
        }
      }
    }
  ]
}

Creates a new Service Instance.

post

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.

Authorizations
Body
all ofOptional
and
Responses
200
Successful operation.
application/hal+json
Responseall of
and
and
post
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"
        }
      }
    }
  }
}

Retrieve a service instance.

get

Returns the specified service instance.

Authorizations
Path parameters
idinteger · int64Required

Govio Service Instance Id.

Example: 1
Responses
200
Successful operation.
application/hal+json
Responseall of
and
and
get
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"
        }
      }
    }
  }
}

Update the service instance.

patch

Only the apiKey can be modified by this operation.

Authorizations
Path parameters
idinteger · int64Required

Govio Service Instance Id.

Example: 1
Bodyobject[]
opstring · enumRequired

Specified operation.

Example: addPossible values:
pathstring · max: 4096Required

jsonPath of the mutating object.

Example: /organizationsPattern: ^.*$
valueobjectOptional

updating value.

Responses
200
Succsessful operation.
application/hal+json
Responseall of
and
and
patch
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