CREATE AN ACCOUNT

Sign up for an account


Gaining access to the API portal

  1. Go to the sign up page: https://subdirect.portal.azure-api.net/signup/
  2. Fill out the form, proving you aren't a robot.
  3. Check for a confirmation email.
  4. Sign in with your new account!

Now that you have access the Subdirect API portal, you can proceed.

When you are finished, you will be able to read through our API specification and place test requests directly through the browser!

Subscribe to the BPerx API


The next step is to subscribe to the BPerx API.

  1. Open the PRODUCTS page from the header
  2. Select the BPerxApi
  3. Click the Subscribe button, and then hit Confirm
  4. Sit tight! A member of the Subdirect team needs to approve your subscription.

Waiting to be approved...

Let your business development contact know when you have requested your subscription and we will grant access. You can also reach out to susan@bperx.com with any questions

Managing your subscription keys


Your subscription keys need to be kept secret!

Each subscription has a pair of two keys. Be sure to keep them out of publicly accessible files. It's a good idea to regenerate your subscription key a few times per year.

Uh oh! Have your subscription keys been compromised?

If you suspect your subscription keys are being used by a bad actor, you will need to regenerate them.

From your user profile, you can regenerate your subscription keys. A link to your profile can be found in the header, by clicking on your user name and opening the context menu.

LEARN TO USE THE API

API spec + test panel


Getting familiar with the API

With an active subscription, you can access sample API code and a testing panel.

  1. Open the APIS page from the header.
  2. Select the API you want to learn about: BPerx Standalone API.
  3. Select the operation you want to learn more about in the side panel.

After you select an operation, you will find its technical specifications. Look around and you'll find request URLs, request and response types, etc. Explore at your own pace!

Ready to get your hands dirty?

Click on the Try it button, found under each operation, to activate the testing panel where you can submit real requests to the API.

If you run into any problems, refer back to this document. The sections below are comprised of useful context and common errors for each operation.

COMMON ERRORS GETTING SET UP

Subscription Key for all requests


Ocp-Apim-Subscription-Key

Every call to the BPerx API needs a request header with the name Ocp-Apim-Subscription-Key.

The value for this header needs to be one of your active subscription keys.

Having trouble submitting a request to the API?

If the Ocp-Apim-Subscription-Key header is missing, or otherwise invalid, you will see a response status of 401 Access Denied, and the response body will have a message hinting at the cause.

If you see the below message, please double check the Ocp-Apim-Subscription-Key request header.


        "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."
        

Ready to go live?

The same subscription key you used for testing can also be used in production for the Ocp-Apim-Subscription-Key request header! If you aren't sure where to find this, refer back to your profile in the Subdirect API portal.

Secret Key for GET requests


Secret Key

All GET operations in the BPerx API require a secretKey in the request query parameters. The secretKey gives you access to a specific voucher program. To test, you can use test-key as a secretKey.

Keep in mind that the secretKey and the Ocp-Apim-Subscription-Key are two completely different values!

Having trouble with submitting a request to the API?

If the secretKey parameter is missing, or otherwise invalid, you will see a response status of 400 Bad Request, and the response body will have a message hinting at the cause.

If you see the below message, please double check the secretKey request parameter.


        "Invalid secret key."
        

Ready to go live?

When you are ready to go live, test-key is no longer a suitable value for secretKey! We will provide you with a unique secretKey for your own voucher program.