Accept Enrollment File

This operation sets the status of an enrollment file to ACCEPTED and releases all policies that are linked to the enrollment file for further processing.

This operation is available on any enrollment file that has the status IN REVIEW.

Accepting an enrollment file is a long running operation, initiated by a HTTP POST request to api-context-root/enrollmentfiles/<id>/accept. Long-Running Operations Through REST are described in the development guide.

If the enrollment file already has the status ACCEPTED or REJECTED, this operation has no effect. Otherwise:

  • The enrollment file status is set to ACCEPTED

  • All policies linked to the enrollment file that have the status PENDING FILE REVIEW are submitted for further processing, continuing with the next process step.

Resource Representation

Resource representation of an enrollment file that can be accepted:

{
  ... enrollment file properties ...
  "links": [
    {
      "href": "http://<host>:<port>/[api-context-root]/generic/enrollmentfiles/<id>",
      "rel": "self"
    },
    {
      "href": "http://<host>:<port>/[api-context-root]/enrollmentfiles/<id>/accept",
      "rel": "enrollmentfile:accept"
      "httpMethod": "POST"
    }
  ]
}

Response Messages

This operation provides HTTP status codes as defined in Response Messages. When the system accepts the request , status 201 and location header "api-context-root/enrollmentfiles/<enrollment file id>/operationstatus"

GET on api-context-root/enrollmentfiles/<id>/operationstatus returns the following response in case of success

   {
    "workId": " activity id",
    "status": "Success",
    "links": [
        {
            "rel": "operator",
            "href": "link to activity",
            "httpMethod": "GET"
        },
        {
            "rel": "self",
            "href": "http://<host>:<port>/[api-context-root]/generic/enrollmentfiles/<file id>/operationstatus",
            "httpMethod": "GET"
        },
        {
            "rel": "operator:subject",
            "href": "http://<host>:<port>/[api-context-root]/generic/acceptenrollmentfiles/<LRO id>",
            "httpMethod": "GET"
        }
    ],
    "activityStatus": "CO",
    "type": "ACCEPT_ENROLLMENT_FILE",
    "level": "GL"
}

In case of failure, the following response is returned

  {

    "status": "Failure",
    "links": [
        {
            "rel": "operator:messages",
            "href": "Link to messages",
            "httpMethod": "GET"
        },
        {
            "rel": "operator:restart",
            "href": "http://<host>:<port>/[api-context-root]/activities/<activity id>/recover",
            "httpMethod": "POST"
        },
        {
            "rel": "operator",
            "href": "link to activity",
            "httpMethod": "GET"
        },
        {
            "rel": "self",
            "href": "http://<host>:<port>/[api-context-root]/generic/enrollmentfile/<>/operationstatus",
            "httpMethod": "GET"
        },
        {
            "rel": "operator:subject",
            "href": "http://<host>:<port>/[api-context-root]/generic/acceptenrollmentfiles/<LRO Id>",
            "httpMethod": "GET"
        }
    ],
    "activityStatus": "CT",
    "type": "ACCEPT_ENROLLMENT_FILE",
    "level": "GL"
}
IP api-context-root/enrollmentfiles/<file id>/operationstatus, return the processing status of latest accept or reject file operations.

If an error occurs, the appropriate HTTP status code is returned.

In addition, system also sends a notification upon completion of the long running process. For details on notification configuration and structure refer to Long-Running Operations Through REST.

The following operation specific error can occur:

Table 1. Response Messages
Code Severity Message Text

POL-HTTP-024

Fatal

This enrollment file has already been accepted or rejected.

Authorization

The above described operation is protected by access restriction accept enrollment file IP.