younifyd
Menu

Create Subscription State

Create a subscription state

POST/v2/subscriptions/subscriptions/{subscription_uuid}/states

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Create Subscription State action (under Subscriptions).
  3. Fill in the fields below, then reference the result from later steps as {{createSubscriptionState.response.data}}.

Request

Path parameters

subscription_uuidstring (uuid)required

The unique identifier of the subscription.

Request body

Enter the body as JSON in the step's Body field.

dataobjectrequired
typestringrequired

This represents the type of resource object being returned. Always `subscription_state`.

One ofsubscription_state

attributesobjectrequired2 fields
json
{
  "data": {
    "type": "subscription_state",
    "attributes": {
      "action": "cancel",
      "cancel_immediately": false
    }
  }
}

Response

Returns 204 with a any. Read it in later steps with {{createSubscriptionState.response.data.<field>}}.

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.

Create Subscription State — Elastic Path — Documentation