Add subscription renewal change request ======================================= Creates a subscription renewal change request for a customer account. The request is processed asynchronously and can be used, for example, for bulk updates of renewal settings. Prerequisites ^^^^^^^^^^^^^ - Credentials as described in :doc:`/getting-started/authentication` - A customer account (organization) identifier the caller has access to - The change request type and the job data matching that type C# ^^ To add a subscription renewal change request, first create an instance of **CrayonApiClient** and get the token using **CrayonApiClient** instance. Then call **SubscriptionRenewalChangeRequests.AddAsync()** method by passing the token and the change request. .. code-block:: c# :emphasize-lines: 12 var client = new CrayonApiClient("https://api.crayon.com/"); var token = client.Tokens.GetUserToken(clientId, clientSecret, userName, password).GetData().AccessToken; var request = new SubscriptionRenewalChangeRequestDto { CustomerAccountId = , ChangeRequestType = SubscriptionRenewalChangeRequestType.RenewalQuantityServiceBulkUpdate, JobData = }; var result = await client.SubscriptionRenewalChangeRequests.AddAsync(token, request); Request ^^^^^^^ Request Syntax: +---------+----------------------------------------------------------------------+ | Method | Request URI | +=========+======================================================================+ | POST | *https://api.crayon.com/api/v1/subscriptionrenewalchangerequest/* | +---------+----------------------------------------------------------------------+ 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 Body: +---------------------+----------------------------------------+---------------------------------------------------------------+ | Name | Type | Description | +=====================+========================================+===============================================================+ | CustomerAccountId | int | Required. Identifier of the organization the request is for. | +---------------------+----------------------------------------+---------------------------------------------------------------+ | ChangeRequestType | SubscriptionRenewalChangeRequestType | Required. The type of change to perform. | +---------------------+----------------------------------------+---------------------------------------------------------------+ | JobData | object | Required. The data for the job. The shape depends on the | | | | change request type. | +---------------------+----------------------------------------+---------------------------------------------------------------+ | ChangedBy | string | Optional. Who requested the change. | +---------------------+----------------------------------------+---------------------------------------------------------------+ The remaining properties (**Id**, **InstanceId**, **CreatedDate**, **ModifiedDate**, **EndedDate**, **Status**) are passed through as provided. **UserId** is always replaced by the identifier of the calling user. Change request types: +--------------------------------------------+-------+ | Name | Value | +============================================+=======+ | ExtendedServiceTermCancellation | 0 | +--------------------------------------------+-------+ | RenewalQuantityServiceBulkUpdate | 1 | +--------------------------------------------+-------+ | ResellerCustomerRenewalPolicyBulkUpdate | 2 | +--------------------------------------------+-------+ | ResellerCustomerTermBulkUpdate | 3 | +--------------------------------------------+-------+ | ResellerCustomerEndDateAlignmentBulkUpdate | 4 | +--------------------------------------------+-------+ | RenewalChangeConfiguration | 5 | +--------------------------------------------+-------+ Request Example: :: POST "https://api.crayon.com/api/v1/subscriptionrenewalchangerequest/" Accept : application/json Content-Type: application/json Authorization : Bearer < Token > Request Body Example: .. literalinclude:: /resources/_static/SubscriptionRenewalChangeRequest.json :language: json Response ^^^^^^^^ If successful, this method returns the created subscription renewal change request in the response body. Response success and error codes: +-------------+--------------------------------------------------------------------+ | Code | Description | +=============+====================================================================+ | 200 | OK. The change request was created. | +-------------+--------------------------------------------------------------------+ | 401 | Unauthorized. The token is missing or invalid. | +-------------+--------------------------------------------------------------------+ | 403 | Forbidden. The caller has no access to the organization. | +-------------+--------------------------------------------------------------------+