Skip to content
Ford edited this page Aug 14, 2013 · 5 revisions

The SecondFunnel project provides an API for accessing the data. The API can be accessed by any logged in user or user with an API key, however, data can only be modified by staff of the store whose data is being accessed or a superuser.

On resources where filtering is enabled. Filtering takes place by weeding out all the content that does not match the conditions of the query; e.g. a query on products with store id = 28, will only return products whose store has id #28.

####GET /api/assets/v1/block_content Returns all BlockContent objects. No Authentication needed.

Query Required Number of Parameters Parameters
format yes 1 one of: json, xml, yaml, jsonp, html, plist

####GET/POST/PATCH/DELETE /api/assets/v1/store Returns all Store objects. Optionally filtered by a query. Authentication required (ApiKeyAuthentication not supported).

Query Required Number of Parameters Parameters
format yes 1 one of: json, xml, yaml, jsonp, html, plist
id no 1 id of the store (natural number)
name no 1 name of the store (valid string)

####GET/POST/PATCH/DELETE /api/assets/v1/product Returns all Product objects. Optionally filtered by a query. Authentication required (ApiKeyAuthentication not supported).

Query Required Number of Parameters Parameters
format yes 1 one of: json, xml, yaml, jsonp, html, plist
store no 1 id of a store (natural number)
id no 1 id of the product (natural number)
name no 1 name of the product (valid string)
name_or_url no 1 string that may appear in the name or url
available no 1 boolean

####GET/POST/PATCH/DELETE /api/assets/v1/product_media Returns all ProductMedia objects. Optionally filtered by a query. Authentication required (ApiKeyAuthentication not supported).

Query Required Number of Parameters Parameters
format yes 1 one of: json, xml, yaml, jsonp, html, plist
product no 1 id of a product (natural number)

####GET/POST/PATCH/DELETE /api/assets/v1/store_theme Returns all Store Themes. Optionally filtered by a query. Authentication required.

Additional urls:

/api/assets/v1/store_theme/STORE_NAME_OR_ID/

Query Required Number of Parameters Parameters
format yes 1 one of: json, xml, yaml, jsonp, html, plist
api_key yes 1 the api key
username yes 1 username associated with api key
store no 1 id of a store (natural number)
store_name no 1 name of a store (valid string)
name no 1 a string in the name of the theme

####GET/POST/PATCH/DELETE /api/assets/v1/campaign Returns all Campaign objects. Optionally filtered by a query. Authentication required.

Additional URLs:

/api/assets/v1/campaign/CAMPAIGN_NAME

/api/assets/v1/campaign/store/STORE_ID

Query Required Number of Parameters Parameters
format yes 1 one of: json, xml, yaml, jsonp, html, plist
api_key yes 1 the api key
username yes 1 username associated with api key
live no 1 boolean
store no 1 name of store or id of store

####GET /api/assets/v1/youtube_video Returns all YoutubeVideo resources. Optionally filtered by a query. Authentication required (ApiKeyAuthentication not supported).

Query Required Number of Parameters Parameters
format yes 1 one of: json, xml, yaml, jsonp, html, plist
id no 1 id of the youtube video (natural number)

####GET /api/assets/v1/generic_image Returns all GenericImages. Optionally filtered by a query. Authentication required (ApiKeyAuthentication not supported).

Query Required Number of Parameters Parameters
format yes 1 one of: json, xml, yaml, jsonp, html, plist
id no 1 id of the generic image (natural number)

####GET/POST/PATCH/DELETE /api/assets/external_content_type Returns all ExternalContentTypes. Authentication required (ApiKeyAuthentication not supported).

Query Required Number of Parameters Parameters
format yes 1 one of: json, xml, yaml, jsonp, html, plist

####GET/POST/PATCH/DELETE /api/assets/external_content Returns all External Content. Optionally filtered by a query. Authentication required.

Additional URLs

/api/assets/v1/external_content/store/STORE_NAME_OR_ID

Query Required Number of Parameters Parameters
format yes 1 one of: json, xml, yaml, jsonp, html, plist
api_key yes 1 the api key
username yes 1 username associated with api key
type_name no 1 the type of content (Instagram, Facebook,etc.)
store_name no 1 the name of the store (a valid string)
text no 1 a valid string
tags_name no 1 a list of tagged product names
tags_id no 1 a list of tagged product ids
original_url no 1 a string in the content's url
date no 1 a valid date range (e.g. 2013-2014)

Clone this wiki locally