# RS Online Product ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/rsonline/product` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 2 credits per call | | **Documentation** | https://www.piloterr.com/library/rsonline-product | ## Description Read one RS Online UK product URL, including the RS stock number, manufacturer part, and pound price. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/rsonline/product' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### WAGO 221 splice connector on RS Online UK ```json { "mpn": "221-2401", "url": "https://uk.rs-online.com/web/p/splice-connectors/0303327", "brand": "WAGO", "price": 4.95, "title": "WAGO, 221 Wire Splice Splice Connector, Clear, Insulated 12 AWG", "images": [ "https://media.rs-online.com/t_large/Y0303327-01.jpg", "https://media.rs-online.com/t_thumb/Y0303327-01.jpg" ], "category": "Splice Connectors", "currency": "GBP", "in_stock": true, "brand_url": "https://uk.rs-online.com/web/b/wago", "image_url": "https://media.rs-online.com/t_large/Y0303327-01.jpg", "pack_size": 10, "categories": [ "Electronic Components, Power & Connectors", "Connectors", "Wire Terminals & Splices", "Splice Connectors" ], "product_id": "0303327", "description": "The Wago inline splicing connector with levers (2-conductor, maximum 4 mm²) features tool-free connection for solid, stranded, and fine-stranded conductors (0.2 to 4 mm²). Its slim design saves space, and it is ideal for North American installations with 12 AWG capability. The lever technology enables easy connection and disconnection.", "rohs_status": "EXEMPT", "price_breaks": [ { "price": 4.95, "quantity": 1, "price_display": "£4.95", "indicative_price": 0.495, "indicative_price_display": "£0.495" }, { "price": 4.56, "quantity": 5, "price_display": "£4.56", "indicative_price": 0.456, "indicative_price_display": "£0.456" }, { "price": 4.01, "quantity": 10, "price_display": "£4.01", "indicative_price": 0.401, "indicative_price_display": "£0.401" } ], "stock_status": "In Stock", "datasheet_url": "https://docs.rs-online.com/54b0/A700000012773609.pdf", "price_display": "£4.95", "specifications": [ { "name": "Brand", "value": "WAGO" }, { "name": "Splice Type", "value": "Wire Splice" }, { "name": "Product Type", "value": "Splice Connector" }, { "name": "Series", "value": "221" } ], "rs_stock_number": "030-3327", "unit_of_measure": "1 Pack of 10", "minimum_order_qty": 1 } ``` ## Documentation ## Overview Read one RS Online UK product page. `query` is the product URL. ## Quickstart Product link ``` GET https://api.piloterr.com/v2/rsonline/product?query=https://uk.rs-online.com/web/p/splice-connectors/0303327 ``` ## Parameters | Parameter | Type | Required | Default | What to pass | What changes in the JSON | |---|---|---|---|---|---| | `query` | string | yes | empty, which returns 400 | A uk.rs-online.com product link | The body is one flat product. `product_id` is the digits in the URL. `price` is the numeric pound amount and `price_display` is the printed string. A search link returns 400. | | `return_page_source` | boolean | no | false | `true` or `false` | `true` replaces the product with `result`, the rendered HTML. | ## Response fields `rs_stock_number` is the id with the RS hyphen. `price_display` keeps the printed amount, such as `£4.95`. `price_breaks` lists the quantity breaks. `mpn` is the manufacturer part. ## Use cases - Read the RS stock number and manufacturer part - Save the datasheet and the specification rows - Confirm the selling price before ordering ## Error codes | Code | Meaning | |---|---| | 400 | Empty query, another website, or a search link | | 404 | The product sheet was not on the page | | 500 | The fetch failed |