/config

PUT /config/callback 1092 (ready) Set callback parameters for account
This request requires authentication headers to be set. See HTTP Headers below.
It is possible to initiate a POST callback request from MrClipping to any URL when Job moves through statuses. This info could be provided in a callback: {jobid} {status} {datechanged} Set callback parameters for account: "NotifyUrl" callback URL that will be used to send POST request "NotifyStatuses" - list of statuses that will initiate callback request whenever job enters them. "NotifyAllStatuses" - when set to 'true' will override "NotifyStatuses" and initiate callback request whenever job enter ANY status Valid "NotifyUrl" is required. Either "NotifyStatuses" or "NotifyAllStatuses" is required. Successful response will be returned in case if callback URL and at least one valid status are registered for account
The following values for Content-Type are accepted: application/x-www-form-urlencoded, application/json.
When Content-Type is any other value, 415 Unsupported Media Type is returned.
The response of this request has a Content-Type of application/json.
Any request should supply an Accept header explicitly accepting this Content-Type, e.g. Accept: application/json.
When an Accept header is missing, or it has another value, 406 Not Acceptable is returned.

HTTP Headers

Name Type Required Default value Description
X-Client-Token string true The token identifying the client of the API
X-Session-Token string true The token identifying the session of the current user

Request body Parameters

Name Type Required Default value Description Example(s)
notifyUrl string true Url to notify http://www.TestPoort80Test.fr/{jobid}?status={status}&date={datechanged}
notifyAllStatuses boolean false false Notify in all statuses true, false
notifyStatuses string false Notify in these statuses [ 'CJ_NEW', 'CJ_NOTIFIED_WORK_DN' ]

Errors

The following 400 Bad Request errors can be expected, and should be handled by the developer:

Code Message Example
missing_header A required header was not supplied
{
  "code": "missing_header",
  "message": "A required header was not supplied.",
  "headerName": "X-Client-Token"
}
invalid_json The request body could not be parsed.
{
  "code": "invalid_json",
  "message": "The request body could not be parsed."
}
missing_parameter A required parameter was not supplied
{
  "code": "missing_parameter",
  "message": "A required parameter was not supplied.",
  "parameterName": "email"
}
invalid_parameter A parameter was not in the right format
{
  "code": "invalid_parameter",
  "message": "A parameter was not in the right format.",
  "parameterName": "email",
  "parameterValue": "foo@example"
}

Status Codes

200 OK
The resource has been updated
400 Bad Request
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications
401 Unauthorized
The request requires user authentication
403 Forbidden
The client has no permission to access the resource
404 Not Found
The resource was not found
406 Not Acceptable
The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request
408 Request Timeout
The request timed out
410 Gone
The requested resource is no longer available and will not be available again
411 Length Required
The request did not specify the length of its content, which is required by the requested resource
415 Unsupported Media Type
The Content-Type of the request is not supported. Supported are 'application/x-www-form-urlencoded' and 'application/json'
500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request
503 Service Unavailable
The server is currently unavailable (because it is overloaded or down for maintenance)
DELETE /config/callback 1093 (ready) Delete callback parameters for account
This request requires authentication headers to be set. See HTTP Headers below.
Completely removes any callback parameters for account. No notification will be raised for this account until new callback parameters specified
The response of this request has a Content-Type of application/json.
Any request should supply an Accept header explicitly accepting this Content-Type, e.g. Accept: application/json.
When an Accept header is missing, or it has another value, 406 Not Acceptable is returned.

HTTP Headers

Name Type Required Default value Description
X-Client-Token string true The token identifying the client of the API
X-Session-Token string true The token identifying the session of the current user

Errors

The following 400 Bad Request errors can be expected, and should be handled by the developer:

Code Message Example
missing_header A required header was not supplied
{
  "code": "missing_header",
  "message": "A required header was not supplied.",
  "headerName": "X-Client-Token"
}

Status Codes

204 No Content
The resource has been deleted
400 Bad Request
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications
401 Unauthorized
The request requires user authentication
403 Forbidden
The client has no permission to access the resource
404 Not Found
The resource was not found
406 Not Acceptable
The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request
408 Request Timeout
The request timed out
410 Gone
The requested resource is no longer available and will not be available again
500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request
503 Service Unavailable
The server is currently unavailable (because it is overloaded or down for maintenance)
GET /config/jobstatuses 1094 (ready) Get job statuses
This request requires authentication headers to be set. See HTTP Headers below.
Get job statuses with descriptions translated to Account language
The response of this request has a Content-Type of application/json.
Any request should supply an Accept header explicitly accepting this Content-Type, e.g. Accept: application/json.
When an Accept header is missing, or it has another value, 406 Not Acceptable is returned.

HTTP Headers

Name Type Required Default value Description
X-Client-Token string true The token identifying the client of the API
X-Session-Token string true The token identifying the session of the current user

Example response

{
  "statuses": [
    {
      "code": "CJ_ARCHIVED",
      "name": "Job is completed"
    },
    {
      "code": "CJ_FINISHED",
      "name": "Job is completed"
    },
    {
      "code": "CJ_JOB_PAID",
      "name": "Work is in progress"
    },
    {
      "code": "CJ_PREPROCESS",
      "name": "Work is in progress"
    },
    {
      "code": "CJ_REJECT_ERROR",
      "name": "Rejected jobs"
    },
    {
      "code": "CJ_REJECT_READY",
      "name": "Rejected jobs"
    },
    {
      "code": "CJ_REVIEWING",
      "name": "Job is being reviewed"
    },
    {
      "code": "CJ_WORK_PROGRESS",
      "name": "Work is in progress"
    }
  ]
}

Errors

The following 400 Bad Request errors can be expected, and should be handled by the developer:

Code Message Example
missing_header A required header was not supplied
{
  "code": "missing_header",
  "message": "A required header was not supplied.",
  "headerName": "X-Client-Token"
}

Status Codes

200 OK
The resource was found
400 Bad Request
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications
401 Unauthorized
The request requires user authentication
403 Forbidden
The client has no permission to access the resource
404 Not Found
The resource was not found
406 Not Acceptable
The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request
408 Request Timeout
The request timed out
410 Gone
The requested resource is no longer available and will not be available again
500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request
503 Service Unavailable
The server is currently unavailable (because it is overloaded or down for maintenance)