Mobile APP Callbacks API Documentation

User Login

This will check for user login at InfusionSoft and WordPress, both at once.


https://guitarzoom.com/wp-admin/admin-ajax.php

Parameters

Name Description
action*
String
_app_user_login
Required
log*
String
email of the user
Required
pwd*
String
password of the user
Required

Usage and Samples


$('#loginform').on('submit', function(e){
    e.preventDefault()

    let str = {
        action: '_app_user_login',
        log: $(this).find('input[name=log]').val(),
        pwd: $(this).find('input[name=pwd]').val(),
    };

    jQuery.ajax({
        type: "POST",
        url: 'https://guitarzoom.com/wp-admin/admin-ajax.php',
        data: str,
        beforeSend: function () {
             // maybe a preloader?
        },
        success: function (data) {
            var response = jQuery.parseJSON(data)
            if(response.success){
                // return login logic, all good
            } else {
                // return error message
            }
        },
        error: function (jqXHR, textStatus, errorThrown) {
            // error handling
        }
    });
})

Responses

Returns Value Description
success
integer
value: 1
State of the response
data
object
Data collection for an user
data.wp_user_id
integer
value: 12345
WordPress User ID
data.is_user_id
integer
value: 56789
Infusionsoft User ID
data.first_name
string
value: John
First name of the user pulled from Infusionsoft
data.last_name
string
value: Doe
Last name of the user pulled from Infusionsoft
data.tags
array
value: 1457,3154
User tags pulled from Infusionsoft.
Returns Value Description
success
integer
value: 0
State of the response
message
string
Fail error

User Register

This action will do multiple checks inside of Infusionsoft and WordPress to check if the user already exists, otherwise create a new account in both platforms.


https://guitarzoom.com/wp-admin/admin-ajax.php

Parameters

Name Description
action*
String
_app_user_register
Required
first_name*
String
first name of the user
Required
last_name*
String
last name of the user
Required
email*
String
email of the user
Required
password*
String
password of the user
Required
tags*
Array
tags to apply in infusionsoft for user ( [11871, 11875 + tags coming from quiz] )
Required

Usage and Samples


$('#registerform').on('submit', function(e){
    e.preventDefault()

    let str = {
        action: '_app_user_register',
        first_name: $(this).find('input[name=first_name]').val(),
        last_name: $(this).find('input[name=last_name]').val(),
        email: $(this).find('input[name=email]').val(),
        password: $(this).find('input[name=password]').val(),
        tags: [11871, 11875]
    };

    jQuery.ajax({
        type: "POST",
        url: 'https://guitarzoom.com/wp-admin/admin-ajax.php',
        data: str,
        beforeSend: function () {
             // maybe a preloader?
        },
        success: function (data) {
            var response = jQuery.parseJSON(data)
            if(response.success){
                // return login logic, all good
            } else {
                // return error message
            }
        },
        error: function (jqXHR, textStatus, errorThrown) {
            // error handling
        }
    });
})

Responses

Returns Value Description
success
integer
value: 1
State of the response
message
string
Success message
Returns Value Description
success
integer
value: 0
State of the response
message
string
Fail error