# 8 Service APIs

The APIs defined here establish a blueprint for how the Building Block will interact with other Building Blocks. Additional APIs may be implemented by the Building Block, but the listed APIs define a minimal set of functionality that should be provided by any implementation of this Building Block.

The [GovStack non-functional requirements document](https://govstack.gitbook.io/specification/v/1.0/architecture-and-nonfunctional-requirements/6-onboarding) provides additional information on how 'adaptors' may be used to translate an existing API to the patterns described here. This section also provides guidance on how candidate products are tested and how GovStack validates a product's API against the API specifications defined here.

The tests for the Registration Building Block can be found in [this GitHub repository](https://github.com/GovStackWorkingGroup/bb-registration/tree/main/test/openAPI).

## 8.1 Online Registration e-services

The available services (i.e. registration processes) and form definitions within such a service can be accessed:

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media&token=b5de1b37-249b-4e0b-84a9-26857070f14e>" path="/services" method="get" %}
[GovStack\_Registration\_BB\_API.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media\&token=b5de1b37-249b-4e0b-84a9-26857070f14e)
{% endopenapi %}

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media&token=b5de1b37-249b-4e0b-84a9-26857070f14e>" path="/services/{serviceId}" method="get" %}
[GovStack\_Registration\_BB\_API.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media\&token=b5de1b37-249b-4e0b-84a9-26857070f14e)
{% endopenapi %}

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media&token=b5de1b37-249b-4e0b-84a9-26857070f14e>" path="/services/{serviceId}/eForms" method="get" %}
[GovStack\_Registration\_BB\_API.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media\&token=b5de1b37-249b-4e0b-84a9-26857070f14e)
{% endopenapi %}

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media&token=b5de1b37-249b-4e0b-84a9-26857070f14e>" path="/eForms/{eFormId}" method="get" %}
[GovStack\_Registration\_BB\_API.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media\&token=b5de1b37-249b-4e0b-84a9-26857070f14e)
{% endopenapi %}

### 8.1.2 Generic Registration Steps

Going through the registration process as an applicant requires multiple steps available via API endpoints:

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media&token=b5de1b37-249b-4e0b-84a9-26857070f14e>" path="/services/{serviceId}/applications" method="post" %}
[GovStack\_Registration\_BB\_API.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media\&token=b5de1b37-249b-4e0b-84a9-26857070f14e)
{% endopenapi %}

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media&token=b5de1b37-249b-4e0b-84a9-26857070f14e>" path="/documents" method="post" %}
[GovStack\_Registration\_BB\_API.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media\&token=b5de1b37-249b-4e0b-84a9-26857070f14e)
{% endopenapi %}

## 8.2 Processing of Registrations

Operators can access and process existing application files:

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media&token=b5de1b37-249b-4e0b-84a9-26857070f14e>" path="/applications" method="get" %}
[GovStack\_Registration\_BB\_API.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media\&token=b5de1b37-249b-4e0b-84a9-26857070f14e)
{% endopenapi %}

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media&token=b5de1b37-249b-4e0b-84a9-26857070f14e>" path="/applications/{fileId}" method="get" %}
[GovStack\_Registration\_BB\_API.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media\&token=b5de1b37-249b-4e0b-84a9-26857070f14e)
{% endopenapi %}

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media&token=b5de1b37-249b-4e0b-84a9-26857070f14e>" path="/applications/{fileId}" method="put" %}
[GovStack\_Registration\_BB\_API.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media\&token=b5de1b37-249b-4e0b-84a9-26857070f14e)
{% endopenapi %}

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media&token=b5de1b37-249b-4e0b-84a9-26857070f14e>" path="/tasks" method="get" %}
[GovStack\_Registration\_BB\_API.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media\&token=b5de1b37-249b-4e0b-84a9-26857070f14e)
{% endopenapi %}

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media&token=b5de1b37-249b-4e0b-84a9-26857070f14e>" path="/tasks/{taskId}" method="get" %}
[GovStack\_Registration\_BB\_API.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media\&token=b5de1b37-249b-4e0b-84a9-26857070f14e)
{% endopenapi %}

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media&token=b5de1b37-249b-4e0b-84a9-26857070f14e>" path="/tasks/{taskId}/complete" method="post" %}
[GovStack\_Registration\_BB\_API.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FAt1TcM6bhFRUI3li3mEu%2FGovStack_Registration_BB_API.json?alt=media\&token=b5de1b37-249b-4e0b-84a9-26857070f14e)
{% endopenapi %}

## 8.3 Development Platform

Currently there are no specifications for API endpoints to manage and design services and workflows.

### Statistics

The statistics API gives Building Block operational statistics, that reference the number of processed applications (per operator, registration, service, date):

{% openapi src="<https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FyclZtjumkkw5TgMn3PVu%2FGovStack_Registration_BB_API_statistics.json?alt=media&token=6cf565d2-228a-4ccf-b872-b90caea4a5bb>" path="/data/statistics" method="get" %}
[GovStack\_Registration\_BB\_API\_statistics.json](https://2666141335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmNnAAqNpNoSI6WELhO9t%2Fuploads%2FyclZtjumkkw5TgMn3PVu%2FGovStack_Registration_BB_API_statistics.json?alt=media\&token=6cf565d2-228a-4ccf-b872-b90caea4a5bb)
{% endopenapi %}
