Share

Start the change request workflow

POST /api/cr/v1/crs/{id}/actions/start-workflow starts the workflow for a CR. The user must be a Team Member in the project in order to successfully start the workflow.

Request schema

Method URL
POST /api/cr/v1/crs/{id}/actions/start-workflow

Request header

*indicates mandatory fields

Field Value Type Description of values
*Authorization String Enter: Bearer access token.
*id Integer CR’s unique ID number. This is not the same as the number in the CR's name. To get the CR ID:
  1. In the Upchain web app, open the Business Processes > Change Requests section of the project.
  2. Single-click the desired CR to open its detail pane.
The CR's ID number is the value shown beside preview<workflowname>= in the URL. Alternatively, you may obtain the ID when the CR is created using POST /api/cr/v1/crs.
*Upc-Selected-Company Integer Company’s ID. Use the value returned in the id field received in response to the following request: GET /api/auth/v1/companies.
X-User-Id Text Enter the email address of the user being impersonated. This value is required if you are using a two-legged token. If you are using a three-legged token, then this field is not required.

Request body

Field Value Type Description of values
*projectId Integer Project’s ID number. It should match the projectId used when creating the workflow. Use GET /api/project/v1/projects and note the number provided in the id field.

Sample request

{
"activityId": 5009,
"projectId": 1862
}

Response schema

Response body

HTTP 200 response:

Field Value Type Description of values
message String If workflowReadyToStart is true then null is returned in the message field. If workflowReadyToStart is false then the message field describes the problem and how to fix it.
workflowReadyToStart Boolean true or false

If the workflow has already been started by another team member, or process, a 409-HTTP error is returned.

Sample response

{
  "message": null,
  "workflowReadyToStart": true
}

Was this information helpful?