Websites

Website

Note

The name, description, short_name, and title fields are user-translated fields and have a dynamic type depending on the query. See translations.

GET /api/v2/websites/website/(int: id)/

Response

A website object, see below for an example.

Status Codes:

Example:

{
  "categories": [
    "news"
  ],
  "created": "2014-11-18T14:13:12",
  "description": {
    "en-US": "Example site description"
  },
  "icons": {
    "64": "https://marketplace-dev-cdn.allizom.org/media/img/hub/default-64.png",
    "128": "https://marketplace-dev-cdn.allizom.org/media/img/hub/default-128.png",
    "48": "https://marketplace-dev-cdn.allizom.org/media/img/hub/default-48.png",
    "32": "https://marketplace-dev-cdn.allizom.org/media/img/hub/default-32.png"
  },
  "id": 42,
  "mobile_url": null,
  "name": {
    "en-US": "Example site name"
  },
 "promo_imgs": {
     "320": "https://marketplace-dev-cdn.allizom.org/website_promo_imgs/0/31-320.png?modified=1362762723",
     "640": "https://marketplace-dev-cdn.allizom.org/website_promo_imgs/0/31-640.png?modified=1362762723",
  },
  "short_name": {
    "en-US": "Example"
  },
  "title": {
    "en-US": "Example site title"
  },
  "tv_url": null,
  "url": "http://example.url/"
}

Fields on the response:

Parameters:
  • categories (array) – An array of strings representing the slugs of the categories the app belongs to.
  • created (string) – The date the app was added to the Marketplace, in ISO 8601 format.
  • description (string|object) – The site’s description.
  • icons (object) – An object containing information about the site icons. The keys represent icon sizes, the values the corresponding URLs.
  • id (int) – The site ID.
  • mobile_url (string|null) – The site’s mobile-specific URL, if it exists.
  • promo_imgs (object) – An object containing information about site promo images. The keys represent image sizes, the values the corresponding URLs.
  • tv_url (string|null) – The site’s TV-specific URL, if it exists.
  • name (string|object) – The site’s name, as used on its detail page in Marketplace.
  • short_name (string|object) – A shorter representation of the site’s name, to be used in the listing pages in Marketplace.
  • title (string|object) – The site’s title, extracted from the site’s <title> element. Used internally to improve search results.
  • url (string) – The site’s URL.

Website Submission

Note

Authentication and the ‘Websites:Submit’ permission are required.

POST /api/v2/websites/website/submit/

Request

{
  'canonical_url': 'https://www.bro.app',
  'categories': ['lifestyle', 'music'],
  'detected_icon': 'https://www.bro.app/apple-touch.png',
  'description': 'We cannot tell you what a Bro is. But bros know.',
  'keywords': ['social networking', 'Gilfoyle', 'Silicon Valley'],
  'name': 'Bro',
  'preferred_regions': ['us', 'ca', 'fr'],
  'public_credit': False,
  'url': 'https://m.bro.app',
  'why_relevant': 'Ummm...bro. You know.',
  'works_well': 3
}
Parameters:
  • canonical_url (string) – the canonical URL to the website, if one can be detected.
  • categories (array) – slugs of categories to which the website belongs.
  • detected_icon (string) – the URL to an icon for the website.
  • description (string) – a description of the website.
  • keywords (array) – website keywords
  • name (string) – the name of the website
  • preferred_regions (array) – the regions in which the website is specifically relevant.
  • public_credit (boolean) – whether or not the user wants public credit for submitting the website.
  • url (string) – the url of the website
  • why_relevant (string) – why the submitters believes the website belongs in Marketplace.
  • works_well (integer) – how well the website works, on a scale of 1 (poorly) to 5 (very well).

Response

Status Codes: