Skip to main content
POST
/
subscriptions
/
{subscriptionId}
/
update
/
Update a subscription
curl --request POST \
  --url https://api.paritydeals.com/api/v1/subscriptions/{subscriptionId}/update/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "planIdentifier": "new_plan_enterprise",
  "chargePeriod": "YEARLY",
  "offeringId": "e4567-e89b-12d3-a456-426614174000",
  "pricingTableId": "e4567-e89b-12d3-a456-426614174001",
  "ruleId": "e4567-e89b-12d3-a456-426614174002",
  "ipAddress": "103.154.35.20",
  "features": [
    {
      "identifier": "seats",
      "quantity": 10
    }
  ]
}'
{
  "subscriptionId": "dffaf07e-4517-47db-ba3a-59a05aa2d465"
}

Authorizations

Authorization
string
header
required

The Server API Key obtained from the ParityDeals application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'

Path Parameters

subscriptionId
string<uuid>
required

The unique identifier of the subscription to be updated. Example UUID from docs: 78058918-9746-4280-9b9b-1bd5115eec6e

Body

application/json
planIdentifier
string
required

The identifier of the new plan.

Example:

"new_plan_enterprise"

chargePeriod
enum<string>
required

The new charging period for the subscription.

Available options:
ONE_TIME,
MONTHLY,
YEARLY,
WEEKLY,
DAILY,
THREE_MONTHS,
SIX_MONTHS
Example:

"YEARLY"

offeringId
string<uuid> | null

The ID of the new offering, if applicable.

Example:

"e4567-e89b-12d3-a456-426614174000"

pricingTableId
string<uuid> | null

The ID of the new pricingTable, if applicable.

Example:

"e4567-e89b-12d3-a456-426614174001"

ruleId
string<uuid> | null

The ID of the new pricing rule, if applicable.

Example:

"e4567-e89b-12d3-a456-426614174002"

ipAddress
string | null

The IP Address of the customer, for location-based pricing.

Example:

"103.154.35.20"

features
object[] | null

List of features and quantities to update for the subscription.

Example:
[{ "identifier": "seats", "quantity": 10 }]

Response

200 - application/json

UUID of the updated subscription

subscriptionId
string
Example:

"dffaf07e-4517-47db-ba3a-59a05aa2d465"

I