Rapaport Developer Documentation
Introduction
Welcome to Rapaport’s Developer and API & SDK integration guides.
This platform is a core part of Rapaport’s mission to support our members with diamond pricing information and selling opportunities.
These documents explain how to connect to Rapaport’s APIs and SDKs, integrate the Rapaport Price Lists in your diamond software, connect your systems or inventory with RapNet, and use RapNet Instant Inventory to showcase diamonds and/or jewelry in your online store.
API and SDK Overview
To get the most value out of RapNet, our APIs and SDKs are designed to allow companies of any shape or size to build robust integrations into their software, website, or RapNet itself.
We offer both APIs and Software Development Kits (SDKs) as methods for integrating development software.
Rapaport APIs:
Rapaport SDK Packages:
Note: To use our APIs or SDKs, you will need to subscribe to a paid Rapaport plan and have a Login Token.
Login Token Requirements
To use our new API codes or SDK packages, you will need to create a Login Token. The Login Token works with API credentials which you can activate from your RapNet account.
Use the same Token for all API services.
Create the Login Token
- Go to RapNet API Access.
- Activate Your API Credentials which contain a Client ID and Client Secret.
- Copy and insert these credentials to use when creating the token. See example:
- Copy the Token response and place it the Authorization Tab of your API.
Note: When obtaining the authorization token, the response is valid for 24 hours.
Use the token until it is expired and then re-aquire a new token .
You can use the same token for all API applications.
POST /api/get HTTP/1.1
Host: authztoken.api.rapaport.com
Content-Type: application/json
Content-Length: 142
{
"client_id":"s78qaoOd9efr5dQm9hsX3gZ",
"client_secret":"B-4kr4b2nwonivo08tb-Z6B-L7sNJkjDnyZMGPbGbCvpfRcRf5FyGd"
}
Token -Response
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik16aERRMFExTURFeVJqSTNRa0k0TTBGRVJUZzFNekUzTWtOQ09UTXhNREZDTVVZM1JURkNNZyJ9.eyJodHRwOi8vcmFwYXBvcnQuY29tL3VzZXIiOnsiYWNjb3VudElkIjoxMTUwNzR9LCJodHRwOi8vcmFwYXBvcnQuY29tL3Njb3BlIjpbInByaWNlTGlzdFdlZWtseSIsImluc3RhbnRJbnZlbnRvcnkiLCJtYW5hZ2VMaXN0aW5ncyJdLCJodHRwOi8vcmFw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SIsInNlYXJjaCIsImluc3RhbnRJbnZlbnRvcnlTZXR1cCIsIm1hbmFnZUxpc3RpbmdzRmlsZSIsImJ1eVJlcXVlc3RzQWRkIiwiaXRlbVNoYXJlZCIsInRyYWRlQ2VudGVyIiwibXlDb250YWN0cyIsIm1lbWJlclJhdGluZyIsImNoYXQiLCJtYW5hZ2VMaXN0aW5ncyIsImxlYWRzIiwiYWRtaW4iLCJidXlSZXF1ZXN0cyJdfSwiaXNzIjoiaHR0cHM6Ly9yYXBhcG9ydC5hdXRoMC5jb20vIiwic3ViIjoiZ1Vja0lRejBSaEVqQ0R4Z2ZOenUyNE5zd3M2NGo5VXBAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vYXBpZ2F0ZXdheS5yYXBuZXRhcGlzLmNvbSIsImlhdCI6MTcwODIwODUyOSwiZXhwIjoxNzA4Mjk0OTI5LCJhenAiOiJnVWNrSVF6MFJoRWpDRHhnZk56dTI0TnN3czY0ajlVcCIsInNjb3BlIjoiYXBpR2F0ZXdheSIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.OzPeC6iAiUQtPKreRVElt4had4zLkBsH9uTUOtwe9fE_99YM1GkouMmuwAUwXn1JptrUGLhv-VwtxvI_MnVLpRVMw2P7rcFtnQ1QPQJNxuar73vXTrORKP0i3nRnyNrsacKhi5KAMBlSVO-JmgAUHbJM5C42cpjG0c4GneZym1WlnErX8Ly2OrTGa3wjwZN3qIIaygjn0Fxrk0c11eNhFXeBqC_C1E3ViiRlNMM9FXRM-nwy9ZJ9DOvWU-IRURQsvmv7awEX-U1hzVPxBaI6JG894EYBkS_BYcl5aOvFxneGMT2hHUQ3yJTnmO9AD58p4HWzv5dOIcnWY9AnX32z_w",
"scope": "apiGateway",
"expires_in": 43825,
"token_type": "Bearer"
}
Place Bearer Token
API & SDK Integration
API
Click on the API that you wish to use:
SDK
Choose and download one of the SDK packages below, then click to go to the SDK code you require:
SDK Packages
To use a specific Software Development Kit, there are 3 steps.
- Activate your API Credentials.
- Create your Login Token – as explained above.
- Download your required SDK package.
- Choose from the menu and go to the corresponding SDK.
SDK Package Download
Install package:
composer require rapnet/price_list
Initialize:
use Rapnet\RapnetPriceList\Index;
require_once './vendor/autoload.php';
Get token:
$pricelist = new Index($clientId, $clientSecret);
$token = $pricelist->getAuthTokenMachineToMachinMethod()
Install package:
npm js_jewelry_routers_pack
Initialize:
import jewelryRouters from 'js_jewelry_routers_pack';
Get token:
token = jewelryRouters.getAuthToken(authCode, cliantId, secret, userRedirectUrl)
Install package:
composer require rapnet/instant_inventory
Initialize:
use Rapnet\RapnetInstantInventory\Index;
require_once './vendor/autoload.php';
Get token:
$iinventory = new Index($clientId, $clientSecret);
$token = $iinventory->createAuthorizationCodeToken()
Install package:
npm js_jewelry_routers_pack
Initialize:
import jewelryRouters from 'js_jewelry_routers_pack';
Get token:
token = jewelryRouters.getAuthToken(authCode, cliantId, secret, userRedirectUrl)
Install package:
composer require rapnet/rapnet_media_upload
This will install package with production environment values, but if you want to have another environment values you can run script manually
composer run-script build-dev
composer run-script build-stage
Initialize:
use Rapnet\RapnetMediaUpload\Index;
require_once './vendor/autoload.php';
Get token:
$media = new Index($clientId, $clientSecret);
$token = $media->createAuthorizationCodeToken()
Install package:
npm js_jewelry_routers_pack
Initialize:
import jewelryRouters from 'js_jewelry_routers_pack';
Get token:
token = jewelryRouters.getAuthToken(authCode, cliantId, secret, userRedirectUrl)