Communications - Subscription API (1.0)

Download OpenAPI specification:

Introduction

Subscription API allows to manage subscriptions and related resources for webhooks.

Webhooks

See Webhooks for more information.

Contact

If you have any questions, comments or feedback regarding our APIs, please contact developer@ovipro.fi.

Subscription

Subscription API

Create a subscription

Create a subscription for a webhook.

Authorizations:
bearerAuth
header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client.

Request Body schema: application/json
required

Describes a subscription

required
object

Defines the subscriber. Usually this is the current user. Associated events are resolved through user permissions.

subscriptionStatus
required
string
Enum: "ENABLED" "DISABLED"

The overall status of the subscription. When disabled, no events will be sent regardless of individual event type delivery status. This status will be automatically set to DISABLED if webhook endpoint fails to respond with 2xx status code after attempts.

required
Array of objects [ 1 .. 1000 ] items

List of event types that the subscription is interested in.

required
object

Responses

Request samples

Content type
application/json
{
  • "subscriber": {
    },
  • "subscriptionStatus": "ENABLED",
  • "eventTypes": [
    ],
  • "eventDestination": {
    }
}

Response samples

Content type
application/json
{
  • "subscriptionId": "67720b5f-0265-4a01-a585-b3c8bd572f7f",
  • "secretSigningKey": "abcd1234efgh5678ijkl9012mnop3456qrst7890uvwx1234yzab5678cdef9012",
  • "httpAuthentication": {
    }
}

Fetch subscriptions

Fetch subscriptions

Authorizations:
bearerAuth
query Parameters
userId
required
string <uuid>
Example: userId=9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9
header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client.

Responses

Response samples

Content type
application/json
{
  • "subscriptions": [
    ]
}

Fetch subscription by id

Fetch subscription by id

Authorizations:
bearerAuth
path Parameters
subscriptionId
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

Subscription id

header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client.

Responses

Response samples

Content type
application/json
{
  • "subscriptionId": "12345678-1234-1234-1234-123456789012",
  • "subscriber": {
    },
  • "subscriptionStatus": "ENABLED",
  • "eventTypes": [
    ],
  • "eventDestination": {
    },
  • "creationTime": "2021-01-01T00:00:00Z",
  • "modificationTime": "2021-01-01T00:00:00Z"
}

Update subscription by id

Update an existing subscription. This endpoint allows updating subscription details such as contact email, webhook URL, event delivery status, and overall subscription status. Only the fields that are provided in the request will be updated.

Authorizations:
bearerAuth
path Parameters
subscriptionId
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

Subscription id

header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client.

Request Body schema: application/json
required

Subscription update details

subscriptionStatus
string
Enum: "ENABLED" "DISABLED"

The overall status of the subscription. When disabled, no events will be sent regardless of individual event type delivery status.

Array of objects [ 1 .. 1000 ] items

List of event types that the subscription is interested in.

object

Responses

Request samples

Content type
application/json
{
  • "subscriptionStatus": "ENABLED",
  • "eventTypes": [
    ],
  • "eventDestination": {
    }
}

Response samples

Content type
application/json
{
  • "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",
  • "subscriptionStatus": "ENABLED",
  • "subscriber": {
    },
  • "eventTypes": [
    ],
  • "eventDestination": {
    },
  • "modificationTime": "2019-08-24T14:15:22Z",
  • "creationTime": "2019-08-24T14:15:22Z"
}

Delete subscription by id

Fetch subscription by id

Authorizations:
bearerAuth
path Parameters
subscriptionId
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

Subscription id

header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client.

Responses

Response samples

Content type
application/json
{
  • "errorCode": "NOT_FOUND",
  • "message": "The requested resource wasn't found."
}

Event Scheduler

Event Scheduler API

Schedule an event

Schedule an event by specifying the event type. This is used for testing purposes.

Authorizations:
bearerAuth
header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client.

Request Body schema: application/json
required

Describes the event to be scheduled

eventType
required
string (EventType) [ 1 .. 100 ] characters
Enum: "fi.ovipro.assignment.assignment_activated" "fi.ovipro.digital_trade.completed" "fi.ovipro.digital_trade.signing_can_be_started" "fi.ovipro.purchase_offer.offer_accepted"

The event type identifier.

subscriptionId
required
string <uuid>

The id of the subscription to be used for the event

userId
required
string <uuid>

The id of the user to be used for the event

deliveryType
string
Default: "IMMEDIATELY"
Value: "IMMEDIATELY"

Defines when the event is triggered

Responses

Request samples

Content type
application/json
{
  • "eventType": "fi.ovipro.assignment.assignment_activated",
  • "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "deliveryType": "IMMEDIATELY"
}

Response samples

Content type
application/json
{
  • "eventSchedulerId": "45221bb8-2deb-47c4-b5e4-155a8f1770dd"
}

Event

Event API

Fetch events

Fetch events. See a more detailed definition in the Webhook API documentation.

Authorizations:
bearerAuth
query Parameters
subscriptionId
required
string <uuid>
Example: subscriptionId=9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9
header Parameters
Request-ID
required
string <uuid>
Example: 9031d1c5-7d40-41dd-b2b8-7919a2fc4fe9

A unique id which identifies the HTTP request. The value of this header must be created by the client.

Responses

Response samples

Content type
application/json
{
  • "events": [
    ]
}