Zuplo
The Zuplo Developer API, powered by Zuplo

Metering - Plans

Endpoint:https://dev.zuplo.com

API Metering plan management


Lists plans

GET
https://dev.zuplo.com
/v1/metering/{bucketId}/plans

Lists all plans belonging to this bucket.

Lists planspath Parameters

  • bucketIdstring · required

    The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.

Lists plansResponses

The request has succeeded.

  • dataobject[] · required
  • limitinteger · uint32
    Example: 1000
  • offsetinteger · uint32
    Example: 0
  • totalinteger · uint32

Creates a plan

POST
https://dev.zuplo.com
/v1/metering/{bucketId}/plans

Creates a new plan for this bucket.

Creates a planpath Parameters

  • bucketIdstring · required

    The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.

Creates a planRequest Body

  • labelstring · required
    Example: Basic Subscription Plan
  • planExternalIdstring · required
    Example: prod_Pbyd5ARBWtFxkg
  • metersobject · required
    Example: {"requests":{"label":"Requests","max":10}}
  • trialDaysinteger
    Example: 10
  • trialEndStatusstring · enum
    Enum values:
    paused
    canceled
    Example: paused
  • isTrialCollectPaymentboolean

Creates a planResponses

The request has succeeded.

  • createdOnstring · date-time · readOnly · required

    When the item was created.

    Example: 2023-04-18T05:54:34.408Z
  • updatedOnstring · date-time · readOnly · required

    When the item was last updated.

    Example: 2023-04-20T05:54:34.408Z
  • idstring · readOnly · required
    Example: plan_40dRwJecUOu9xDj2OeXDcYA5
  • hasSubscriptionsboolean · readOnly · required
    Example: true
  • labelstring · required
    Example: Basic Subscription Plan
  • planExternalIdstring · required
    Example: prod_Pbyd5ARBWtFxkg
  • metersobject · required
    Example: {"requests":{"label":"Requests","max":10}}
  • trialDaysinteger
    Example: 10
  • trialEndStatusstring · enum
    Enum values:
    paused
    canceled
    Example: paused
  • isTrialCollectPaymentboolean

Gets a plan

GET
https://dev.zuplo.com
/v1/metering/{bucketId}/plans/{planId}

Returns the details for a plan.

Gets a planpath Parameters

  • bucketIdstring · required

    The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.

  • planIdstring · required

    The id of the plan.

Gets a planResponses

The request has succeeded.

  • createdOnstring · date-time · readOnly · required

    When the item was created.

    Example: 2023-04-18T05:54:34.408Z
  • updatedOnstring · date-time · readOnly · required

    When the item was last updated.

    Example: 2023-04-20T05:54:34.408Z
  • idstring · readOnly · required
    Example: plan_40dRwJecUOu9xDj2OeXDcYA5
  • hasSubscriptionsboolean · readOnly · required
    Example: true
  • labelstring · required
    Example: Basic Subscription Plan
  • planExternalIdstring · required
    Example: prod_Pbyd5ARBWtFxkg
  • metersobject · required
    Example: {"requests":{"label":"Requests","max":10}}
  • trialDaysinteger
    Example: 10
  • trialEndStatusstring · enum
    Enum values:
    paused
    canceled
    Example: paused
  • isTrialCollectPaymentboolean

Deletes a plan

DELETE
https://dev.zuplo.com
/v1/metering/{bucketId}/plans/{planId}

Deletes a plan (if there are no associated subscriptions)

Deletes a planpath Parameters

  • bucketIdstring · required

    The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.

  • planIdstring · required

    The id of the plan.

Deletes a planResponses

There is no content to send for this request, but the headers may be useful.

No data returned

Updates a plan

PATCH
https://dev.zuplo.com
/v1/metering/{bucketId}/plans/{planId}

Update the details for a plan

Updates a planpath Parameters

  • bucketIdstring · required

    The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.

  • planIdstring · required

    The id of the plan.

Updates a planRequest Body

  • labelstring
    Example: Basic Subscription Plan
  • planExternalIdstring
    Example: prod_Pbyd5ARBWtFxkg
  • metersobject
    Example: {"requests":{"label":"Requests","max":10}}
  • trialDaysinteger
    Example: 10
  • trialEndStatusstring · enum
    Enum values:
    paused
    canceled
    Example: paused
  • isTrialCollectPaymentboolean

Updates a planResponses

The request has succeeded.

  • createdOnstring · date-time · readOnly · required

    When the item was created.

    Example: 2023-04-18T05:54:34.408Z
  • updatedOnstring · date-time · readOnly · required

    When the item was last updated.

    Example: 2023-04-20T05:54:34.408Z
  • idstring · readOnly · required
    Example: plan_40dRwJecUOu9xDj2OeXDcYA5
  • hasSubscriptionsboolean · readOnly · required
    Example: true
  • labelstring · required
    Example: Basic Subscription Plan
  • planExternalIdstring · required
    Example: prod_Pbyd5ARBWtFxkg
  • metersobject · required
    Example: {"requests":{"label":"Requests","max":10}}
  • trialDaysinteger
    Example: 10
  • trialEndStatusstring · enum
    Enum values:
    paused
    canceled
    Example: paused
  • isTrialCollectPaymentboolean