Check if a subscription renewal change request is running ========================================================= Returns the status of change requests of a given type for an organization, including whether one is currently running. Prerequisites ^^^^^^^^^^^^^ - Credentials as described in :doc:`/getting-started/authentication` - An organization identifier the caller has access to C# ^^ To check if a change request is running, first create an instance of **CrayonApiClient** and get the token using **CrayonApiClient** instance. Then call **SubscriptionRenewalChangeRequests.IsRunningAsync()** method by passing the token, the organization id and, optionally, the change request type. If the type is omitted, **ExtendedServiceTermCancellation** is used. .. code-block:: c# :emphasize-lines: 5 var organizationId = ; var client = new CrayonApiClient("https://api.crayon.com/"); var token = client.Tokens.GetUserToken(clientId, clientSecret, userName, password).GetData().AccessToken; var result = await client.SubscriptionRenewalChangeRequests.IsRunningAsync(token, organizationId, SubscriptionRenewalChangeRequestType.RenewalQuantityServiceBulkUpdate); Request ^^^^^^^ Request Syntax: +---------+------------------------------------------------------------------------------------------------------------------------+ | Method | Request URI | +=========+========================================================================================================================+ | GET | *https://api.crayon.com/api/v1/organizations/{organizationId}/change-requests/status?changeRequestType={type}* | +---------+------------------------------------------------------------------------------------------------------------------------+ Request Parameters: +------------------+--------------------------------------+---------------------------------------------------------------+ | Name | Type | Description | +==================+======================================+===============================================================+ | organizationId | int | Required. Identifier of the organization (route parameter). | +------------------+--------------------------------------+---------------------------------------------------------------+ | changeRequestType| SubscriptionRenewalChangeRequestType | Optional (query parameter). Defaults to | | | | ExtendedServiceTermCancellation (0). | +------------------+--------------------------------------+---------------------------------------------------------------+ Request Headers: The following HTTP request headers are supported +------------------+----------------+-----------------------------------------------------------------+ | Header | Type | Description | +==================+================+=================================================================+ | Authorization | string | Required. The authorization token in the form Bearer . | +------------------+----------------+-----------------------------------------------------------------+ | Accept | string | Specifies the request and response type, "application/json". | +------------------+----------------+-----------------------------------------------------------------+ | Content-Type | string | Specifies the media type of the resource, "application/json". | +------------------+----------------+-----------------------------------------------------------------+ Request Example: :: GET "https://api.crayon.com/api/v1/organizations/1234/change-requests/status?changeRequestType=1" Accept : application/json Content-Type: application/json Authorization : Bearer < Token > Response ^^^^^^^^ If successful, this method returns a status object in the response body. ``isRunning`` set to ``true`` means a change request of the given type is running for the organization. Response properties: +-------------------+--------------------------------------+---------------------------------------------------------------+ | Name | Type | Description | +===================+======================================+===============================================================+ | organizationId | int | Identifier of the organization. | +-------------------+--------------------------------------+---------------------------------------------------------------+ | changeRequestType | SubscriptionRenewalChangeRequestType | The change request type that was checked. | +-------------------+--------------------------------------+---------------------------------------------------------------+ | isRunning | bool | True if a change request of this type is currently running. | +-------------------+--------------------------------------+---------------------------------------------------------------+ Response example: :: { "organizationId": 1234, "changeRequestType": 1, "isRunning": true } Response success and error codes: +-------------+--------------------------------------------------------------------+ | Code | Description | +=============+====================================================================+ | 200 | OK. | +-------------+--------------------------------------------------------------------+ | 401 | Unauthorized. The token is missing or invalid. | +-------------+--------------------------------------------------------------------+ | 403 | Forbidden. The caller has no access to the organization. | +-------------+--------------------------------------------------------------------+