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

  1. Go to RapNet API Access.
  2. Activate Your API Credentials which contain a Client ID and Client Secret.
  3. Copy and insert these credentials to use when creating the token.  See example:
  4. 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.

For 3rd party Token activation, 
Please select the 3rd Party Vendor Token Tab.

				
					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.eyJodHRwOi8vcmFwYXBvcnQuY29tL3VzZXIiOnsiYWNjb3VudElkIjoxMTUwNzR9LCJodHRwOi8vcmFwYXBvcnQuY29tL3Njb3BlIjpbInByaWNlTGlzdFdlZWtseSI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dE1vbnRobHkiLCJiZXRhIiwiaW5zdGFudEludmVudG9yeSIsIm1lbWJlckRpcmVjdG9yeSIsInNlYXJjaCIsImluc3RhbnRJbnZlbnRvcnlTZXR1cCIsIm1hbmFnZUxpc3RpbmdzRmlsZSIsImJ1eVJlcXVlc3RzQWRkIiwiaXRlbVNoYXJlZCIsInRyYWRlQ2VudGVyIiwibXlDb250YWN0cyIsIm1lbWJlclJhdGluZyIsImNoYXQiLCJtYW5hZ2VMaXN0aW5ncyIsImxlYWRzIiwiYWRtaW4iLCJidXlSZXF1ZXN0cyJdfSwiaXNzIjoiaHR0cHM6Ly9yYXBhcG9ydC5hdXRoMC5jb20vIiwic3ViIjoiZ1Vja0lRejBSaEVqQ0R4Z2ZOenUyNE5zd3M2NGo5VXBAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vYXBpZ2F0ZXdheS5yYXBuZXRhcGlzLmNvbSIsImlhdCI6MTcwODIwODUyOSwiZXhwIjoxNzA4Mjk0OTI5LCJhenAiOiJnVWNrSVF6MFJoRWpDRHhnZk56dTI0TnN3czY0ajlVcCIsInNjb3BlIjoiYXBpR2F0ZXdheSIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.OzPeC6iAiUQtPKreRVElt4had4zLkBsH9uTUOtwe9fE_99YM1GkouMmuwAUwXn1JptrUGLhv-VwtxvI_MnVLpRVMw2P7rcFtnQ1QPQJNxuar73vXTrORKP0i3nRnyNrsacKhi5KAMBlSVO-JmgAUHbJM5C42cpjG0c4GneZym1WlnErX8Ly2OrTGa3wjwZN3qIIaygjn0Fxrk0c11eNhFXeBqC_C1E3ViiRlNMM9FXRM-nwy9ZJ9DOvWU-IRURQsvmv7awEX-U1hzVPxBaI6JG894EYBkS_BYcl5aOvFxneGMT2hHUQ3yJTnmO9AD58p4HWzv5dOIcnWY9AnX32z_w",
    "scope": "apiGateway",
    "expires_in": 43825,
    "token_type": "Bearer"
}
				
			
Place Bearer Token

3rd Party Vendor Access

This is used Rapnet Vendors who need 3rd party access.

				
					GET /api/get HTTP/1.1
Host: authztoken.api.rapaport.com
Content-Type: application/json
Content-Length: 174

https:
	&response_type=code
	&client_id=1YC9erJlqmXupO7PTUoMr2ecz2YVS7A4
	&redirect_uri=https:
	&audience=https:
	&scope=manageListings%20priceListWeekly%20instantInventory
				
			
FieldValue
response_typeShould be code
client_idSystem setting: Authorization client id
redirect_uriRedirect uri for redirection after authentication should be on of the callbacks specified in authorization client
audienceSystem setting: Audience, should be https://apigateway.rapnetapis.com 
scopeSystem setting: Scope to access API Gateway, should include required scope per API separated by encoded space (%20), for example: manageListings%20priceListWeekly%20instantInventory
  1. Authenticate with the proper user
  2.  Accept user consent.

3. an authorization code is created, 
Add the “code” to the following API code.

Example
https://localhost:5000/?code=k-LUTtCvZXYfOXObfJ0cW_EgpPjrSPxB5uV8hMpezFfPs.

This will create an access token 

 

				
					GET /api/get HTTP/1.1
Host: authztoken.api.rapaport.com
Content-Type: application/json
Content-Length: 351

curl --location --request POST 'https:
--header 'Content-Type: application/json' \
--data-raw '{
    "client_id":"1YC9erJlqmXupO7PTUoMr2ecz2YVS7A4",
    "client_secret":"yzZUZS_GAtllblJzCfbeW2Rsx_u6yuOT4eitZWiZQi0K1zwGIBgT2pYKZ0x-m_Wn",
    "code": "k-LUTtCvZXYfOXObfJ0cW_EgpPjrSPxB5uV8hMpezFfPs",
    "redirect_uri": "https://localhost:5000"
}'
				
			
FieldValue
client_idSystem setting: Authorization client id
client_secretSystem setting: Authorization client secret
codeAuthorization code received from Auth0 during authentication
redirect_uriRedirect uri for redirection after authentication should be on of the callbacks specified in authorization client

4. Use the access token to call the API.

				
					{
    "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6Ik",
    "scope": "apiGateway",
    "expires_in": 86399,
    "token_type": "Bearer"
}
				
			

RapNet Api's

SDK Packages

To use a specific Software Development Kit, there are 3 steps.

  1. Activate your API Credentials.
  2. Create your Login Token – as explained above.
  3. Download your required SDK package.
  4. Choose from the menu and go to the corresponding SDK.  
 

SDK

Download one of the SDK packages below, then click on the SDK  link :

 

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:

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:

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()

Links & Help Articles

Accessibility