Cancel Invitation

  • Description

    Cancel test invitations send to candidate
  • URL structure

    https://api.interviewmocha.com/v2/org/testinvitation/{testInvitationId}/cancel

  • Request Method

    GET

  • Request Data

    Request URL Parameters
    Parameter Description Default Data Type Is Mandatory
    testInvitationId testInvitationId associated with candidate giving particular test None Int64 Yes
    testId Test Id associated with particular test None Int64 Yes
  • Response Data

    Parameters
    Argument Name Description Return Data Type
    statuscode Status code returned with every response. String
    description Status code message. String
    result Wrapper object Object
    result.testInvitationId Cancelled test invitation id Long
    result.status Status of invitation String
  • Sample Code

    Example Curl request will look like this:

    curl -i -H "x-api-key:YOUR_API_KEY_HERE" -H "content-type:application/json;charset=utf-8" -X GET https://api.interviewmocha.com/v2/org/testinvitation/12457893/cancel

    Sample response:
    For Failed requests:
     {
        "statuscode": "403.4",
        "description": "Operation on resource cannot be performed",
        "result": "Test Invitation cannot be cancelled if test is in progress/completed"
    }
    For successful requests:
     {
        "statuscode": "200.1",
        "description": "The request has succeeded.",
        "result": {
        "testInvitationId": 288881,
        "status": "cancelled"
        }
    }