Get coterminosity dates =============================== Coterminosity is the capability to align new or renewed NCE seat subscriptions with the end date of active subscriptions or the end of the calendar month. You can use this endpoint to get the possible end dates to use during creating NCE seat orders or when scheduling next term instructions. .. warning:: V2 is improved endpoint for getting coterminosity dates. You can call legacy endpoint (https://api.crayon.com/api/v1/subscriptions/coterminosity) that has the same request and response payload, but it's considered **obsolete** and will be **removed** in the future. Request ^^^^^^^ Request Syntax: +---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Method | Request URI | +=========+===============================================================================================================================================================================================+ | GET | *https://api.crayon.com/api/v2/subscriptions/coterminosity?organizationId={organizationId}&customerTenantId={customerTenantId}&subscriptionId={subscriptionId}&termDuration={termDuration}* | +---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Request Parameters: +-------------------------+------------------------------------------+----------------+------------------------------------------------------------------------------------------------------------------------------------------+ | Name | Type | Required | Description | +=========================+==========================================+================+==========================================================================================================================================+ | OrganizationId | int | Yes | Identifier of the organization | +-------------------------+------------------------------------------+----------------+------------------------------------------------------------------------------------------------------------------------------------------+ | CustomerTenantId | int | Yes | Identifier of the customer tenant | +-------------------------+------------------------------------------+----------------+------------------------------------------------------------------------------------------------------------------------------------------+ | SubscriptionId | int | No | Identifier of the subscription. Applicable to the schedule next term instructions scenario | +-------------------------+------------------------------------------+----------------+------------------------------------------------------------------------------------------------------------------------------------------+ | TermDuration | string | Yes | An ISO 8601 representation of the term's duration. Supported values are: "P1M" for (1 month), "P1Y" for (1 year) and "P3Y" for (3 years).| +-------------------------+------------------------------------------+----------------+------------------------------------------------------------------------------------------------------------------------------------------+ Response ^^^^^^^^ If successful, the following json is returned in the response body.. .. literalinclude:: /scenarios/_static/CoterminositySubscriptionsResponse.json :language: json Response success and error codes: Each response comes with an HTTP status code that indicates success or failure and additional debugging information. Use a network trace tool to read this code, error type, and additional parameters. +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Error Codes | Description | +================================+===========================================================================================================================================================================================================================================================================================+ | 200 Ok | The request has succeeded. | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 400 Bad Request | The request could not be understood by the server due to malformed syntax, missing required properties, properties that couldn't be parsed according to their type (and length). It is a non-retryable error condition. The client should not repeat the request without modifications. | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 401 Unauthorized | The request requires user authentication. If the request already included Authorization credentials, then the 401 (Unauthorized) status code means that authorization has been refused for those credentials. It is a non-retryable error condition. | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 404 Not Found | The server has not found anything matching the request. | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+