API Docs

Setup

The Torqued FWS webservice (API) is a REST interface running over HTTPS, protected by a unique token for each dealer. Responses are in JSON format with HTTP return and error codes as applicable. To get set up, users must first be a dealer through Torqued Distribution. Once enabled, dealers can generate a unique token via the settings on their dealer console login.

All webservice calls are made to https://fws.torqued.io as GET calls with the following headers:
Accept: application/json
Authorization: Bearer <your token>

Shipping Services

Below are the valid shipping services to send for new orders and which are returned as responses. A specific service can be requested for UPS, USPS and DHL by setting the shipping_method field when creating an order. Alternatively, the ground and intl_air shipping method types can be used to specify the lowest cost option available for ground and international shipment, respectively.

For any account set up for payment prior to fulfillment and not on terms, the shipping service can also be edited when an order is paid for prior to shipping.

Service name Shipping method code
Ground ground
International Air intl_air
UPS Ground ups-ups_ground
UPS Next Day Air ups-ups_next_day_air
UPS Second Day Air ups-ups_second_day_air
UPS Next Day Air Early AM ups-ups_next_day_air_early_am
UPS Next Day Air Saver ups-ups_next_day_air_saver
UPS Three Day Select ups-ups_three_day_select
USPS Parcel Select usps-usps_parcel_select
USPS First Class usps-usps_first_class
USPS Priority usps-usps_priority
USPS Express usps-usps_express
DHL Express Worldwide dhl-dhl_express_worldwide

REST Endpoints

Description

Gets the available brands including the SKU prefix with which all product SKUs of the brand start with. For example, all AeroCatch product SKUs start with “AER-“.

Input

None

JSON Response Sample
[
    {
        "name": "AEM Electronics",
        "prefix": "AEM"
    },
    {
        "name": "AeroCatch",
        "prefix": "AER"
    },
    ...
]
Description

Gets details of a brand including logo image links and all available product SKUs for the brand.

Input
  • name Name of the brand (required)
JSON Response Sample
{
    "name": "Nuke Performance",
    "prefix": "NUK",
    "logo_url": "https://static.torqued.io/brands/nuke_performance_200.png",
    "logo_large_url": "https://static.torqued.io/brands/nuke_performance_orig.png",
    "products": [
        "NUK-15001201",
        "NUK-15001202",
        ...
    ]
}
Description

Gets the detailed fitment information for a fitment id. Fitment IDs are Torqued internal IDs representing a year, make, model and trim (submodel). See /product/<sku>/fitmentids to get fitment IDs for a product or /product/<sku>/fitments to get the full list of YMMT fitments for a product.

Input

None

JSON Response Sample
[
{
        "id": 27,
        "year": 2008,
        "make": "Audi",
        "model": "A4",
        "trim": ""
    }
]
Description

Gets product SKUs which start with the requested search string, which is a brand prefix such as “MOM”.

Input
  • search Search string, minimum 3 characters (required)
JSON Response Sample
[
    "NUK-15001201",
    "NUK-15001202",
    ...
]
Description

Gets inventory availability for the product SKUs beginning with search string. For example, using NUK-150 will retrieve NUK-15001201, NUK-15001202, etc. This API also allows a wildcard “*” as the search term to get all inventory, though we ask that you fetch this only once a day if possible. For differential updates, see the /products/updated/<since> endpoint.

Looking at the example below, you will notice total and available is returned. The difference is the physical on hand vs what is available for shipment now. The total field matches the sum of the available in the location section, including any stock with the manufacturer. The available_direct field shows the total inventory available in Torqued Distribution warehouses and available_1day shows the inventory available with 1 day handling time across all warehouses.

Input
  • search Beginning of product SKUs for which inventory is desired (required)
JSON Response Sample
{
    "NUK-15001201": {
        "total": 3,
        "available": 2,
        "available_direct": 2,
        "available_1day": 2,
        "locations": [
            {
                "name": "South SF, CA",
          	    "country": "US",
          	    "postal_code": "94080",
          	    "available": 3
            }
        ],
    },
    "NUK-15001202": {
        "total": 7,
        "available": 5,
        "available_direct": 3,
        "locations": [
            {
            	"name": "South SF, CA",
            	"country": "US",
            	"postal_code": "94080",
            	"available": 3
            },
            {
                "name": "Manufacturer",
                "country": "US",
                "available": 4
            }
        ],
    },
    ...
}
Description

Gets products which have had their inventory levels updated since the requested date and time. All dates and times are in UTC timezone. The inventory number which is returned is the total combined available inventory at Torqued Distribution and third party warehouses.

Input
  • date The date starting on which to provide updated products from, inclusive. Format is 1970-01-01. (required)
  • time The time of day starting on which to provide updated products from, inclusive. Format is 00:00:00. (optional)
JSON Response Sample
{
    "NUK-15001201": 3,
    "NUK-15001202": 11,
    ...
}
Description

Gets pricing for the product SKUs beginning with search string. For example, using NUK-150 will retrieve NUK-15001201, NUK-15001202, etc.

Input
  • search Beginning of product SKUs for which pricing is desired (required)
JSON Response Sample
{
    "NUK-15001201": {
        "currency": "USD",
        "retail": "383.89",
        "map": "383.89",
        "cost": "287.92"
    },
    "NUK-15001202": {
        "currency": "USD",
        "retail": "383.89",
        "map": "383.89",
        "cost": "287.92"
    },
    ...
}
Description

Gets the available inventory for products whose inventory has changed since the provided date and time. All dates and times are in UTC timezone.

Input
  • date The date starting on which to provide new products from, inclusive. Format is 1970-01-01. (required)
  • time The time of day starting on which to provide new products from, inclusive. Format is 00:00:00. (optional)
JSON Response Sample
[
    "NUK-15001201",
    "NUK-15001202",
    ...
]
Description

Gets details of a single product SKU including description, images, dimensions and inventory.

Looking at the example below, you will notice total and available is returned in the inventory section. The difference is the physical on hand vs what is available for shipment now. The total field matches the sume of the available in the location section, including any stock with the manufacturer.

If an item is out of stock and an estimated stock availability date is known, the estimated_ship_date field inside inventory will be set formatted as 2022-10-31. It is empty otherwise.

The category field is populated when known. Format is Torqued Distribution’s two-level category system of department and category.

The universal field indicates whether this is a universal fitment part with no vehicle-specific information. If set to false, fitment data can be queried. There may be products which are fitment-specific, but for which fitment data is not available and therefore they are set to universal until fitment data can be added to the product.

Input
  • sku SKU of the desired product (required)
JSON Response Sample
{
    "sku": "NUK-15001201",
    "name": "Nuke Performance Fuel Surge Tank 3.0 Liter Single or Dual Deatschwerks",
    "brand": "Nuke Performance",
    "manufacturer": "Nuke Performance",
    "manufacturer_part_number": "150-01-201",
    "description_short": "CNC machined from 6063 aluminum alloy 3 liter capacity 3/4 UNF ports with 5x AN8 fittings included Deatschwerks 200 / 300 / 400 version",
    "description": "The Nuke Performance 3 liter fuel surge tank can be run in a dual or single internal pump setup. With this tank you minimize the risk of fuel starvation when running at low fuel levels and where the fuel system can't cope with the extremely hard driving such as drifting, drag racing and track days. By generating higher g forces, fuel can be pushed to one side or sloshed around too much causing starvation to the high pressure pump that supplies the fuel rail. This is a potentially catastrophic situation, particularly in turbo applications, but also on naturally aspirated engines. With a high quality fuel surge tank like this designed for use with top tier pumps, fuel starvation should never happen. As is the hallmark of Nuke Performance products, this tank is designed and manufactured to handle extreme amounts of power. Designed to stand up to the destructive properties of alcohol fuels, including methanol and ethanol. For use on turbo-charged, super-charged and naturally aspirated engine applications. Delivered with stainless-steel mounting plate for easy mounting and 5x 3/4 AN8 fittings for all the top cover connections and 1x 3/4 plug if you choose to use it for a single fuel pump. Any 3/4 AN6-AN10 fitting can be used if desired. No fuel pumps are included. This version is compatible with one or two Deatschwerks 200 / 300 / 400 fuel pumps.",
    "category": "Fuel System > Fuel Surge Tanks",
    "gtin": 8739204179213,
    "universal": true,
    "carb_compliant": true,
    "image": "https://images.torqued.io/images/product/400/full/dj6ipEB7am.jpg",
    "additional_images": [
        "Bdxtwqz1bF.jpg"
    ],
    "pricing": {
        "currency": "USD",
        "retail": "383.89",
        "map": "383.89",
        "cost": "307.11"
    },
    "dimensions": {
        "units": "in",
        "length": "5.8",
        "width": "10.0",
        "height": "5.8"
    },
    "weight": {
        "units": "lbs",
        "weight": "6.5"
    },
    "inventory": {
        "total": 3,
        "available": 2,
        "locations": [
            {
            	"name": "South SF, CA",
            	"country": "US",
            	"postal_code": "94080",
            	"available": 3
            }
        ],
        "eta": null,
    },
    "shipping_estimate": {
        "US": {
            "cost": 7.65,
            "currency": "USD"
        }
    },
    "handling_days": 0
}
Description

Gets the IDs of the available fitments for the product. For details of each fitment id, see /fitment/<id>.

Input
  • sku SKU of the desired product (required)
JSON Response Sample
[
    "14634",
    "14789",
    ...
]
Description

Gets the year, make, model, trim and notes fitment data for the product.

Input
  • sku SKU of the desired product (required)
JSON Response Sample
[
    {
        "year": 2007,
        "make": "Audi",
        "model": "A4",
        "trim": "",
        "fitment_id": 26,
        "notes": null
    },
    {
        "year": 2008,
        "make": "Audi",
        "model": "A4",
        "trim": "",
        "fitment_id": 27,
        "notes": null
    },
    ...
]
Description

Gets the orders placed in reverse chronological order in all order statuses, up to 50 at a time. Returns order id, any purchase order number (or other reference number) entered by the dealer when the order was placed, the status of the order and when it was last updated.

Standard values for status are unpaid, sent_to_warehouse, warehouse_ack, picked, packed and complete. Possible, but unlikely additional values are canceled, fraud and hold.

Input
  • start Number of results to skip over for orders (optional)
JSON Response Sample
[
    {
        "id": 254,
        "purchase_order_number": "1234",
        "status": "sent_to_warehouse",
        "last_updated": "2019-07-07 00:32:06"
    },
    {
        "id": 253,
        "purchase_order_number": null,
        "status": "complete",
        "last_updated": "2019-08-20 05:25:01"
    },
    ...
]
Description

Gets the single order specified by the id. Returns any purchase order number (or other reference number) entered by the dealer when the order was placed, the status of the order, shipping address, cost breakdown, the items which were ordered, tracking information and when the order was last updated.

Standard values for status are unpaid, sent_to_warehouse, warehouse_ack, picked, packed and complete. Possible, but unlikely additional values are canceled, fraud and hold.

All cost information is at the cost charged to the dealer, not the retail cost of the parts in the order.

The parent_order_id and child_order_ids fields are only present and populated if they apply to the order.

Input
  • id The unique order ID for the order (required)
JSON Response Sample
{
    "id": 253,
    "purchase_order_number": null,
    "status": "complete",
    "ship_to": {
        "firstname": "Jennifer",
        "lastname": "Mustermann",
        "company": null,
        "address": "2A Wellington St",
        "address2": "Apt 4",
        "address3": null,
        "city": "Boston",
        "state": "MA",
        "postal_code": "02118",
        "country": "US"
        "phone": "617-555-1212"
    },
    "cost": {
        "currency": "USD",
        "total": "323.91",
        "shipping": "16.80",
        "tax": "0.00"
    },
    "items": [
        {
            "sku": "NUK-15001201",
            "name": "Nuke Performance Fuel Surge Tank 3.0 Liter Single or Dual Deatschwerks",
            "quantity": 1,
            "price": "307.11"
        }
    ],
    "shipping_method": "ups-ups_ground",
    "tracking": [
        {
            "carrier": "ups",
            "tracking": "1Z03W6270375346728"
        }
    ],
    "parent_order_id": 555,
    "child_order_ids": [666,777],
    "estimated_ship_date": null,
    "last_updated": "2019-08-20 05:25:01",
}
Description

Creates a new order for the dealer. This reserves the parts in the Torqued Distribution warehouse network and puts the order in an unpaid state. Dealers can then complete the order, including shipping and payment, on the dealer console.

All fields in the sample input below are required except, purchase_order_number, ship_to.company, ship_to.address2, ship_to.address3 and shipping_method.

shipping_method should be set to a valid shipping service as shown in the table below

This endpoint returns HTTP 200 only when an order is created successfully. HTTP 4XX response codes are provided for all errors.

JSON Input Sample
{
    "purchase_order_number": "ABC123",
    "ship_to": {
        "firstname": "Bob",
        "lastname": "Miller",
        "company": "BM Enterprises",
        "address": "15 Main St",
        "address2": "Suite 2",
        "city": "Chicago",
        "state": "IL",
        "postal_code": "60603",
        "country": "US",
        "phone": "312-555-1212"
    },
    "items": [
        {
            "sku": "TIL-B6S-C",
            "quantity": 1
        },
        {
            "sku": "NUK-20001202",
            "quantity": 2
        }
    ],
    "shipping_method": "Ground"
}
JSON Response Sample
{
    "id": 265,
    "purchase_order_number": "ABC123",
    "status": "unpaid"
}
Description

Checks whether the account is set up for any flat rate shipping and if so, return the per state flat rate per order per state.

Input

None

JSON Response Sample
{
    "enabled": true,
    "US": {
        "AL": 10,
        "AZ": 10,
        ...
    }
}

Webhooks

Torqued Distribution also provides a set of webhooks to push updates from Torqued to a dealer’s servers. For example, a dealer may want to subscribe to order updates via webhook instead of polling Torqued FWS continuously.

To set up, a second token unique from the webservice needs to be generated on the dealer’s settings page and URLs need to be set up for the endpoint where the dealer wishes to receive the update. These are also in JSON format and test messages can be sent from the console to verify and endpoint is working correctly.

Torqued Distribution

The most technologically advanced aftermarket warehouse distributor featuring eCommerce automation, Warehouse as a Service (WaaS) and No Cost 3PL services.

Office & Warehouse

1407 Allen Drive
Suite G
Troy, MI 48083