Overview

All requests to PurplX API must be authenticated using OAuth 2.0 with the client_credentials grant type.

API Root URL (Sandbox)

Use the following base URL when making requests to the sandbox environment:

https://api.sandbox.purplx.me

The PurplX Tenant as well as its Partners who wishes to access the PurplX instance’s features via its API must first sign up for a Partner account, which can then be used to log in to the PurplX API site to generate the OAuth 2.0 Application and generate the credentials needed to access the API.

Partners (including the Tenant themselves) must:

  1. Create an account on the PurplX API site.
  2. Create an OAuth 2.0 application to obtain a client_id and client_secret.
  3. Exchange these credentials for an access token using the client_credentials grant.
  4. Include the access token in the Authorization header for all subsequent API calls.

Create a Partner Account

PurplX Tenants and their partners must have a Partner account that can be used on the PurplX API site.

For a PurplX Tenant, if you have access to the PurplX Portal:

  1. Log in to the PurplX Portal using an account with access to the Users section of the Portal.
  2. Create a Partner. Set its type accordingly, like ‘Corporate’, ‘Merchant’, etc.
  3. Create a User and set its role as ‘Partner’ and select the Partner that was created.

For a PurplX Tenant without access to the PurplX Portal, or for a Partner of a PurplX Tenant, please communicate with a Business Development team member to request for a Partner Account.

Create an OAuth Application

After obtaining a Partner Account:

  1. Navigate to the PurplX API site. The URL of this API site depends on the PurplX instance so please check the instruction of Business Development for the exact URL of the API site of the PurplX instance.
  2. Log in with your Partner Account.
    1. Optional, but highly recommended: update your Partner Account’s password to keep it secure.
      1. Click on the link for the /users/ endpoint, which will return the User resource for your account with a url value.
      2. Client on the url of your User resource entry. You will be taken to your User resource detail view with an HTML form for updating its password.
      3. Set a new password. Purpl recommends a password of at least twelve (12) characters with a mix of letters, numbers, and special characters.
      4. Click on the PUT button to save your new password.