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

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

interface UploadRequest {
  mapping: {
    // All values in the mapping object are column numbers, 0-indexed.
    id: number;,
    cost: number;,
    supplier_sku?: number,
    supplier_image?: number,
    supplier_pack_quantity?: number,
    map?: number,
    stock_quantity?: number,
    // an array of any custom columns you want to pass through
    custom_columns: number[], 
    discount_per_product?: number,
  };
  options: {
    // one of "US", "CA", "DE", etc. Requires that your seller account have access to the given marketplace
    marketplace_id: string; 
    // a name for your scan
    name: string; 
    discount_supplier?: number;
    custom_columns?: string[];
    header?: boolean;
    multipack_prep_cost?: {
      enabled: boolean;
      firstN: number;
      costForFirstN: number;
      costForRest: number;
    };
    prep_cost?: number;
    multipack_override?: boolean;
    multipack_override_quantity?: number;
    pull_historical_data?: boolean;
  };
}

The most simple upload payload would look like the below JSON. This assumes that your identifiers are in the first column and your costs are in the second.

{
    "mapping": {
        "id": 0,
        "cost": 1,
    },
    "options": {
        "marketplace_id": "US",
        "name": "My Scan"
    }
}
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
}
Delete Scan
DELETE
/api/v3/scans/{scan_id}

Deletes a scan by it's id.

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 between different product identifiers (UPC, EAN, ASIN, etc.)

ASIN Convert
POST
/api/v3/asin-convert

Returns all the product identifiers (UPC, EAN, etc.) for the specified ASINss.

Request Format

FieldTypeDescriptionConstraints
marketplaceStringThe marketplace code (e.g., "US", "UK", "CA")Required
asinsArray of StringsList of ASINs to convertMin: 1, Max: 1,000 items
{
  "marketplace": "US",
  "asins": [
    "B001GRWOZ0",
    "B001GRWOZ9"
  ]
}

Response Format

The response is a map where:

  • Keys are the input ASINs
  • Values are objects containing various identifier types (UPC, EAN, ISBN, etc.)
  • ASINs without corresponding identifiers will not be included in the response
{
  "B001GRWOZ0": {
    "upc": ["0385086954"],
    "ean": ["9780385086950"],
    "isbn": ["1501142976"]
  },
  "B001GRWOZ9": {
    "upc": ["0385086954"],
    "ean": ["9780385086950"],
    "isbn": ["1501142976"]
  }
}