NAV Navbar
json

Introduction

  _____                   _
 |  __ \            /\   | |
 | |__) | __ ___   /  \  | |__   ___  _ __   ___
 |  ___/ '__/ _ \ / /\ \ | '_ \ / _ \| '_ \ / _ \
 | |   | | | (_) / ____ \| |_) | (_) | | | | (_) |
 |_|   |_|  \___/_/    \_\_.__/ \___/|_| |_|\___/

Welcome to the "Developer Tutorial - Quick Integration Guide".

Integration of ProAbono is achieved in 3 API calls.

Prerequisite: You succeed to make your first request using API.

Add or Update a Customer

Example Request
POST https://api-2.proabono.com/Customer
{
    "ReferenceCustomer": "123456",
    "Name": "John Doe",
    "Email": "john@doe.com",
    "Language": "en"
}
Example Response
{
    "Id": 64079,
    "ReferenceCustomer": "123456",
    "ReferenceSegment": "sandbox-eur",
    "Name": "John Doe",
    "Email": "john@doe.com",
    "Links": [
        {
            "rel": "hosted-collection-offers",
            "href": "https://sandbox-eur.proabono.com/offers/{Unique-Encrypted-URL}"
        },
        {
            "rel": "hosted-collection-subscription",
            "href": "https://sandbox-eur.proabono.com/subscriptions/{Another-Unique-Encrypted-URL}"
        }       
    ]
}

Make this call everytime a user sign-in into your application.
In the request, you provide a unique reference along with a few basic information on the user.

ProAbono will insert a new Customer or update an existing one if the reference already exists.

Short Definition: POST https://api-{IdBusiness}.proabono.com/Customer

Note: replace https://api-{IdBusiness}.proabono.com by your endpoint.

See API Reference - POST Customer Definition

Display the ProAbono widget

Example Request
GET https://api-2.proabono.com/Customer?ReferenceCustomer=123456
Example Response
{
    "Id": 64079,
    "ReferenceCustomer": "123456",
    "ReferenceSegment": "sandbox-eur",  
    "Name": "John Doe",
    "Email": "john@doe.com",
    "Language": "en",
    "Links": [
        {
            "rel": "hosted-collection-offers",
            "href": "https://sandbox-eur.proabono.com/offers/{Unique-Encrypted-URL}"
        },
        {
            "rel": "hosted-collection-subscription",
            "href": "https://sandbox-eur.proabono.com/offers/{Another-Unique-Encrypted-URL}"
        }       
    ]
}

Make this call in a dedicated Subscription page of your application.
In the request, you provide the Customer unique reference.
The response will contains a unique URL to use as source of a secured iframe.
ProAbono will display all information for the customer to subscribe or manage its subscription.

iFrame Code:
<iframe src="{url-hosted-page}" width="100%" height="600" frameborder="0"></iframe>

Replace {url-hosted-page} by the Url "hosted-collection-subscription" retrieved with
GET https://api-{IdBusiness}.proabono.com/Customer/Customer?ReferenceCustomer={ref}

Note: replace https://api-{IdBusiness}.proabono.com by your endpoint.

See API Reference - GET Customer Definition

Check Quantity

Example Request
GET https://api-2.proabono.com/Feature?ReferenceFeature=users&ReferenceCustomer=123456
Example Response
{
    "Id": 48,
    "ReferenceFeature": "users",
    "IsVisible": true,
    "TypeFeature": "Limitation",
    "TitleLocalized": "Active Users",   
    "QuantityIncluded": 3,
    "QuantityCurrent": 4,
    "DatePeriodStart": "2015-07-27T13:22:57.05Z",
    "DatePeriodEnd": "2015-08-27T13:22:57.05Z"
}

Make this call when a user is accessing a resource available to customers only.
In the request, provide the Customer unique reference and the Feature unique reference.
The response will tell you if the user is allowed to access the resource and for what quantity.
This simple mechanism has many usages, check this page to know more.

Short Definition: GET https://api-{IdBusiness}.proabono.com/Feature?ReferenceFeature={RefFeature}&ReferenceCustomer={RefCustomer}

Note: replace https://api-{IdBusiness}.proabono.com by your endpoint.

See API Reference - GET Feature Quantity Definition