Skip to main content

Akoya
Documentation

Create notification subscription

POST

https://sandbox-api.akoya.com/notifications/{version}/subscriptions

Creates a notification subscription.

šŸ›‘ The service token should be used as the bearer token with this call.

Coming soon! Akoya will be requiring MTLS authentication for your callbackURL. This will enhance security for your end-users.


Path Parameters

  1. version*

    stringdefault: v1

    version of endpoint

Body Params

  1. category*

    string

    Category of Notification

  2. type*

    string

    Type of Notification

  3. callbackUrl*

    string

    The URL to receive webhooks. Must be HTTPS.

    Example: https://abc.com/notification

  4. effectiveDate

    string

    Effective date of notification

    Example: 2021-07-15

  5. callbackEmail

    string

    Optional. Captured for future implementation, which will be in an upcoming release.


Responses

  1. 200

    OK

    Response Body

      category

      Category of notification

        string

      type

      Type of notification

        string

      callbackUrl

      string

      The URL to receive webhooks. Must be HTTPS.

      effectiveDate

      string

      Effective date of notification

      callbackEmail

      string

      Optional. Captured for future implementation, which will be in an upcoming release.

      subscriptionId

      string

      id

  2. 400

    Input sent by client does not satisfy API specification

    Response Body

    object

      code

      string

      Long term persistent identifier which can be used to trace error condition back to log information

      message

      string

      End user displayable information which might help the customer diagnose an error

      debugMessage

      string

      Message used to debug the root cause of the error. Contents should not be used in consumer's business logic. Can change at any time and should only be used for consumer to communicate with the data provider about an issue. Provider can include an error GUID in message for their use.

  3. 401

    Unauthorized to create a notification subscription

    Response Body

    object

      code

      string

      Long term persistent identifier which can be used to trace error condition back to log information

      message

      string

      End user displayable information which might help the customer diagnose an error

      debugMessage

      string

      Message used to debug the root cause of the error. Contents should not be used in consumer's business logic. Can change at any time and should only be used for consumer to communicate with the data provider about an issue. Provider can include an error GUID in message for their use.

  4. 405

    Method Not Allowed

    Response Body

    object

      code

      string

      Long term persistent identifier which can be used to trace error condition back to log information

      message

      string

      End user displayable information which might help the customer diagnose an error

      debugMessage

      string

      Message used to debug the root cause of the error. Contents should not be used in consumer's business logic. Can change at any time and should only be used for consumer to communicate with the data provider about an issue. Provider can include an error GUID in message for their use.

  5. 429

    Too Many Requests

    Response Body

    object

      code

      string

      Long term persistent identifier which can be used to trace error condition back to log information

      message

      string

      End user displayable information which might help the customer diagnose an error

      debugMessage

      string

      Message used to debug the root cause of the error. Contents should not be used in consumer's business logic. Can change at any time and should only be used for consumer to communicate with the data provider about an issue. Provider can include an error GUID in message for their use.

  6. 500

    Catch all exception where request was not processed due to an internal outage/issue. Consider other more specific errors before using this error

    Response Body

    object

      code

      string

      Long term persistent identifier which can be used to trace error condition back to log information

      message

      string

      End user displayable information which might help the customer diagnose an error

      debugMessage

      string

      Message used to debug the root cause of the error. Contents should not be used in consumer's business logic. Can change at any time and should only be used for consumer to communicate with the data provider about an issue. Provider can include an error GUID in message for their use.

  7. 501

    Error when FdxVersion in Header is not one of those implemented at backend

    Response Body

    object

      code

      string

      Long term persistent identifier which can be used to trace error condition back to log information

      message

      string

      End user displayable information which might help the customer diagnose an error

      debugMessage

      string

      Message used to debug the root cause of the error. Contents should not be used in consumer's business logic. Can change at any time and should only be used for consumer to communicate with the data provider about an issue. Provider can include an error GUID in message for their use.

  8. 503

    System is down for maintenance

    Response Body

    object

      code

      string

      Long term persistent identifier which can be used to trace error condition back to log information

      message

      string

      End user displayable information which might help the customer diagnose an error

      debugMessage

      string

      Message used to debug the root cause of the error. Contents should not be used in consumer's business logic. Can change at any time and should only be used for consumer to communicate with the data provider about an issue. Provider can include an error GUID in message for their use.

CTRL + K

Try it

Authorization

const options = {
	"method": "POST",
	"headers": {
		"accept": "application/json"
	},
	"body": JSON.stringify({
	"category": "MAINTENANCE",
	"type": "SERVICE",
	"callbackUrl": ""
})
}};
fetch('https://sandbox-api.akoya.com/notifications/v1/subscriptions', options)
  .then(response => response.json())
  .catch(err => console.error(err));