API Resource

Authentication

The API endpoints require an API Token to be present with all the requests. This api_token has to be passed in via the query strings.

GET /api/v1/health?api_token=super_secret_api_token_generated_from_your_account

To generate an API Token navigate to https://ignite.pulseloyalty.com/settings and then to API section and generate a token.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/8ce5743a-1479-4bd1-a6ce-f6ceda5933b0/Screen_Shot_2020-08-27_at_9.11.06_am.png

Contacts Resource

Creating a new contact

POST /api/v1/contacts?api_token={api_token}

// Request format and rules
{
	contact_id: string|required|unique,
	first_name: string|optional,
	last_name: string|optional,
	email: string|optional|unique,
	phone: string|optional|unique,
	notification_opt_in: boolean|optional,
}

// Response 422 Validation Error
{
    "success": false,
    "message": "Validation failed.",
    "error": {
        "contact_id": [
            "The contact id has already been taken."
        ]
    }
}

// Response 200
{
    "success": true,
    "data": {
        "contact_id": "very_unique_customer_id_999",
        "name": null,
        "email": null,
        "phone": null,
        "notification_opt_in": false,
        "created_at": "2020-08-26T23:05:44.000000Z",
        "updated_at": "2020-08-26T23:05:44.000000Z"
    }
}

Update Contact