Skip to content

addActivityByClientRef

Supported, no replacement yet

This endpoint remains fully supported. No replacement exists in the new API yet, and no action is needed. When a replacement ships you will get 12 months' notice, and this site will be updated.

Reference



/rest/workflow/activity/addActivityByClientRef

POST 

Adds an activity to a job (not appointment).  Looks up the most current version of the job by client ref.

If versioning is enabled and the user doesn't have the rights to create a version an error message will be returned.  If versioning is not enabled the activities will be added without a version being created.

If the submitVersion flag is set to 1 the version will also be submitted (if versioning is switched on).  If set to 0 the version will not be submitted.  If versioning is switched off the submitVersion flag will be ignored.

acceptable request representations:

  • application/json

{
  "activities": [
    {
       "jobClientRef" : "AC123",
       "clientId" : "3",
       "code" : "5647", --library activity code
       "clientRef" : "act123",  --activity client ref
       "description" : "optional desc",
       "completedQuantity" : "2",
       "totalQuantity" : "3"
    },
    {
       "jobClientRef" : "AC123",
       "clientId" : "3", 
       "code" : "5647", --library activity code
       "clientRef" : "act123",   --activity client ref                   
       "description" : "optional desc",
       "completedQuantity" : "2",
       "totalQuantity" : "3"
    }

  ],
  "submitVersion" : "1"
}


available response representations:
  • 200 - application/json
{
  "result" : "success or fail",
  "result_msg" : "error message"
}




See the Workflow API matrix for the full list of endpoints in this category.