Retrieve Product
Retrieve details of a product or service.
Code Samples
.NET
using System; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { string product = "product_0d9dc6be69c769560fe913f3b086d8ca"; string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/products/{product}"); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Error completing request: " + e.Message); } } } }
JavaScript
const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest; async function main() { try { const result = await makeRequest( 'GET', '/v1/products/product_0d9dc6be69c769560fe913f3b086d8ca' ); console.log(result); } catch (error) { console.error('Error completing request', error); } }
PHP
<?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/<path-to-your-utility-file>/utilities.php"; include($path); try { $object = make_request('get', '/v1/products/product_0d9dc6be69c769560fe913f3b086d8ca'); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
Python
from pprint import pprint from utilities import make_request result = make_request(method='get', path='/v1/products/product_0d9dc6be69c769560fe913f3b086d8ca') pprint(result)
/v1/products/:product
Retrieve Product
curl -X get 'https://sandboxapi.rapyd.net/v1/products/product_dfe57370fa32091b4cd7132abdac5edb' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here'
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "80775c23-8f48-4f81-a143-7821b03bb001" }, "data": { "id": "product_dfe57370fa32091b4cd7132abdac5edb", "active": true, "attributes": [ "arm_rest", "color" ], "created_at": 1763307235, "description": "The ultimate in comfort for the dedicated gamer.", "images": [], "metadata": {}, "name": "Gamer's Chair", "package_dimensions": { "height": 10, "length": 20, "weight": 30, "width": 40 }, "shippable": true, "skus": [], "statement_descriptor": "", "type": "goods", "unit_label": "", "updated_at": 1763307235 } }