v1

latestOpenAPI 3.0.3Apache 2.02026-07-13121230447.8 KB
Accounts

Dissociate or associate a price plan with an account

This API let’s you to detach or attach a price plan with an existing account

post/accounts/{account_id}/price_plans

Path parameters

account_idstring required
Example:ACC00001

account_id corresponding to an account

Request body

mode'ASSOCIATE' | 'DISASSOCIATE'

Mode of request to create dis/association

pricePlanIdstring

Id of the price plan if association request

effectiveFromstring date required

Date of effectiveness of the association. The date is expected in YYYY-MM-DD format

  • Editing of a BILLING plan with deferredRevenue can be achieved with effectiveFrom as start date of current cycle or using retainStartOffset option.
effectiveUntilstring date required

Date until which the association must be effective. The date is expected in YYYY-MM-DD format

retainStartOffsetsboolean

If this flag is true, current pricing cycle of the account on the date of association will continue rather than the configurations of the newly associated price plan. Pricing cycle overrides specified using pricePlanDetailsOverride will take precedence over the pricing cycle configurations of the new price plan that the account needs to migrate to. PricingCycleInterval of the existing plan and the new plan must be same for this to work. We'll return a 400 BadRequest otherwise. Examples:

  • Ongoing plan (1st Oct to 30th Oct) - {dayOffset: 1, monthOffset: NIL} New association (15th Oct to 15th Nov) of different price plan with retainStartOffsets option true will use the same pricing cycle configuration {dayOffset: 1, monthOffset: NIL} rather than using the pricing cycle configuration of the new price plan that the account needs to migrate to.
  • Ongoing plan (1st Oct to 30th Oct) - {dayOffset: 1, monthOffset: NIL} New association (1st Nov to 30th Nov) of different price plan with retainStartOffsets option true will throw a 400 BadRequest as no existing price plan configuration found on date of association

Response

Response for dis/associate price plan request

accountIdstring required

Identifier of the account

accountNamestring required

Name of the Account