Submission

How to submit an app

Submitting an app involves a few steps. The client must be logged in for all these steps and the user submitting the app must have accepted the terms of use.

  1. Validate your app. The validation will return a valid manifest id or upload id.
  2. Post your app using the valid manifest id or upload id. This will create an app and populate the data with the contents of the manifest. It will return the current app data.
  3. Update your app. Not everything that the Firefox Marketplace needs will be in the app, as the manifest does not contain all the data. Update the required fields.
  4. Create a screenshot. For listing on the Firefox Marketplace, at least one screenshot is needed.
  5. Ask for a review. All apps need to be reviewed, this will add it to the review queue.

Validate

Note

The validation does not require you to be authenticated, however you cannot create apps from those validations. To validate and submit an app you must be authenticated for both steps.

POST /api/v1/apps/validation/

Request

Parameters:
  • manifest (string) – URL to the manifest.

Example:

{"manifest": "http://test.app.com/manifest.webapp"}

Or for a packaged app

Parameters:
  • upload (object) – a dictionary containing the appropriate file data in the upload field.
  • upload.type (string) – the content type.
  • upload.name (string) – the file name.
  • upload.data (string) – the base 64 encoded data.

Example:

{"upload": {"type": "application/foo",
            "data": "UEsDBAo...gAAAAA=",
            "name": "mozball.zip"}}

Response

Returns a validation result.

Status Codes:
  • 201 – successfully created.
GET /api/v1/apps/validation/(int: id)/

Response

Returns a particular validation.

Parameters:
  • id (int) – the id of the validation.
  • processed (boolean) – if the validation has been processed. Hosted apps are done immediately but packaged apps are queued. Clients will have to poll the results URL until the validation has been processed.
  • valid (boolean) – if the validation passed.
  • validation (string) – the resulting validation messages if it failed.
Status Codes:
  • 200 – successfully completed.

Example not processed:

{
    "id": "123",
    "processed": false,
    "resource_uri": "/api/v1/apps/validation/123/",
    "valid": false,
    "validation": ""
}

Example processed and passed:

{
    "id": "123",
    "processed": true,
    "resource_uri": "/api/v1/apps/validation/123/",
    "valid": true,
    "validation": ""
}

Example processed and failed:

{
    "id": "123",
    "processed": true,
    "resource_uri": "/api/v1/apps/validation/123/",
    "valid": false,
    "validation": {
    "errors": 1, "messages": [{
        "tier": 1,
        "message": "Your manifest must be served with the HTTP header \"Content-Type: application/x-web-app-manifest+json\". We saw \"text/html; charset=utf-8\".",
        "type": "error"
    }],
}

Creating an App

POST /api/v1/apps/app/

Note

Requires authentication and a successfully validated manifest.

Note

You must accept the terms of use before submitting apps.

Note

This method is throttled at 10 requests/day.

Request

Parameters:
  • manifest (int) – the id of the validated manifest.

Or for a packaged app

Parameters:
  • upload (int) – the id of the validated packaged app.

Response

Param :

An apps.

Status Codes:
  • code – 201 successfully created.
PUT /api/v1/apps/app/(int: id)/

Request

Parameters:
  • name (string) – the title of the app. Maximum length 127 characters.
  • summary (string) – the summary of the app. Maximum length 255 characters.
  • categories (array) – a list of the categories, at least two of the category ids provided from the category api (see below).
  • description (string) – long description. Some HTML supported.
  • privacy_policy (string) – your privacy policy. Some HTML supported.
  • homepage (string) – a URL to your apps homepage.
  • support_url (string) – a URL to your support homepage.
  • support_email (string) – the email address for support.
  • device_types (array) – a list of the device types at least one of: desktop, mobile, tablet, firefoxos. mobile and tablet both refer to Android mobile and tablet. As opposed to Firefox OS.
  • regions (array) – a list of regions this app should be listed in, expressed as country codes or ‘worldwide’.
  • premium_type (string) – One of free, premium, free-inapp, premium-inapp, or other.
  • price (string) – The price for your app as a string, for example “0.10”. Required for premium or premium-inapp apps.
  • payment_account (string) – The path for the payment account resource you want to associate with this app.
  • upsold (string) – The path to the free app resource that this premium app is an upsell for.

Response

Status Codes:
  • 202 – successfully updated.

Screenshots or videos

Note

Requires authentication and a successfully created app.

POST /api/v1/apps/preview/?app=(int: app_id)

Request

Parameters:
  • position (int) – the position of the preview on the app. We show the previews in the order given.
  • file (object) – a dictionary containing the appropriate file data in the upload field.
  • file.type (string) – the content type.
  • file.name (string) – the file name.
  • file.data (string) – the base 64 encoded data.

Note

There is currently a restriction of 5MB on file uploads through the API.

Response

A screenshot resource.

Status Codes:
  • 201 – successfully completed.
  • 400 – error processing the form.
GET /api/v1/apps/preview/(int: preview_id)/

Response

Example:

{
    "addon": "/api/v1/apps/app/1/",
    "id": 1,
    "position": 1,
    "thumbnail_url": "/img/uploads/...",
    "image_url": "/img/uploads/...",
    "filetype": "image/png",
    "resource_uri": "/api/v1/apps/preview/1/"
    "caption": "Awesome screenshot"
}
DELETE /api/v1/apps/preview/(int: preview_id)/

Response

Status Codes:
  • 204 – successfully deleted.

Enabling an App

Note

Requires authentication and a successfully created app.

PATCH /api/v1/apps/status/(int: app_id)/

Request

Params optional status:
 a status you’d like to move the app to (see below).
Params optional disabled_by_user:
 Whether the app is disabled or not.

Response

Status Codes:
  • 200 – successfully completed.
  • 400 – something prevented the transition.

Key statuses are:

  • incomplete: incomplete
  • pending: pending
  • public: public
  • waiting: waiting to be public

Valid transitions that users can initiate are:

  • incomplete to pending: call this once your app has been completed and it will be added to the Marketplace review queue. This can only be called if all the required data is there. If not, you’ll get an error containing the reason. For example:

    {
        "error_message": {
            "status": [
                "You must provide a support email.",
                "You must provide at least one device type.",
                "You must provide at least one category.",
                "You must upload at least one screenshot or video."
            ]
        }
    }
    
  • Once reviewed by the Marketplace review team, the app will be to public or waiting to be public.

  • waiting to public: occurs when the app has been reviewed, but not yet been made public.

  • disabled_by_user: by changing this value from True to False you can enable or disable an app.