API reference

Product catalogue API

Send your catalogue from your own shop or stock system. Base URL https://api.motorsync.co.uk/api/v1/products/catalogue, version 1.0.0. Product seller keys.
In short
  • Send each product with your own product code; it goes live as soon as it is saved and is shown to customers whose cars it fits.
  • Every product meets the same listing rules as one added in Mira Business, and a refusal says exactly what to fix.
  • Use the stock call to keep stock current; photo links are copied into Mira.

Overview

Each product is matched on your own product code. The first call adds it, later calls update it, and products are live as soon as they are saved, shown to customers whose cars they fit. Every product goes through the same checks as one added in Mira Business, so a product that breaks a rule is refused with a message saying what to fix.

For a whole catalogue, send batches of 100, or upload a spreadsheet in Mira Business. For frequent stock changes, use the stock call: it is the lightest.

Product codes

The product code (sku) is your own id for a product, unique within your company. Keep it the same for the life of the product. A removed product's code stays taken, so a returning product gets a new code.

Endpoints

PUT/api/v1/products/catalogue/{sku}PRODUCTS_WRITE

Add or update a product

The first call with a product code adds the product (201); later calls update it (200). Photo links are copied into Mira, so customers only ever load photos from Mira.

Request
curl -X PUT https://api.motorsync.co.uk/api/v1/products/catalogue/MAT-001 \
  -H "Authorization: Bearer ms_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Rubber floor mats for BMW 3 Series",
    "subCategory": "FLOOR_MATS", "condition": "NEW",
    "price": "24.99", "stockQuantity": 10,
    "buyOptions": ["SELLER_WEBSITE"], "buyUrl": "https://yourshop.co.uk/mats",
    "imageUrls": ["https://yourshop.co.uk/mats-1.jpg"],
    "fitmentMode": "EXACT",
    "fitments": [{ "make": "BMW", "model": "3 Series", "yearFrom": 2015, "yearTo": 2022 }],
    "fulfilment": [
      { "type": "COLLECT" },
      { "type": "FITTED", "price": "15.00", "durationMinutes": 20, "fittingLocation": "AT_SHOP" }
    ]
  }'
Response
{
  "success": true,
  "data": {
    "sku": "MAT-001",
    "outcome": "WOULD_ADD",
    "product": null,
    "problems": []
  },
  "message": "WOULD_ADD"
}
POST/api/v1/products/catalogue/batchPRODUCTS_WRITE

Add or update products in bulk

Up to 100 products, each with its sku. One bad product does not stop the rest; the answer lists what happened to each, with the reasons for any skipped.

PATCH/api/v1/products/catalogue/{sku}/stockPRODUCTS_WRITE

Set stock

The quickest call for keeping stock current. 0 shows the product as out of stock.

Request
curl -X PATCH https://api.motorsync.co.uk/api/v1/products/catalogue/MAT-001/stock \
  -H "Authorization: Bearer ms_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "quantity": 4 }'
DELETE/api/v1/products/catalogue/{sku}PRODUCTS_WRITE

Remove a product

Takes the product off sale and deletes its photos. The product code stays taken.

GET/api/v1/products/catalogue/{sku}PRODUCTS_READ

Read a product

GET/api/v1/products/cataloguePRODUCTS_READ

List your products

Newest first. Paging: page (from 0), size (up to 100).

Product fields

FieldRequiredRules
titleYes3 to 255 characters
subCategoryYesOne of the categories in the spreadsheet template's Help sheet, for example BRAKES, OILS_AND_FLUIDS, FLOOR_MATS
conditionYesNEW, USED or REFURBISHED. Child seats can only be new.
priceYesAs text with up to two decimals, for example "24.99", including VAT
stockQuantityYes0 or more
buyOptionsYesSELLER_WEBSITE
buyUrlWith SELLER_WEBSITEThe product's page on your website, starting https://
imageUrlsYes1 to 8 photo links, main photo first. JPG, PNG or WebP up to 10 MB each.
fitmentModeYesUNIVERSAL (fits any car), EXACT (list the cars in fitments) or UNKNOWN
fitments[]With EXACTmake (required), model, yearFrom, yearTo, fuelType, engineCcFrom, engineCcTo. A blank model means every model of the make.
fulfilment[]YesAt least one of COLLECT, DELIVERY (with days) and FITTED (with fittingLocation AT_SHOP or MOBILE). price is the extra charge, 0 when free.
description, brand, ean, mpnNoFree text
oeNumbersNoOriginal part numbers it replaces
attributesSome categoriesDetails as { key, value } pairs. Tyres need width, profile, rim_size, load_index, speed_rating and their label grades (fuel_efficiency_class, wet_grip_class, noise_db).
approvalMarksSome categoriesChild seats need UN_R129 or UN_R44. Road number plates need DVLA_RNPS.
roadUseLightsROAD_LEGAL or SHOW_USE_ONLY
netQuantity, netUnitFluidsPack size, for example "5" with LITRE
warrantyMonths, returnsDays, leadTimeDaysNoWhole numbers

Listing rules

Products go live without a manual check, so some rules apply on every save:

  • Items that are illegal to sell or use on the road are refused, for example emissions-delete kits and airbags.
  • Used catalytic converters and used child seats are refused.
  • A "was" price only shows when the earlier price was charged for at least 28 days.
  • Prices include VAT. Delivery and fitting charges are shown before the customer buys.

Errors

StatusCodeWhat to do
400VALIDATION_ERRORA field is missing or breaks a listing rule, or a photo could not be copied. The message lists everything to fix.
404NOT_FOUNDNo product with this code for your company.

Errors every API shares are in Keys, errors and limits.