Inputs

Inputs are used as arguments for your mutation operations. They are a type of object which define a set of fields, which in turn can either be Scalars, Enums, or other input objects.

CreateUserInput

Fields

NameTypeString

id

The id which you want to assign to identify the user.

billingId

The id of the user which identifies them to be charged for their subscriptions. This will often be the id given by your payment provider (ie. Stripe, Chargebee, etc).

name

The name of the user.

email

The email of the user.

metadata

UpdateUserInput

How can I update the email or billingId of a user?

You will need to do this through a CSV Import within our Dashboard. We'll soon make this possible through the API.

Fields

NameTypeString

id

The new id which you want to assign to identify the user.

name

The name of the user.

metadata

CreateUsageEventInput

Fields

userId

featureId

delta

action

Specify how you want the usage of the feature to be recorded. Can be ADD (to add to existing usage amount) or SET (to override the existing usage amount). Defaults to ADD.

CreateFeatureInput

Fields

NameTypeString

id

The id which you want to assign to identify the feature.

name

The name of the feature.

type

The type of the feature. Either BINARY or CONSUMABLE.

unitLabel

The name of the consumable unit (eg. Message, API Call, etc). Only necessary if type is CONSUMABLE.

unitLabelPlural

The pluralised name of the consumable unit (eg. Messages, API Calls, etc). Only necessary if type is CONSUMABLE.

metadata

UpdateFeatureInput

How do I update the type of feature?

It is not possible to update the type of feature once it has been initially set. You would need to create a new feature altogether.

Fields

NameTypeString

name

The name of the feature.

unitLabel

The name of the consumable unit (eg. Message, API Call, etc). Only necessary if type is CONSUMABLE.

unitLabelPlural

The pluralised name of the consumable unit (eg. Messages, API Calls, etc). Only necessary if type is CONSUMABLE.

metadata

CreatePackageInput

How do I add prices to my packages and/or features within?

You will currently need to use the Dashboard to add any billing templates and prices to packages and respective features within. We are currently looking into how to best achieve this through the API.

Fields

NameTypeString

id

The id which you want to assign to identify the package.

name

The name of the package.

isAddon

Represents whether the package is an add-on (true) or a base package (false). Defaults to false.

features

A list of the features which will be added to the package.

metadata

CreatePackageFeatureInput

Fields

NameTypeString

id

entitlement

The entitlement which a user would have for this consumable feature. Only necessary if the feature has a type of CONSUMABLE.

EntitlementInput

Fields

NameTypeString

limit

Indicates the amount of the feature given to the user (ie. “500”). If not provided, the amount will be unlimited.

resetPeriod

Indicates the period by which the limit will reset (ie. MONTH).

overageEnabled

Flags whether a user can run over the limit (true) or if it should be a hard limit that prevents usage (false). Defaults to false.

UpdatePackageInput

For larger changes beyond adding metadata, you should use the Dashboard to update existing packages. We are currently looking into how to best achieve this through the API.

Fields

NameTypeString

metadata

Last updated