Share

Subscribe to an event notification

POST /api/v1/hooks/ endpoint subscribes a system, identified by the url specified in the request, to receive notifications from Upchain’s webhook.

Note: * indicates mandatory fields.

Request schema

Method URL
POST /api/v1/hooks/

Request Header

Field Value Type (max.char) Description of values
*upc-selected-company String (32) Company’s ID. Use the value for id received in the response to the following request: GET /api/auth/v1/companies.

Request Body

Field Value Type Description of values
description String A description of the event to which you have subscribed.
events String Enter one of the following string-values:

  • conversion.finished - Notifications are sent to the subscriber when translations are generated.
  • ecr.status.updated – Notifications are sent whenever a Change request (CR) workflow passes an Update primitive that is configured as Type > Work Order Status.
url String URL of external system to which callbacks are to be posted.

Sample request

{  

"description":"CR’s status is updated.",   
"events": [  
"ecr.status.updated"  
],   
"url":" https://xxxxxxxxx.com/01b30ccd-bba4-4188-b35e-f51463b3ba60"  
} 

Sample response

A successful request returns the following 201 http response:

{ 
  "description": "CR’s status is updated.", 
  "events": [ 
    "ecr.status.updated" 
  ], 
  "url": " https://xxxxxxxxx.com/01b30ccd-bba4-4188-b35e-f51463b3ba60", 
  "secret": null, 
  "id": 172 
}
Note: In case you would like to view details of a subscription or delete a subscription take note of the value for id in the response payload.

Was this information helpful?