---
title: "Subscribes to receive push notifications."
method: POST
path: "/v1/subscriptions"
tags: ["Subscribe to notifications"]
---

# Subscribes to receive push notifications.

`POST /v1/subscriptions`

Use this API to subscribe to task notifications. See <https://developer.basware.com/api/p2p/manual#PushNotifications> for notification format which needs to be supported by the receiving endpoint. 

Note: Basware API validates the receiving endpoint by sending a notification with taskType 'ConnectionTest', to which a 200 OK HTTP response needs to be returned.

## Request body

- SubscriptionInput[]
  - `taskType` string, required — Task type for which notifications are sent. Supported values: 'AccountingDocuments', 'ExportedPurchaseRequisitions', 'ExportedPurchaseOrders', 'RequestStatus', 'ExportedContracts' , 'ExportedContractSpends'.
  - `taskSubType` string — Task subtype for which webhook notifications are sent. Supported values: 'WaitingForPrebook', 'WaitingForTransfer', 'WaitingForPrebookCancelation', 'WaitingToBeRemoved', 'WaitingToBeReturned', 'WaitingToBeCompleted', 'WaitingForExport', 'Error', 'Success', 'All'. Available values depend on taskType. If null, defaults to 'Error' for RequestStatus taskType and 'All' for other taskTypes.
  - `subscriptionType` 'Webhook' | 'Polling', required
  - `notificationWebhookURL` string, uri, required — URL where API posts push notifications when subscriptionType = 'Webhook' (then field is mandatory). This URL needs to implement the Basware's notification receival API specification.
  - `webhookAuthenticationToken` string, required — Secret key used by API to sign sent push notifications so authenticity can be verified by customer. Mandatory when subscription type is 'Webhook'.
  - `lastUpdated` string, date-time — Timestamp when this subscription has been last updated (set automatically by Basware API).
  - `autoResponder` AutoResponder
    - `autoResponseMode` 'Disabled' | 'Success' | 'Failed'
    - `autoResponseMessage` string — Determines message returned by task autoresponser to P2P.
    - `fieldUpdateArray` FieldUpdateArray[] — Reserved for later use. Array of field values to automatically update when autoresponder is enabled.
      - `fieldId` string — Specifies the field to update. Use JSONpath to identify the value on response schema to update.
      - `updateToValue` string — Specifies value to which field contents are set by the autoresponder.

## Response `200`

Successful Response

- SubscriptionOutput[]
  - `taskType` string, required — Task type for which notifications are sent. Supported values: 'AccountingDocuments', 'ExportedPurchaseRequisitions', 'ExportedPurchaseOrders', 'RequestStatus', 'ExportedContracts' , 'ExportedContractSpends'.
  - `taskSubType` string — Task subtype for which webhook notifications are sent. Supported values: 'WaitingForPrebook', 'WaitingForTransfer', 'WaitingForPrebookCancelation', 'WaitingToBeRemoved', 'WaitingToBeReturned', 'WaitingToBeCompleted', 'WaitingForExport', 'Error', 'Success', 'All'. Available values depend on taskType. If null, defaults to 'Error' for RequestStatus taskType and 'All' for other taskTypes.
  - `subscriptionType` 'Webhook' | 'Polling', required
  - `notificationWebhookURL` string, uri, required — URL where API posts push notifications when subscriptionType = 'Webhook' (then field is mandatory). This URL needs to implement the Basware's notification receival API specification.
  - `webhookAuthenticationToken` string, required — Secret key used by API to sign sent push notifications so authenticity can be verified by customer. Mandatory when subscription type is 'Webhook'.
  - `lastUpdated` string, date-time — Timestamp when this subscription has been last updated (set automatically by Basware API).
  - `autoResponder` AutoResponder
    - `autoResponseMode` 'Disabled' | 'Success' | 'Failed'
    - `autoResponseMessage` string — Determines message returned by task autoresponser to P2P.
    - `fieldUpdateArray` FieldUpdateArray[] — Reserved for later use. Array of field values to automatically update when autoresponder is enabled.
      - `fieldId` string — Specifies the field to update. Use JSONpath to identify the value on response schema to update.
      - `updateToValue` string — Specifies value to which field contents are set by the autoresponder.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.dev/basware/apis/basware-push-notification-apis.md) · [All operations](https://skmtc.dev/basware/apis/basware-push-notification-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/basware/basware-push-notification-apis/revisions/8fa84fde6e87/schema)
