Skip to main content

Developer API (2.0.0)

Download OpenAPI specification:Download

Offering

Operations about offerings.

Get an offering

This endpoint requires the following permission(s): project_configuration:offerings:read. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

offering_id
required
string [ 1 .. 255 ] characters
Example: ofrnge1a2b3c4d5

ID of the offering

query Parameters
expand
Array of strings[ items [ 1 .. 5000 ] characters ]
Items Enum: "package" "package.product"
Example: expand=package

Specifies which fields in the response should be expanded. Accepted values are: package (requires project_configuration:packages:read permission), package.product (requires project_configuration:products:read permission).

Responses

Response samples

Content type
application/json
{
  • "state": "active",
  • "object": "offering",
  • "id": "ofrnge1a2b3c4d5",
  • "lookup_key": "default",
  • "display_name": "The standard set of packages",
  • "is_current": true,
  • "created_at": 1658399423658,
  • "project_id": "proj1ab2c3d4",
  • "paywall_id": "pw12345abcde",
  • "metadata": {
    },
  • "packages": {
    }
}

Update an offering

This endpoint requires the following permission(s): project_configuration:offerings:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

offering_id
required
string [ 1 .. 255 ] characters
Example: ofrnge1a2b3c4d5

ID of the offering

Request Body schema: application/json
required
display_name
string [ 1 .. 1500 ] characters

The display name of the offering

is_current
boolean

Indicates if the offering is the current offering

object or null (OfferingMetadata)

Custom metadata of the offering

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "display_name": "premium access to features",
  • "is_current": true,
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "state": "active",
  • "object": "offering",
  • "id": "ofrnge1a2b3c4d5",
  • "lookup_key": "default",
  • "display_name": "The standard set of packages",
  • "is_current": true,
  • "created_at": 1658399423658,
  • "project_id": "proj1ab2c3d4",
  • "paywall_id": "pw12345abcde",
  • "metadata": {
    },
  • "packages": {
    }
}

Delete an offering and its attached packages

This endpoint requires the following permission(s): project_configuration:offerings:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

offering_id
required
string [ 1 .. 255 ] characters
Example: ofrnge1a2b3c4d5

ID of the offering

Responses

Response samples

Content type
application/json
{
  • "object": "app",
  • "id": "string",
  • "deleted_at": 1658399423658
}

Archive an offering

Archives an offering (makes it inactive). This endpoint requires the following permission(s): project_configuration:offerings:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

offering_id
required
string [ 1 .. 255 ] characters
Example: ofrnge1a2b3c4d5

ID of the offering

Responses

Response samples

Content type
application/json
{
  • "state": "active",
  • "object": "offering",
  • "id": "ofrnge1a2b3c4d5",
  • "lookup_key": "default",
  • "display_name": "The standard set of packages",
  • "is_current": true,
  • "created_at": 1658399423658,
  • "project_id": "proj1ab2c3d4",
  • "paywall_id": "pw12345abcde",
  • "metadata": {
    },
  • "packages": {
    }
}

Unarchive an offering

Unarchives an offering (makes it active). This endpoint requires the following permission(s): project_configuration:offerings:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

offering_id
required
string [ 1 .. 255 ] characters
Example: ofrnge1a2b3c4d5

ID of the offering

Request Body schema: application/json
optional
unarchive_referenced_entities
boolean
Default: false

If true, also unarchive any archived products referenced by this offering's packages.

Responses

Request samples

Content type
application/json
{
  • "unarchive_referenced_entities": false
}

Response samples

Content type
application/json
{
  • "state": "active",
  • "object": "offering",
  • "id": "ofrnge1a2b3c4d5",
  • "lookup_key": "default",
  • "display_name": "The standard set of packages",
  • "is_current": true,
  • "created_at": 1658399423658,
  • "project_id": "proj1ab2c3d4",
  • "paywall_id": "pw12345abcde",
  • "metadata": {
    },
  • "packages": {
    }
}

Get a list of offerings

This endpoint requires the following permission(s): project_configuration:offerings:read. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

query Parameters
starting_after
string
Example: starting_after=ent12354

Pagination cursor. Pass the id of the last item from the previous page to fetch the next page; omit for the first page.

limit
integer
Default: 20
Example: limit=10

Maximum number of items to return per page. Values below 1 or above 100 are clamped to that range rather than rejected.

expand
Array of strings[ items [ 1 .. 5000 ] characters ]
Items Enum: "items.package" "items.package.product"
Example: expand=items.package

Specifies which fields in the response should be expanded. Accepted values are: items.package (requires project_configuration:packages:read permission), items.package.product (requires project_configuration:products:read permission).

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "items": [
    ],
  • "next_page": "/v2/projects/proj1ab2c3d4/offerings?starting_after=ofrngeab21da",
  • "url": "/v2/projects/proj1ab2c3d4/offerings"
}

Create an offering

This endpoint requires the following permission(s): project_configuration:offerings:read_write. This endpoint belongs to the Project Configuration domain, which has a default rate limit of 60 requests per minute.

Authorizations:
BearerAuth
path Parameters
project_id
required
string <= 255 characters
Example: proj1ab2c3d4

ID of the project

Request Body schema: application/json
required
lookup_key
required
string [ 1 .. 200 ] characters

The custom identifier of the offering

display_name
required
string [ 1 .. 1500 ] characters

The display_name of the offering

object or null (OfferingMetadata)

Custom metadata of the offering

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "lookup_key": "default",
  • "display_name": "The standard set of packages",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "state": "active",
  • "object": "offering",
  • "id": "ofrnge1a2b3c4d5",
  • "lookup_key": "default",
  • "display_name": "The standard set of packages",
  • "is_current": true,
  • "created_at": 1658399423658,
  • "project_id": "proj1ab2c3d4",
  • "paywall_id": "pw12345abcde",
  • "metadata": {
    },
  • "packages": {
    }
}