To get full value of the Brandbassador we recommend a full integration. This will allow your ambassadors to create personalised discount codes and unique tracking links, earn commission on sales generated and automatically withdraw gift card they have earned. It also allows you to track the revenue generated by the discount code and/or reference in the tracking link being returned to Brandbassador when used in checkout to track the sale to the right user.

The User will also be rewarded in gift card that they should be able to withdraw in a set amount to spend in any currency.

This article explains how to allow for discount code creation through API, the first step in a successful integration. If you have already done this and need to set up tracking of sales please check this article

FIRST STEP: Allow discount code creation through API

We need you to set up an endpoint where we can send GET requests to create discount codes and gift cards. It just needs to accept the parameters (query strings) explained below, and return a HTTP 200 upon success. Success/error messages should be returned as JSON for our own logging purposes. 

In order for ambassadors to create discount codes and withdraw their gift cards, the Brandbassador system needs to programmatically create these through an API endpoint on the brands’ side. This enables the brand to automatically award users with gift cards, and enables the users to create customized discount codes like JOHN20OFF.

API endpoint example:

http://www.example.org/brandbassador/discountCodeCreate?

Needs to accept the following GET parameters in which all are required*

Example URL percent discount code: 

www.yoururl.com/brandbassador/discountCodeCreate?code=JOHN20OFF&description=bbcode&percent=20&totime=2018-12-12&auth=a444g9828ya64a2

Example URL gift card (set amount with currency):

www.yoururl.com/brandbassador/discountCodeCreate?code=JOHNGIFT&description=bbcode&amount=20&totime=2018-12-12&usage_limit=1&auth=a444g9828ya64a2&currency=USD

When the code is created the webshop needs to return a status of "success" if ok or "status":0, "error" if error provide details like:

{"status" : "success"} - the code is created in the webshop and ready to use

{“status”:0, “error” : “Discount code already exists”} - if the code already exists in the webshop

{“status”:0, “error” : “Error description”} - if any other error

NOTES:

  • The discount code should not be case sensitive
  • Only A-Z and 0-9
  • VALUE format like 1000.00
  • Date standard yyyy-mm-dd
  • Value is total purchase value (not including shipping)

SECOND STEP - Insert your authentication code to connect Brandbassador

  1. Go to your Settings > Integrations in your Brandbassador platform admin.brandbassador.com, insert your discount code percentage and click 'Add Webshop' next to 'Custom Webshop'.
  2. Select the base currency of your webshop and click 'Save Currency'.If you have multiple webshop with different currencies you go through this flow once for each of your webshops.
  3. Insert the destination of your endpoint URL (i.e. https://www.example.org/brandbassador/
  4. You have now received your authentication key, which allows your webshopto communicate with the Brandbassador API.

To complete your integration you also have to implement the tracking to make sure ambassadors are given the commission, and revenue is tracked in the Brandbassador platform.

We always recommend to test your Integration to make sure it is working as it should.

Did this answer your question?