App

App

GET /api/v1/apps/app/

Note

Requires authentication.

Retuns a list of apps you have developed.

Request

The standard Listing query params.

Response

Parameters:
GET /api/v1/apps/app/(int: id)|(string: slug)/

Note

Does not require authentication if your app is public.

Response

An app object, see below for an example.

Status Codes:
  • 200 – successfully completed.
  • 403 – not allowed to access this object.
  • 404 – not found.
  • 451 – resource unavailable for legal reasons.

Example:

{
    "app_type": "hosted",
    "categories": [
        3
    ],
    "content_ratings": {},
    "current_version": "1.1",
    "default_locale": "en-US",
    "description": "sdf",
    "device_types": [
        "firefoxos"
    ],
    "homepage": "",
    "icons": {
        "16": "/tmp/uploads/addon_icons/0/24-32.png?modified=1362762723",
        "48": "/tmp/uploads/addon_icons/0/24-48.png?modified=1362762723",
        "64": "/tmp/uploads/addon_icons/0/24-64.png?modified=1362762723",
        "128": "/tmp/uploads/addon_icons/0/24-128.png?modified=1362762723"
    },
    "id": "24",
    "image_assets": {
        "desktop_tile": [
            "http://server.local/img/uploads/imageassets/0/60.png?modified=1362762724",
            0
        ],
        "featured_tile": [
            "http://server.local/img/uploads/imageassets/0/58.png?modified=1362762724",
            0
        ],
        "mobile_tile": [
            "http://server.local/img/uploads/imageassets/0/59.png?modified=1362762724",
            0
        ]
    },
    "is_packaged": false,
    "listed_authors": [
        {
            "name": "amckay"
        }
    ],
    "manifest_url": "http://zrnktefoptje.test-manifest.herokuapp.com/manifest.webapp",
    "name": "Test App (zrnktefoptje)",
    "payment_required": false,
    "premium_type": "premium",
    "previews": [
        {
            "caption": "",
            "filetype": "image/png",
            "id": "37",
            "image_url": "/tmp/uploads/previews/full/0/37.png?modified=1362762723",
            "resource_uri": "/api/v1/apps/preview/37/",
            "thumbnail_url": "/tmp/uploads/previews/thumbs/0/37.png?modified=1362762723"
        }
    ],
    "price": null,
    "price_locale": null,
    "privacy_policy": "/api/v1/apps/app/24/privacy/",
    "public_stats": false,
    "ratings": {
        "average": 0.0,
        "count": 0
    },
    "regions": [
        {
            "adolescent": true,
            "mcc": 310,
            "name": "United States",
            "slug": "us"
        },
        {
            "adolescent": true,
            "mcc": null,
            "name": "Worldwide",
            "slug": "worldwide"
        }
    ],
    "resource_uri": "/api/v1/apps/app/24/",
    "slug": "test-app-zrnktefoptje",
    "status": 0,
    "supported_locales": [
        "en-US",
        "es",
        "it"
    ],
    "support_email": "amckay@mozilla.com",
    "support_url": "",
    "upsell": false,
    "user": {
        "developed": false,
        "installed": false,
        "purchased": false
    },
    "versions": {
        "1.0": "/api/v1/apps/versions/7012/",
        "1.1": "/api/v1/apps/versions/7930/"
    }
}

Notes on the response.

Parameters:
  • payment_required (boolean) – A payment is required for this app. It could be that payment_required is true, but price is null. In this case, the app cannot be bought.
  • premium_type (string) – one of free, premium, free-inapp, premium-inapp. If premium or premium-inapp the app should be bought, check the price field to determine if it can.
  • price (string|null) – If it is a paid app this will be a string representing the price in the currency calculated for the request. If 0.00 then no payment is required, but the app requires a receipt. If null, a price cannot be calculated for the region and cannot be bought. Example: 1.00
  • price_locale (string|null) – If it is a paid app this will be a string representing the price with the currency formatted using the currency symbol and the locale representations of numbers. If 0.00 then no payment is required, but the app requires a receipt. If null, a price cannot be calculated for the region and cannot be bought. Example: “1,00 $US”. For more information on this see payment tiers.
  • privacy_policy (string) – The path to the privacy policy resource.
  • regions.adolescent (boolean) – an adolescent region has a sufficient volume of data to calculate ratings and rankings independent of worldwide data.
  • regions.mcc (string|null) – represents the region’s ITU mobile country code.
  • required_features (list|null) – a list of device features required by this application.
  • upsold (optional) – The path to the free app resource that this premium app is an upsell for.
  • user (object) – an object representing information specific to this user for the app. If the user is anonymous this object will not be present.
  • user.developed (boolean) – true if the user is a developer of the app.
  • user.installed (boolean) – true if the user installed the app (this might differ from the device).
  • user.purchased (boolean) – true if the user has purchased the app from the marketplace.
GET /api/v1/apps/(int: id)|(string: slug)/privacy/

Response

Parameters:
  • privacy_policy (string) – The text of the app’s privacy policy.
Status Codes:
  • 200 – successfully completed.
  • 403 – not allowed to access this object.
  • 404 – not found.
  • 451 – resource unavailable for legal reasons.
DELETE /api/v1/apps/app/(int: id)/

Note

Requires authentication.

Response

Status Codes:
  • 204 – successfully deleted.
POST /api/v1/apps/app/

See Creating an App

PUT /api/v1/apps/app/(int: id)/

See Creating an App

Versions

GET /api/v1/apps/versions/(int: id)/

Retrieves data for a specific version of an application.

Response

Status Codes:
  • 200 – successfully completed.
  • 404 – not found.

Example:

{
    "app": "/api/v1/apps/app/7/",
    "developer_name": "Cee's Vans",
    "features": [
        "apps",
        "push"
    ],
    "is_current_version": true,
    "release_notes": "New and improved!",
    "version": "1.1"
}
Parameters:
  • is_current_version (boolean) – indicates whether this is the most recent public version of the application.
  • features (array) – each item represents a device feature required to run the application.
PATCH /api/v1/apps/versions/(int: id)/

Update data for a specific version of an application.

Note

Requires authentication.

Request

Example:

{
    "developer_name": "Cee's Vans",
    "features": [
        "apps",
        "mp3",
        "push"
    ]
}
Parameters:
  • features (array) – each item represents a device feature required to run the application. Features not present are assumed not to be required.

Response

Returns the updated JSON representation

Status Codes:
  • 200 – sucessfully altered.
  • 403 – not allowed to modify this version’s app.
  • 404 – not found.

Payments

Note

Requires authentication and a successfully created app.

GET /api/v1/apps/app/(int: id)/payments/

Gets information about the payments of an app, including the payment account.

Response

Parameters:
Status Codes:
  • 200 – sucessfully completed.
POST /api/v1/apps/app/(int: id)/payments/status/

Queries the Mozilla payment server to check that the app is ready to be sold. This would normally be run at the end of the payment flow to ensure that the app is setup correctly. The Mozilla payment server records the status of this check.

Request

Empty.

Response

{
    "bango": {
        "status": "passed",
        "errors": []
    }
}
Parameters:
  • status (string) – passed or failed.
  • errors (array of strings.) – an array of errors as string. Currently empty, reserved for future use.
Status Codes:
  • 200 – successfully completed.
  • 400 – app is not valid for checking, examine response content.
  • 403 – not allowed.

Note

The Transaction:Debug permission is required.

GET /api/v1/apps/api/(int: id)/payments/debug/

Returns useful debug information about the app, suitable for marketplace developers and integrators. Output is truncated below and is subject to change.

Response

{
    "bango": {
        "environment": "test"
    },
}
Status Codes:
  • 200 – successfully completed.
  • 400 – app is not valid for checking, examine response content.
  • 403 – not allowed.

Manifest refresh

Note

Requires authentication and a successfully created hosted app.

POST /api/v1/apps/app/(int:id|string:slug)/refresh-manifest/

Response :status 204: Refresh triggered. :status 400: App is packaged, not hosted, so no manifest to refresh. :status 403: Not an app you own. :status 404: No such app.