Products API Calls

These are the methods for working with Products in MyFreestone®. Products, also known as Medium Topics, belong to a Topic.

Methods and Examples

Get a Product

Get a specific Product by ID.

Method/URL

GET https://api.myfreestone.com/product/{id}

Parameters

(int) customer_id - Optionally return the product price for the specified customer

Return [status]

(object) - A Product object [200]

Create a Product

Create a new Product with the supplied parameters.

Method/URL

POST https://api.myfreestone.com/product/

Authentication Level

20

Parameters

(int) topic_id (required) - The topic that the Product belongs to
(int) medium_id (required) - The Product's Medium type
(float) token_value - If purchasable via Subscription, the token value of the Product
(string) provider_product_code - An external identification string for the Product
(string) name_override - An alternate name to display instead of the Medium name
(array) pricing - An array of key-value pairs; keys can be 'full', 'member', or 'level'
(string) external_id - An external ID used for catalog sync integrations

Return [status]

(object) - The newly created Product object [201]

Update a Product

Update an existing Product with the supplied parameters.

Method/URL

PUT https://api.myfreestone.com/product/{id}

Authentication Level

20

Parameters

(float) token_value - If purchasable via Subscription, the token value of the Product
(string) provider_product_code - An external identification string for the Product
(string) name_override - An alternate name to display instead of the Medium name
(array) pricing - An array of key-value pairs; keys can be 'full', 'member', or 'level'
(string) external_id - An external ID used for catalog sync integrations

Return [status]

(null) - [204]

Delete a Product

Remove a Product from its associated Topic

Method/URL

DELETE https://api.myfreestone.com/product/{id}

Authentication Level

20

Return [status]

(null) - [204]

Search Provider Provider Product Codes

Get a selection of Product Objects by matching searched provider product code field

Method/URL

GET https://api.myfreestone.com/product/search_provider_product_code/{search term}

Parameters

(int) limit - The number of results to retrieve. Default of 10. Maximum of 100.
(int) offset - The offset of the first result to retrieve.

Return [status]

(array) - An array of product objects matching the searched fields [200]

Get a Product by External ID

Get a specific Product by their external ID.

Method/URL

GET https://api.myfreestone.com/product/by_external_id/{external_id}

Parameters

(int) topic_id (required) - The topic that the Product belongs to

Return [status]

(object) - A Product object [200]

Get Products

Get Product by Products IDs.

Method/URL

GET https://api.myfreestone.com/product/products

Parameters

(array) medium_topic_ids (required) - An array of medium topic IDs.

Return [status]

(array) - An array of Product objects [200]