Overview
Authentication
Endpoints
Scans
Upload
Results
Download CSV
Download XLSX
Export to GSheets
Convert Identifier

Rocket Source API Docs

Please note!

There will be some churn and backwards breaking changes here as we stabilize the API and smooth out the rough corners.

A few current rough edges:

  • money values are returned in cents
  • error messages are probably quite bad

Authentication

Your API key should be passed through as a bearer token. So your Authorization header will contain a value of

Bearer: <YOUR TOKEN>

All requests should be made to

https://app.rocketsource.io

Example:

curl -H "Authorization: Bearer YOUR_TOKEN" "https://app.rocketsource.io/api/v3/scans"

Endpoints

Scans
GET
/api/v3/scans

Fetches all completed scans.

Params:

  • pageoptional int - the page to load, default 1
Upload
POST
/api/v3/scans

Uploads a new scan. Accepts a multipart form upload with the following params:

  • filerequired file. Either a csv or xlsx file
  • attributesJSON object, required. See schema below

Attributes schema

{
    // All values in the mapping object are nullable ints. The int values should
    // be the corresponding column number, 0-indexed.
    mapping: {
        id, // required
        cost, // required
        supplier_sku,
        supplier_image,
        supplier_pack_quantity,
        map,
        stock_quantity,
        custom_columns => [], // an array of any custom columns you want to pass through
        discount_per_product,
    },
      options: {
          marketplace_id, // required - string - one of US, CA, MX, etc. Requires that your seller account have access to the given marketplace
          name,           // required - string - a name for your scan
        discount_supplier,
        custom_columns,
        header,
        multipack_prep_cost => [
            enabled,
            firstN,
            costForFirstN,
            costForRest,
        ],
        prep_cost,
        multipack_override,
        multipack_override_quantity,
      }
  }
Results
POST
/api/v3/scans/{scan_id}

Returns the result data for a given scan id.

Accepts JSON requests with the following params:

  • per_pageoptional int - the number of products per page, default 50, max 100
  • pageoptional int - the page of results, used to paginate, default 0
  • tableTypeoptional enum - either products or errors, default products
  • sortoptional string - column to sort on, ie profit or -profit for descending order
  • filteroptional array of Filter items

Filter items are JSON objects with the following structure:

{
    "name": "profit",
    "operator": ">",
    "value": 10
}
Export to CSV
POST
/api/v3/scans/{scan_id}/download?type=csv

Download a CSV file of your resulting data

Export to XLSX
POST
/api/v3/scans/{scan_id}/download?type=xlsx

Download a XLSX file of your resulting data

Export to GSheets
POST
/api/v3/scans/{scan_id}/export

Exports your scan results to Google Sheets. Requires the Google Sheets integration to be set up.

Convert Identifier
POST
/api/v3/convert

Converts the given numeric identifiers (UPCs, EAN,s or ISBNs) to a list of ASINs.

Expects a JSON payload in the following format:

{
  "marketplace": "US",
  "ids": [
    "9781501142970",
    "9780385086950"
  ]
}

Where marketplace is the ISO-8601 country code and ids is an array of strings representing the product identifiers you wish to convert to ASINs.

Notes

  • There is a maximum of 20 ids per API call
  • You can only use marketplaces which you have linked your API keys for

Returns the following JSON object, keyed by your ids with each value being an array of ASINs that are tied to that id.

{
  "9780385086950": [
    "0385086954",
    "B001GRWOZ0"
  ],
  "9781501142970": [
    "1501142976"
  ]
}