Parts Canada API (v2)

Download OpenAPI specification:

License: Custom

Introduction

Parts Canada's API is based on REST principles. Endpoints return either JSON or binary data.

Please note that Parts Canada only provides the API service. We are not able to provide the integration to your system. Please contact your software vendor for help with this.

When your account is first created, it will be in development mode. Access to our sandbox environment will be provided. Note that data in this environment may not be current, but it should be sufficient to develop your application. Rate limiting is less stringent in this environment. Use the Development Base Address while developing your application.

https://sandbox-api.partscanada.com/api/v2

When you are finished development and are ready to go live, let us know and we'll activate your account for production. Your original account registration e-mail contains a link for support. You will need to alter your code's base address to the Production Base Address.

https://api.partscanada.com/api/v2

Note that when your account is in development mode, access to the production base address is restricted. Similarly, when your account is in production mode, access to the sandbox is restricted.

Security

The Parts Canada REST API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.

Requests

All requests must include a Bearer Token in the request headers. This Bearer Token is provided to you by Parts Canada upon creation of your account. Do not share this token with anyone. All requests are logged and validated.

Example Request:

curl https://api.partscanada.com/api/v2/inventory \
  -H "Authorization: Bearer [token]"

Responses

All requests to endpoints will return a response. These responses will include an HTTP status code. These codes are based on standard HTTP responses.

Some examples you may encounter while using our API:

Code Description
200 OK Request was successful.
400 Bad Request Request could not be handled due to an issue.
403 Forbidden Account does not have access to the endpoint.
404 Not Found Endpoint or file could not found.
429 Too Many Requests Too many requests have been made in a period of time.
500 Internal Server Error Server is experiencing technical difficulties.
503 Service Unavailable API is down for maintenance.

Catalogues

Get list of catalogues

This list contains information regarding our catalogues. Use this listing to obtain the URL for downloading full catalogue images. Note that all our catalogues may not be listed here. We will add them as they become available.

Rate Limit: 10 requests per minute

Responses

Response samples

Content type
application/json
{}

Get details for a catalogue

For each result in the catalogue listing response, there is a key entitled name. You can use this value to obtain detailed information for that catalogue. If you would like to get all the images for a particular catalogue, refer to the archive key. The value of this key contains a URL which you can use to initiate the download. (Note that these archives are usually 4-5 GB or larger in size.)

Rate Limit: 10 requests per minute

path Parameters
name
required
string
Enum: "atv-utv" "bicycle" "fatbook" "helmet-and-apparel" "offroad" "oldbook" "snow" "street" "tire-and-service"

Name of catalogue to return.

Responses

Response samples

Content type
application/json
{}

Download parts from a catalogue

This file contains all the part numbers from the specified catalogue.

The downloaded file is in ZIP format. The ZIP contains a CSV file.

Rate Limit: 10 requests per day

path Parameters
name
required
string
Enum: "atv-utv" "bicycle" "fatbook" "helmet-and-apparel" "offroad" "oldbook" "snow" "street" "tire-and-service"

Name of catalogue to return.

Responses

Images

Download images

This file contains images associated with the specified list of items. You may specify up to 10 unique items for each request. Note that there may be more than one image for each item. Also note that not all items have images.

The downloaded file is in ZIP format. The ZIP contains a CSV file.

By downloading this file, you are agreeing to the usage terms set forth by Parts Canada. A text file explaining these terms is included in the file.

If you are looking for much larger batches of images, please see the catalogue details endpoint, which includes all images from the specified catalogue.

Rate Limit: 10 requests per 24 hours

path Parameters
part_number
required
string

Part number of image to return.

Responses

Inventory

Download inventory file

This file contains several fields, including pricing, description, brand and discount category. This file is created nightly between 12am and 6am MST. You should make your requests after this time frame to ensure you get the most recent data.

The downloaded file is in ZIP format. The ZIP contains a CSV file.

The following list of fields are available in the inventory detail file:

  • Part Number
  • Old Part Number
  • Manufacturer Part Number
  • UPC Code
  • Brand
  • Description EN
  • Description FR
  • MSRP Latest
  • Dealer Price
  • Dealer Net Price
  • Depth
  • Width
  • Height
  • Weight
  • Commodity Code
  • Country of Origin
  • Case Qty
  • CAL Qty Available
  • Lon Qty Available
  • Description Long EN
  • Description Long FR
  • Multiline Discount
  • Second Last MSRP

Rate Limit: 10 requests per 24 hours

Responses

Download extended inventory file

This file contains fields beyond those included in the standard inventory file. These include tariff code, hazardous/dangerous code, and dealer net price. Click here for a full list of fields found in this file.

The downloaded file is in ZIP format. The ZIP contains a CSV file.

The following list of fields are available in the inventory detail file:

  • Part Number
  • Tariff Code
  • Hazard/Dangerous Code
  • Dealer Net Price

Rate Limit: 10 requests per 24 hours

Responses

Download inventory quantity file

This file contains a list of inventory quantities.

The downloaded file is in ZIP format. The ZIP contains a CSV file.

Rate Limit: 1 request per 2 hours

Responses

Get inventory stock information

Retrieves available quantity for an item, or list of items.

To query for multiple items, supply the part numbers in a comma-delimited list.

Rate Limit: 10 requests per minute

path Parameters
part_number
required
string

Part number.

Responses

Response samples

Content type
application/json
{
  • "part_number": "YTX14-BS",
  • "quantity": 5
}

Invoices

Get invoices

Retrieves all invoices, with most recent first. Results are returned in sets of 25 (use the limit parameter to change this). Subsequent result sets can be retrieved using the page parameter.

Rate Limit: 10 requests per minute

query Parameters
start_date
required
string

Start date of invoice range.

end_date
required
string

End date of invoice range.

order_type
string
Enum: "regular" "booking" "credit" "drop"
Example: order_type=regular

Type of order.

invoice_number
string
Example: invoice_number=INV01234567

Invoice number

order_number
string
Example: order_number=SO0123456

Order number.

po_number
string
Example: po_number=MyPO

Purchase order number.

rma_number
string
Example: rma_number=AB1234

RMA number.

limit
integer

Maximum number of invoices to return, between 1 and 25.

page
integer

The offset of the invoices returned, in conjunction with limit.

Responses

Response samples

Content type
application/json
{
  • "account_number": 1234567,
  • "amount": 257.38,
  • "carrier": "UPS",
  • "carrier_id": "UPS-EXP",
  • "date": "2023-03-18",
  • "item_quantity": 5,
  • "invoice_number": "INV01234567",
  • "order_number": "SO1234567",
  • "order_type": "drop",
  • "po_number": "PO order 42",
  • "rma_number": null,
  • "tracking_numbers": [
    ]
}

Get invoice details

Retrieves details for a specific invoice.

For each result in the invoice listing response array, there is a key entitled invoiceNumber. You can use this value to obtain detailed information for that invoice.

Rate Limit: 10 requests per minute

path Parameters
invoice_number
required
string

Invoice number.

Responses

Response samples

Content type
application/json
{
  • "account_number": 1234567,
  • "amount": 257.38,
  • "carrier": "UPS",
  • "carrier_id": "UPS-EXP",
  • "date": "2023-03-18",
  • "item_quantity": 5,
  • "invoice_number": "INV01234567",
  • "order_number": "SO1234567",
  • "order_type": "drop",
  • "po_number": "PO order 42",
  • "rma_number": null,
  • "tracking_numbers": [
    ]
}

Download invoice

Downloads a PDF of the specified invoice.

Rate Limit: 10 requests per hour

path Parameters
invoice_number
required
string

Invoice number.

Responses

Products

Download commodity code file

This file contains the product categories and subcategories.

The downloaded file is in ZIP format. The ZIP contains a CSV file.

Rate Limit: 10 requests per day

Responses

Download product features file

This file contains product features for the specified catalogue.

The downloaded file is in ZIP format. The ZIP contains a CSV file.

By default, all features added or updated since your last download will be included. If you have never previously downloaded a file, everything will be included. If no features have been added or updated since your last download, a string response of "No updates since your last download." will be returned.

You may optionally specify a start date as a query parameter. This limits the data to all features updated since the specified date.

Rate Limit: 10 requests per day

path Parameters
catalogue
required
string
Enum: "atv-utv" "bicycle" "fatbook" "helmet-and-apparel" "offroad" "oldbook" "snow" "street" "tire-and-service"

Name of catalogue.

query Parameters
start_date
string

Start date of feature text update

Responses

Statements

Download statement

Download a PDF statement for the requested month and year. You may request either a regular or booking order type.

Rate Limit: 10 requests per hour

path Parameters
date
required
string
Example: 2023-04

Year and month date in YYYY-MM format.

account
required
string
Enum: "regular" "booking"
Example: regular

Account type.

Responses