API Get Business Info

Step 1: Retrieving Business ID from the URL 
When initiating a plan renewal, EasySocial appends a unique business ID to the plan renewal URL(provided by the partner). This ID is specific to each business and looks like this: 
learn how to setup custom business renewal url.

https://your-partner-url.com/renew?business_id=123456

OR 

if you have saved the business id during the account setup process, you may use the same id to proceed to the next step.

Step 2: Fetching Business Information with Business Info Auth API 
Using the appended business ID, you'll first call the Business Info Auth API. This will generate a signature required for further actions.

GET

https://partners-api.easysocial.in/:businessId/business-info-auth


Sample header payload

{
    "token":"466d2e086a8f4f24bcb70789fee"
}


Example Response 

{
  "status": 200,
  "success": true,
  "message": "success",
  "payload": "/api/372/get-business-info?signature=eyJtZXNzYWdlIjoiL2FwaS8zNzIvZ2V0LWJ1c2luZXNzLWluZm8iLCJleHBpcnlEYXRlIjoiMjAyNC0wNS0zMVQxMzowNjoyNC4xOTNaIn0.im0J03PDUx2wNt5NkRwC0l6B1JCM-L0VQAhDKaZQ02c"
}


Step 3: Retrieving Detailed Business Information 
With the signature generated from the previous API call (step 2) and the business ID(step 1), you can now call the Get Business Info API to retrieve all relevant information about the business, such as the current plan details and the upcoming plan (if any).

GET

https://partners-api.easysocial.in/:businessId/get-business-info?signature=eyJtZXNzYWdlIjoiL2FwaS8zNzIvZ2V0LWJ1c2luZXNzLWluZm8iLCJleHBpcnlEYXRlIjoiMjAyNC0wNS0zMVQxMzowNzoxOC4zMDhaIn0.-AKAYV9k8U7xtEM2l-y9ATT4nV1mMy2rz0cKkU5R1rI


Sample header payload

{
    "token":"466d2e086a8f4f24bcb70789fee"
}


Example Response 
 

{
    "status": 201,
    "success": true,
    "message": "Business Information.",
    "payload": {
        "businessDetail": {
            "businessOwnerId": 0,
            "business_name": "business name",
            "industry": "Automotive",
            "mobile_number": "+91XXXXXXXX",
            "address": "business address",
            "country": "XX",
            "state": "XXX",
            "city": "XXX",
            "pin_code": "XXX",
            "website": "http://google.com",
            "billing_detail": {
                "company_name": "business name",
                "number": "+91XXXXXXXXXX",
                "address": "business address",
                "city": "Jaipur",
                "state": "Rajasthan",
                "country": "U.s.a",
                "pin_code": 00000
            }
        },
        "activePlan": {
            "name": "test business",
            "linked_plan_id": 3,
            "validity": 30,
            "slug": "XXXX",
            "selling_amount": 0000,
            "partner_discount_amount": null,
            "id": 72,
            "startDate": "2024-05-28T00:00:00.000+05:30",
            "endDate": "2024-06-26T00:00:00.000+05:30",
            "status": "EXPIRED"
        },
        "upcomingPlan": {
            "name": "test business",
            "linked_plan_id": 3,
            "validity": 30,
            "slug": "XXXX",
            "selling_amount": 3000,
            "partner_discount_amount": null,
            "id": 72,
            "startDate": "2024-06-26T00:00:00.000+05:30",
            "endDate": "2024-07-25T23:59:59.000+05:30",
            "status": "IN_QUEUE"
        }
    }
}


KEY PARAMETERS

  • Token- The "Partner API access token" to authenticate the request.
  • Business Id- Business Id is a unique identifier given by EasySocial for each partner business.