List Products
Retrieve a list of all products.
Use the optional query parameters to filter the results. You can filter the results further by specifying one or more Product fields as additional query parameters.
ending_before
The ID of the product created after the last product you want to retrieve.
limit
The maximum number of products to return. Range: 1-100. Default is 10.
starting_after
The ID of the product created before the first product you want to retrieve.
Code Samples
.NET
using System; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { int limit = 2; string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/products?limit={limit}"); 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&limit=2' ); 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&limit=2'); 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=f'/v1/products&limit=2') pprint(result)
/v1/products
List Products
curl -X get https://sandboxapi.rapyd.net/v1/products?limit=2 -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": "5dcfb3c6-962f-4465-9578-534e2a560379" }, "data": [ { "id": "product_0d9dc6be69c769560fe913f3b086d8ca", "active": true, "attributes": [ "armrest", "color", "cover" ], "created_at": 1592299157, "description": "The ultimate in comfort for the dedicated gamer.", "metadata": { "merchant_defined": true }, "name": "Gamer's Red Chair", "package_dimensions": { "height": 10, "length": 20, "weight": 100, "width": 40 }, "shippable": true, "skus": [], "statement_descriptor": "", "type": "goods", "unit_label": "", "updated_at": 1592300812 }, { "id": "product_ab9599d248f6d4d4311148aea68e20d0", "active": true, "attributes": [ "location", "size" ], "created_at": 1592299027, "description": "Monthly parking - covered area, compact car", "metadata": { "merchant_defined": true }, "name": "Monthly parking", "package_dimensions": { "height": 0, "length": 0, "weight": 0, "width": 0 }, "shippable": false, "skus": [], "statement_descriptor": "", "type": "services", "unit_label": "", "updated_at": 1592299027 } ] }