Learn more about Pliro's API endpoints and how to use them.
This page lists all API endpoints sectioned by object type. You can set the following variables in your shell to allow copying and pasting the examples below:
PLIRO_API_BASE_URL=https://api.plirotest.com# Or api.pliro.co when working with production data.PLIRO_API_KEY=example-api-key# View and manage API keys in the Pliro Dashboard.
Members
Members replace customers as the representation of your publication's potential, current, and past subscribers.
emailstring Required conditionally
The customer's email address. Required unless activation_code is provided.
namestring
The customer's full name.
activation_codestring
A code that can be used to add an email address to this customer via the customer activation flow. Must be unique and at least eight characters long.
Subscriptions allow charging customers on a recurring basis.
The subscription object
Properties
idstring
A unique identifier for this subscription.
statusstring
Possible values are active and canceled.
customer_id string
The ID of the customer who owns this subscription.
plan_id string
The ID of the plan that this subscription is for.
price_id nullable string
The ID of the price that dictates the cost and recurrence interval of this subscription.
complimentaryboolean
Whether or not this subscription is provided to the customer free of charge. If complimentary is true, then price_id will be null.
Create a subscription
Parameters
customer_idstring Required
The ID of the customer who should own this subscription.
plan_idstring Required
The ID of the plan that this subscription should be for.
price_idstring Required conditionally
The ID of the price that should dictate the cost and recurrence interval of this subscription. Required unless complimentary is true.
complimentaryboolean
Whether or not this subscription should be provided to the customer free of charge. This parameter defaults to false. If complimentary is true, then price_id must be null.