FWS 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 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 sume of the available in the location section, including any stock with the manufacturer.

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

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 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.

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.",
    "gtin": 8739204179213,
    "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
            }
        ],
    },
    "shipping_estimate": {
        "US": {
            "cost": 7.65,
            "currency": "USD"
        }
    }
}


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 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.

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"
        }
    ],
    "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"
}

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 motorsports warehouse distributor featuring eCommerce automation and Warehouse as a Service (WaaS™️).

Locations

Main Office & Warehouse

121 South Maple Ave
Suite 4
So San Francisco, CA 94080

Detroit Office & Warehouse

1407 Allen Drive
Suite G
Troy, MI 48083