{"openapi":"3.1.0","info":{"title":"Workflow Jobs API","version":"1.0.0"},"servers":[{"url":"https://{your-bynder-domain}"}],"tags":[{"name":"Presets","description":""},{"name":"Jobs","description":""},{"name":"Campaign jobs","description":""},{"name":"Job media","description":""},{"name":"File upload","description":""},{"name":"Stages","description":""},{"name":"Finish","description":""}],"paths":{"/api/workflow/presets/job/{id}":{"get":{"summary":"Retrieve specific job preset","tags":["Presets"],"security":[{"permanentToken":["PRESETOVERVIEW"]},{"OAuth2":["PRESETOVERVIEW"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"00000000-0000-0000-0000-000000000000"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"ID":{"type":"string"},"name":{"type":"string"},"ftp_settings":{"type":"string"},"wf_uuid":{"type":"string"},"presetstages":{"type":"object","properties":{"ID":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"position":{"type":"string"},"editableBy":{"type":"string"},"restrictToGroupID":{"type":"string"},"type":{"type":"string"},"responsibleID":{"type":"string"},"responsibleGroupID":{"type":"string"}}}}},"examples":{"example-1":{"value":{"ID":"00000000-0000-0000-0000-000000000000","name":"API name","ftp_settings":{},"wf_uuid":"00000000-0000-0000-0000-000000000000","presetstages":{"ID":"00000000-0000-0000-0000-000000000000","name":"Revision Stage","description":"","position":"1.0","editableBy":"all","restrictToGroupID":null,"type":"download","responsibleID":null,"responsibleGroupID":null}}}}}}}}}},"/api/workflow/jobs":{"get":{"summary":"Retrieve jobs","tags":["Jobs"],"security":[{"permanentToken":["JOBOVERVIEW"]},{"OAuth2":["JOBOVERVIEW"]}],"parameters":[{"name":"dateCreatedFrom","in":"query","schema":{"type":"string","description":"Retrieve jobs created after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time"},"example":"2020-01-01T12:00:00Z"},{"name":"dateCreatedTo","in":"query","schema":{"type":"string","description":"Set a date range together with the \"dateCreated\" parameter. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time"},"example":"2020-01-01T12:00:00Z"},{"name":"dateModifiedFrom","in":"query","schema":{"type":"string","description":"Retrieve jobs modified after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time"},"example":"2020-01-01T12:00:00Z"},{"name":"dateModifiedTo","in":"query","schema":{"type":"string","description":"Set a date range together with the \"dateModified\" parameter. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time"},"example":"2020-01-01T12:00:00Z"},{"name":"deadlineFrom","in":"query","schema":{"type":"string","description":"Retrieve jobs with a deadline after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time"},"example":"2020-01-01T12:00:00Z"},{"name":"deadlineTo","in":"query","schema":{"type":"string","description":"Retrieve jobs with a deadline before this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time"},"example":"2020-01-01T12:00:00Z"},{"name":"resonsibleIDs","in":"query","schema":{"type":"string"},"example":"00000000000000000000000000000000,00000000000000000000000000000000"},{"name":"accountableIDs","in":"query","schema":{"type":"string"},"example":"00000000000000000000000000000000,00000000000000000000000000000000"},{"name":"status","in":"query","schema":{"type":"string"},"example":"Approved,NeedsChanges"},{"name":"orderBy","in":"query","schema":{"type":"string"},"example":"deadline asc"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":100},{"name":"page","in":"query","schema":{"type":"integer"},"example":1}],"responses":{"200":{"description":"Successful response","headers":{"X-Pagination-TotalRecords":{"schema":{"type":"integer"},"example":10000},"X-Pagination-TotalPages":{"schema":{"type":"integer"},"example":100},"X-Pagination-Page":{"schema":{"type":"integer"},"example":2},"X-Pagination-Limit":{"schema":{"type":"integer"},"example":100}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"deadline":{"type":"string"},"createdByID":{"type":"string"},"accountableID":{"type":"string"},"dateCreated":{"type":"string"},"dateModified":{"type":"string"},"basedOnPreset":{"type":"string"},"presetID":{"type":"string"},"campaignID":{"type":"string"},"bookedMinutes":{"type":"number"},"jobKey":{"type":"string"},"dateFinished":{"type":"string"},"jobFinishedHistory":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"date":{"type":"string"}}}},"job_stages":{"type":"array","items":{"type":"object","properties":{"position":{"type":"string"},"status":{"type":"string"},"id":{"type":"string"}}}},"job_previous_stage":{"type":"object","properties":{"position":{"type":"string"},"status":{"type":"string"},"id":{"type":"string"}}},"job_active_stage":{"type":"object","properties":{"position":{"type":"string"},"status":{"type":"string"},"id":{"type":"string"}}},"job_next_stage":{"type":"object","properties":{"position":{"type":"string"},"status":{"type":"string"},"id":{"type":"string"}}},"jobMetaproperties":{"type":"object","properties":{"metapropertyId":{"type":"string"}}}}}},"examples":{"example-1":{"value":[{"job_stages":[{"position":1,"status":"Approved","id":"00000000-0000-0000-0000-000000000000"},{"position":2,"status":"Active","id":"00000000-0000-0000-0000-000000000000"},{"position":3,"status":"Idle","id":"00000000-0000-0000-0000-000000000000"}],"dateModified":"2017-03-30T11:43:19+00:00","presetID":null,"jobKey":"0000-0","dateFinished":null,"jobFinishedHistory":null,"jobMetaproperties":{"00000000-0000-0000-0000-000000000001":"00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000002":"Country","00000000-0000-0000-0000-000000000003":"City"},"createdByID":"00000000-0000-0000-0000-000000000000","job_next_stage":{"position":3,"status":"Idle","id":"00000000-0000-0000-0000-000000000000"},"id":"00000000-0000-0000-0000-000000000000","description":"","accountableID":"00000000-0000-0000-0000-000000000000","basedOnPreset":false,"dateCreated":"2017-03-30T11:42:30+00:00","job_active_stage":{"position":2,"status":"Active","id":"00000000-0000-0000-0000-000000000000"},"deadline":null,"name":"Test API","campaignID":"00000000-0000-0000-0000-000000000000","job_previous_stage":{"position":1,"status":"Approved","id":"00000000-0000-0000-0000-000000000000"}},{"job_stages":[{"position":1,"status":"Approved","id":"00000000-0000-0000-0000-000000000000"},{"position":2,"status":"Active","id":"00000000-0000-0000-0000-000000000000"},{"position":3,"status":"Idle","id":"00000000-0000-0000-0000-000000000000","bookedMinutes":5}],"dateModified":"2017-03-30T11:43:19+00:00","presetID":null,"jobKey":"0000-0","dateFinished":"2021-02-25T16:19:42+00:00","jobFinishedHistory":[{"userId":"00000000-0000-0000-0000-000000000000","date":"2021-02-24T16:23:48+00:00"},{"userId":"00000000-0000-0000-0000-000000000000","date":"2021-02-25T16:19:42+00:00"}],"jobMetaproperties":{"00000000-0000-0000-0000-000000000001":"00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000002":"Country","00000000-0000-0000-0000-000000000003":"City"},"createdByID":"00000000-0000-0000-0000-000000000000","job_next_stage":{"position":3,"status":"Idle","id":"00000000-0000-0000-0000-000000000000"},"id":"00000000-0000-0000-0000-000000000000","description":"","accountableID":"00000000-0000-0000-0000-000000000000","basedOnPreset":false,"dateCreated":"2017-03-30T11:42:30+00:00","job_active_stage":{"position":2,"status":"Active","id":"00000000-0000-0000-0000-000000000000"},"deadline":null,"name":"Test API with booked time","campaignID":"00000000-0000-0000-0000-000000000000","bookedMinutes":10,"job_previous_stage":{"position":1,"status":"Approved","id":"00000000-0000-0000-0000-000000000000"}}]}}}}}}},"post":{"summary":"Create job","description":"Requires the JOBADD security role.","tags":["Jobs"],"security":[{"permanentToken":["JOBADD"]},{"OAuth2":["JOBADD"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the job","example":"Job Example"},"description":{"type":"string","description":"Description of the job","example":"Job Description"},"deadline":{"type":"string","description":"Date of when the job ends","example":"2018-09-29"},"campaignID":{"type":"string","description":"Id of the campaign the job is part of","example":"00000000-0000-0000-0000-000000000000"},"accountableID":{"type":"string","description":"Id of the user responsible for the job","example":"00000000-0000-0000-0000-000000000000"},"presetID":{"type":"string","description":"Id of the preset the job should be created from","example":"00000000-0000-0000-0000-000000000000"},"jobMetaproperties":{"type":"object","description":"ID and metaproperty values","additionalProperties":{"type":"string"},"example":{"00000000-0000-0000-0000-000000000000":"00000000-0000-0000-0000-000000000000"}},"stages":{"type":"array","items":{"type":"object","properties":{"preset_stage_id":{"type":"string","description":"Id of the preset stage","example":"00000000-0000-0000-0000-000000000000"},"name":{"type":"string","description":"Name of the stage","example":"Review"},"description":{"type":"string","description":"Description of the stage","example":"Awesome description"},"responsibleGroupID":{"type":"string","description":"Id of responsible group for the stage","example":"00000000-0000-0000-0000-000000000000"},"responsibleID":{"type":"string","description":"Id of the stage responsible","example":"00000000-0000-0000-0000-000000000000"},"deadline":{"type":"string","description":"Deadline date of stage","example":"2018-09-29"}}}}}}}}},"responses":{"201":{"description":"Job created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"Created"},"job_id":{"type":"string","example":"00000000-0000-0000-0000-000000000000"}}},"examples":{"example-1":{"value":{"status":"Created","job_id":"00000000-0000-0000-0000-000000000000"}}}}}}}}},"/api/workflow/campaigns/{id}/jobs":{"get":{"summary":"Retrieve the jobs of a specific campaign","description":"Requires the CAMPAIGNOVERVIEW security role.","tags":["Campaign jobs"],"security":[{"permanentToken":["CAMPAIGNOVERVIEW"]},{"OAuth2":["CAMPAIGNOVERVIEW"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"00000000-0000-0000-0000-000000000000"},{"name":"dateCreatedFrom","in":"query","schema":{"type":"string","description":"Retrieve jobs created after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time"},"example":"2020-01-01T12:00:00Z"},{"name":"dateCreatedTo","in":"query","schema":{"type":"string","description":"Set a date range together with the \"dateCreated\" parameter. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time"},"example":"2020-01-01T12:00:00Z"},{"name":"dateModifiedFrom","in":"query","schema":{"type":"string","description":"Retrieve jobs modified after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time"},"example":"2020-01-01T12:00:00Z"},{"name":"dateModifiedTo","in":"query","schema":{"type":"string","description":"Set a date range together with the \"dateModified\" parameter. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time"},"example":"2020-01-01T12:00:00Z"},{"name":"deadlineFrom","in":"query","schema":{"type":"string","description":"Retrieve jobs with a deadline after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time"},"example":"2020-01-01T12:00:00Z"},{"name":"deadlineTo","in":"query","schema":{"type":"string","description":"Retrieve jobs with a deadline before this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time"},"example":"2020-01-01T12:00:00Z"},{"name":"resonsibleIDs","in":"query","schema":{"type":"string"},"example":"00000000000000000000000000000000,00000000000000000000000000000000"},{"name":"accountableIDs","in":"query","schema":{"type":"string"},"example":"00000000000000000000000000000000,00000000000000000000000000000000"},{"name":"status","in":"query","schema":{"type":"string"},"example":"Approved,NeedsChanges"},{"name":"orderBy","in":"query","schema":{"type":"string"},"example":"dateModified desc"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":100},{"name":"page","in":"query","schema":{"type":"integer"},"example":1}],"responses":{"200":{"description":"Successful response","headers":{"X-Pagination-TotalRecords":{"schema":{"type":"integer"},"example":10000},"X-Pagination-TotalPages":{"schema":{"type":"integer"},"example":100},"X-Pagination-Page":{"schema":{"type":"integer"},"example":2},"X-Pagination-Limit":{"schema":{"type":"integer"},"example":100}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"deadline":{"type":"string"},"createdByID":{"type":"string"},"accountableID":{"type":"string"},"dateCreated":{"type":"string"},"dateModified":{"type":"string"},"basedOnPreset":{"type":"string"},"presetID":{"type":"string"},"campaignID":{"type":"string"},"bookedMinutes":{"type":"number"},"jobKey":{"type":"string"},"dateFinished":{"type":"string"},"jobFinishedHistory":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"date":{"type":"string"}}}},"job_stages":{"type":"array","items":{"type":"object","properties":{"position":{"type":"string"},"status":{"type":"string"},"id":{"type":"string"}}}},"job_previous_stage":{"type":"object","properties":{"position":{"type":"string"},"status":{"type":"string"},"id":{"type":"string"}}},"job_active_stage":{"type":"object","properties":{"position":{"type":"string"},"status":{"type":"string"},"id":{"type":"string"}}},"job_next_stage":{"type":"object","properties":{"position":{"type":"string"},"status":{"type":"string"},"id":{"type":"string"}}},"jobMetaproperties":{"type":"object","additionalProperties":{"type":"string"}}}}},"examples":{"example-1":{"value":[{"job_stages":[{"position":1,"status":"Approved","id":"00000000-0000-0000-0000-000000000000"},{"position":2,"status":"Active","id":"00000000-0000-0000-0000-000000000000"},{"position":3,"status":"Idle","id":"00000000-0000-0000-0000-000000000000"}],"dateModified":"2017-03-30T11:43:19+00:00","presetID":null,"jobKey":"0000-0","dateFinished":"2021-02-25T16:19:42+00:00","jobFinishedHistory":[{"userId":"00000000-0000-0000-0000-000000000000","date":"2021-02-24T16:23:48+00:00"},{"userId":"00000000-0000-0000-0000-000000000000","date":"2021-02-25T16:19:42+00:00"}],"jobMetaproperties":{"00000000-0000-0000-0000-000000000001":"00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000002":"Country","00000000-0000-0000-0000-000000000003":"City"},"createdByID":"00000000-0000-0000-0000-000000000000","job_next_stage":{"position":3,"status":"Idle","id":"00000000-0000-0000-0000-000000000000"},"id":"00000000-0000-0000-0000-000000000000","description":"","accountableID":"00000000-0000-0000-0000-000000000000","basedOnPreset":false,"dateCreated":"2017-03-30T11:42:30+00:00","job_active_stage":{"position":2,"status":"Active","id":"00000000-0000-0000-0000-000000000000"},"deadline":null,"name":"Test API","campaignID":"00000000-0000-0000-0000-000000000000","job_previous_stage":{"position":1,"status":"Approved","id":"00000000-0000-0000-0000-000000000000"}},{"job_stages":[{"position":1,"status":"Approved","id":"00000000-0000-0000-0000-000000000000"},{"position":2,"status":"Active","id":"00000000-0000-0000-0000-000000000000"},{"position":3,"status":"Idle","id":"00000000-0000-0000-0000-000000000000","bookedMinutes":5}],"dateModified":"2017-03-30T11:43:19+00:00","presetID":null,"jobKey":"0000-0","dateFinished":null,"jobFinishedHistory":null,"jobMetaproperties":{"00000000-0000-0000-0000-000000000001":"00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000002":"Country","00000000-0000-0000-0000-000000000003":"City"},"createdByID":"00000000-0000-0000-0000-000000000000","job_next_stage":{"position":3,"status":"Idle","id":"00000000-0000-0000-0000-000000000000"},"id":"00000000-0000-0000-0000-000000000000","description":"","accountableID":"00000000-0000-0000-0000-000000000000","basedOnPreset":false,"dateCreated":"2017-03-30T11:42:30+00:00","job_active_stage":{"position":2,"status":"Active","id":"00000000-0000-0000-0000-000000000000"},"deadline":null,"name":"Test API with booked time","campaignID":"00000000-0000-0000-0000-000000000000","bookedMinutes":10,"job_previous_stage":{"position":1,"status":"Approved","id":"00000000-0000-0000-0000-000000000000"}}]}}}}}}}},"/api/workflow/jobs/{id}":{"get":{"summary":"Retrieve specific job","description":"Requires the JOBOVERVIEW security role.","tags":["Jobs"],"security":[{"permanentToken":["JOBOVERVIEW"]},{"OAuth2":["JOBOVERVIEW"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"00000000-0000-0000-0000-000000000000"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"deadline":{"type":"string"},"createdByID":{"type":"string"},"accountableID":{"type":"string"},"dateCreated":{"type":"string"},"dateModified":{"type":"string"},"basedOnPreset":{"type":"string"},"presetID":{"type":"string"},"campaignID":{"type":"string"},"bookedMinutes":{"type":"number"},"jobKey":{"type":"string"},"dateFinished":{"type":"string"},"jobFinishedHistory":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"date":{"type":"string"}}}},"job_stages":{"type":"array","items":{"type":"object","properties":{"position":{"type":"string"},"status":{"type":"string"},"id":{"type":"string"}}}},"job_previous_stage":{"type":"object","properties":{"position":{"type":"string"},"status":{"type":"string"},"id":{"type":"string"}}},"job_active_stage":{"type":"object","properties":{"position":{"type":"string"},"status":{"type":"string"},"id":{"type":"string"}}},"job_next_stage":{"type":"object","properties":{"position":{"type":"string"},"status":{"type":"string"},"id":{"type":"string"}}},"jobMetaproperties":{"type":"object","additionalProperties":{"type":"string"}}}},"examples":{"example-1":{"value":{"id":"00000000-0000-0000-0000-000000000000","name":"Test API","description":"","deadline":null,"createdByID":"00000000-0000-0000-0000-000000000000","accountableID":"00000000-0000-0000-0000-000000000000","dateCreated":"2017-03-30T11:42:30+00:00","dateModified":"2017-03-30T11:43:19+00:00","basedOnPreset":false,"presetID":null,"campaignID":"00000000-0000-0000-0000-000000000000","bookedMinutes":10,"jobKey":"0000-0","dateFinished":"2021-02-25T16:19:42+00:00","jobFinishedHistory":[{"userId":"00000000-0000-0000-0000-000000000000","date":"2021-02-24T16:23:48+00:00"},{"userId":"00000000-0000-0000-0000-000000000000","date":"2021-02-25T16:19:42+00:00"}],"job_stages":[{"position":1,"status":"Approved","id":"00000000-0000-0000-0000-000000000000"},{"position":2,"status":"Active","id":"00000000-0000-0000-0000-000000000000"},{"position":3,"status":"Idle","id":"00000000-0000-0000-0000-000000000000"}],"job_previous_stage":{"position":1,"status":"Approved","id":"00000000-0000-0000-0000-000000000000"},"job_active_stage":{"position":2,"status":"Active","id":"00000000-0000-0000-0000-000000000000"},"job_next_stage":{"position":3,"status":"Idle","id":"00000000-0000-0000-0000-000000000000"},"jobMetaproperties":{}}}}}}}}},"put":{"summary":"Modify job","description":"Requires the JOBEDIT security role.","tags":["Jobs"],"security":[{"permanentToken":["JOBEDIT"]},{"OAuth2":["JOBEDIT"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"00000000-0000-0000-0000-000000000000"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the job","example":"Job Example"},"description":{"type":"string","description":"Description of the job","example":"Job Description"},"deadline":{"type":"string","description":"Date of when the job ends","example":"2018-09-29"},"campaignID":{"type":"string","description":"Id of the campaign the job is part of","example":"00000000-0000-0000-0000-000000000000"},"accountableID":{"type":"string","description":"Id of the user responsible for the job","example":"00000000-0000-0000-0000-000000000000"},"jobMetaproperties":{"type":"object","description":"ID and metaproperty values","additionalProperties":{"type":"string"},"example":{"00000000-0000-0000-0000-000000000000":"00000000-0000-0000-0000-000000000000"}},"activeStage":{"type":"object","description":"The new active stage of the job","properties":{"id":{"type":"string","description":"ID of the new active stage","example":"00000000-0000-0000-0000-000000000002"},"deadline":{"type":"string","description":"Date of when the active stage ends","example":"2024-08-31T00:00:00+00:00"},"status":{"type":"string","description":"Status of the new active stage","enum":["Idle","Active","Cancelled","Approved","NeedsChanges"],"example":"Active"}}},"nextStage":{"type":"object","description":"The new next stage of the job","properties":{"id":{"type":"string","description":"ID of the new next stage","example":"00000000-0000-0000-0000-000000000003"},"deadline":{"type":"string","description":"Date of when the next stage ends","example":"2024-08-31T00:00:00+00:00"},"status":{"type":"string","description":"Status of the new next stage","enum":["Idle","Active","Cancelled","Approved","NeedsChanges"],"example":"Idle"}}},"previousStage":{"type":"object","description":"The new previous stage of the job","properties":{"id":{"type":"string","description":"ID of the new previous stage","example":"00000000-0000-0000-0000-000000000001"},"deadline":{"type":"string","description":"Date of when the previous stage ends","example":null},"status":{"type":"string","description":"Status of the new previous stage","enum":["Idle","Active","Cancelled","Approved","NeedsChanges"],"example":"Approved"}}}}},"examples":{"example-1":{"value":{"name":"Job Example","description":"Job Description","deadline":"2018-09-29","campaignID":"00000000-0000-0000-0000-000000000000","accountableID":"00000000-0000-0000-0000-000000000000","jobMetaproperties":{"00000000-0000-0000-0000-000000000000":"00000000-0000-0000-0000-000000000000"},"nextStage":{"status":"Idle","id":"00000000-0000-0000-0000-000000000003","deadline":"2024-08-31T00:00:00+00:00"},"activeStage":{"status":"Active","id":"00000000-0000-0000-0000-000000000002"},"previousStage":{"status":"Approved","id":"00000000-0000-0000-0000-000000000001","deadline":null}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"Updated"},"job_id":{"type":"string","example":"00000000-0000-0000-0000-000000000000"}}},"examples":{"example-1":{"value":{"status":"Updated","job_id":"00000000-0000-0000-0000-000000000000"}}}}}}}},"delete":{"summary":"Delete job","description":"Requires the JOBREMOVE security role.","tags":["Jobs"],"security":[{"permanentToken":["JOBREMOVE"]},{"OAuth2":["JOBREMOVE"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"00000000-0000-0000-0000-000000000000"}],"responses":{"204":{"description":"No Content","content":{"application/json":{"examples":{"example-1":{"value":{}}}}}}}}},"/api/workflow/jobs/{id}/media":{"get":{"summary":"Retrieve media of specific job","description":"Requires the JOBOVERVIEW security role.","tags":["Job media"],"security":[{"permanentToken":["JOBOVERVIEW"]},{"OAuth2":["JOBOVERVIEW"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"00000000-0000-0000-0000-000000000000"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"uploader_name":{"type":"string"},"responsible_name":{"type":"string"},"dateCreated":{"type":"string"},"dateModified":{"type":"string"},"orientation":{"type":"string"},"original_url":{"type":"string"},"status":{"type":"string"},"versionParentID":{"type":"string"},"version":{"type":"number"},"previews":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"url":{"type":"string"}}}},"sub_versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"uploader_name":{"type":"string"},"responsible_name":{"type":"string"},"dateCreated":{"type":"string"},"dateModified":{"type":"string"},"orientation":{"type":"string"},"original_url":{"type":"string"},"status":{"type":"string"},"versionParentID":{"type":"string"},"version":{"type":"number"},"previews":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"url":{"type":"string"}}}},"sub_versions":{"type":"array","items":{}}}}}}}},"examples":{"example-1":{"value":[{"id":"00000000-0000-0000-0000-000000000000","filename":"filename.png","uploader_name":"John Doe","responsible_name":"John Doe","dateCreated":"2021-05-12T08:48:01+00:00","dateModified":"2021-05-12T08:51:22+00:00","orientation":"square","original_url":"https://url.to.file/original.png","status":"AwaitingApproval","versionParentID":null,"version":1,"previews":[{"type":"thumbnail","url":"https://url.to.file/preview.png"},{"type":"preview","url":"https://url.to.file/preview.png"},{"type":"activity","url":"https://url.to.file/preview.png"}],"sub_versions":[{"id":"00000000-0000-0000-0000-000000000000","filename":"filename.png","uploader_name":"John Doe","responsible_name":"John Doe","dateCreated":"2021-05-13T08:48:01+00:00","dateModified":"2021-05-13T08:51:22+00:00","orientation":"square","original_url":"https://url.to.file/original.png","status":"AwaitingApproval","versionParentID":"00000000-0000-0000-0000-000000000000","version":2,"previews":[{"type":"thumbnail","url":"https://url.to.file/preview.png"},{"type":"preview","url":"https://url.to.file/preview.png"},{"type":"activity","url":"https://url.to.file/preview.png"}],"sub_versions":[]}]}]}}}}}}}},"/api/workflow/jobs/{id}/stages":{"get":{"summary":"Retrieve stages of specific job","description":"Requires the JOBOVERVIEW security role.","tags":["Job stages"],"security":[{"permanentToken":["JOBOVERVIEW"]},{"OAuth2":["JOBOVERVIEW"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"00000000-0000-0000-0000-000000000000"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"deadline":{"type":"string","nullable":true},"dateCreated":{"type":"string"},"createdByID":{"type":"string"},"status":{"type":"string","enum":["Idle","Active","Cancelled","Approved","NeedsChanges"]},"position":{"type":"number"},"responsible":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["user","group"]}}}}}},"examples":{"example-1":{"value":[{"id":"00000000-0000-0000-0000-000000000000","name":"Start stage","description":"This is the first stage","deadline":null,"dateCreated":"2021-02-08T16:38:03+00:00","createdByID":"00000000-0000-0000-0000-000000000000","status":"Active","position":1,"responsible":{"id":"00000000-0000-0000-0000-000000000000","type":"user"}},{"id":"00000000-0000-0000-0000-000000000000","name":"Second stage","description":"","deadline":"2021-02-18T18:00:00+00:00","dateCreated":"2021-02-08T16:38:03+00:00","createdByID":"00000000-0000-0000-0000-000000000000","status":"Idle","position":2,"responsible":{"id":"00000000-0000-0000-0000-000000000000","type":"group"}}]}}}}}}}},"/workflow-jobs/{id}/upload":{"post":{"summary":"Upload a file to a workflow job","description":"To upload a file to a workflow job it needs to be uploaded via the Upload file endpoint for modern stack. After completing the various steps described in the Upload file endpoint, the `fileId` retrieved from those steps is needed in this request to reference the file to the job. This file will be attached to the job only.\n**Warning:** Requires the **JOBEDIT** security role.\n**Warning:** Is only available for Files-Service portals.\n","tags":["File upload"],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of a Job.","schema":{"type":"string","example":"00000000-0000-0000-0000-000000000000"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string","description":"Id of the file to be saved to the job (to be retrieved from Upload file endpoint)","example":"00000000-0000-0000-0000-000000000001"},"name":{"type":"string","description":"Value to be used as filename","example":"example-name.jpg"},"fileSize":{"type":"number","description":"Size of the file in bytes","example":50000},"assetId":{"type":"string","description":"Id of the parent asset if this file is a new version of an asset","example":"00000000-0000-0000-0000-000000000002"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"mediaId":{"type":"string","description":"Media ID of the uploaded file","example":"00000000000000000000000000000000"}}}}}}}}},"/api/workflow/jobs/{id}/finish":{"patch":{"summary":"Finish job","description":"Requires the JOBAPPROVE security role.","tags":["Finish"],"security":[{"permanentToken":["JOBAPPROVE"]},{"OAuth2":["JOBAPPROVE"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"00000000-0000-0000-0000-000000000000"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"Finished"},"job_id":{"type":"string","example":"00000000-0000-0000-0000-000000000000"}}}}}},"responses":{"200":{"description":"Ok: Job finished successfully\n","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"Finished"},"job_id":{"type":"string","example":"00000000-0000-0000-0000-000000000000"}}},"examples":{"example-1":{"value":{"status":"Finished","job_id":"00000000-0000-0000-0000-000000000000"}}}}}},"403":{"description":"Forbidden: The user does not have the required permissions for this operation.\n","content":{"application/json":{"schema":{"type":"object"},"examples":{"example-1":{"value":{}}}}}},"409":{"description":"Conflict: The job is not open (has been finished), the activeStage.status is Approved. Or the job is not on the last stage.\n","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"Job already finished."},"message":{"type":"string","example":"Re-open the job to finish again."}}},"examples":{"example-1":{"value":{"status":"Job already finished.","message":"Re-open the job to finish again."}},"example-2":{"value":{"status":"Job not on last stage.","message":"Advance the job 00000000-0000-0000-0000-000000000000 to the last stage to finish."}}}}}}}}}},"components":{"securitySchemes":{"permanentToken":{"type":"apiKey","in":"header","name":"Authorization"},"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://{your-bynder-domain}/v6/authentication/oauth2/token","scopes":{"PRESETOVERVIEW":"","JOBOVERVIEW":"","CAMPAIGNOVERVIEW":"","JOBADD":"","JOBEDIT":"","JOBAPPROVE":"","JOBREMOVE":""}},"authorizationCode":{"authorizationUrl":"https://{your-auth-url}","tokenUrl":"https://{your-bynder-domain}/v6/authentication/oauth2/token","scopes":{"PRESETOVERVIEW":"","JOBOVERVIEW":"","CAMPAIGNOVERVIEW":"","JOBADD":"","JOBEDIT":"","JOBAPPROVE":"","JOBREMOVE":""}}}}}}}