//Java Code Sample
public void UserRegister()
{
    String url = "https://buffer.blipnow.com/BufferService.svc/UserRegister";
    
    UserInfo userInfo = new UserInfo();
    userInfo.ApplicationId = "9a680ce6-a627-4b93-8a86-d4d27495705a";
    userInfo.NameSurname = "Name and surname of user";
    userInfo.Phone = "+905555555555";
    userInfo.Email = "abc@xyz.com";
    userInfo.WebAuth = "1";
    userInfo.Password = "abcxyz";
    userInfo.DeviceID = "123456";
    userInfo.DeviceToken = "65665665464564165513213";
    userInfo.DeviceType = "IPHONE";  // WEB, IPHONE, Android, SMS, EMAIL, WEB (Safari,MacOS)
    userInfo.IpAddress = "78.125.89.45";
    userInfo.Country = "Turkey";
    userInfo.ExternalUserID = "external ID of user";
    userInfo.AuthEmail = "1";
    userInfo.AuthPush = "1";
    userInfo.AuthSms = "1";
    
    clientObject co = new clientObject();
    co.userinfo = userInfo;
            
    ObjectMapper mapper = new ObjectMapper();

    try
    {
        String jsonString = mapper.writeValueAsString(co);
        byte[] postData = jsonString.getBytes(StandardCharsets.UTF_8);
        
        URL myurl = new URL(url);
        HttpURLConnection con = (HttpURLConnection) myurl.openConnection();

        con.setDoOutput(true);
        con.setRequestMethod("POST");
        con.setRequestProperty("User-Agent", "Java client");
        con.setRequestProperty("Content-Type", "application/json");

        try (DataOutputStream wr = new DataOutputStream(con.getOutputStream())) {
            wr.write(postData);
        }
    }
    catch(Exception ex)
    {
        
    }
}

public void DeviceRegister()
{
    String url = "https://buffer.blipnow.com/BufferService.svc/DeviceRegister";
    
    UserInfo userInfo = new UserInfo();
    userInfo.ApplicationId = "9a680ce6-a627-4b93-8a86-d4d27495705a";
    userInfo.Phone = "+905555555555";
    userInfo.Email = "abc@xyz.com";
    userInfo.DeviceID = "123456";
    userInfo.DeviceToken = "65665665464564165513213";
    userInfo.IpAddress = "78.125.89.45";
    userInfo.Country = "Turkey";
    userInfo.ExternalUserID = "external ID of user";
    
    clientObject co = new clientObject();
    co.userinfo = userInfo;
            
    ObjectMapper mapper = new ObjectMapper();

    try
    {
        String jsonString = mapper.writeValueAsString(co);
        byte[] postData = jsonString.getBytes(StandardCharsets.UTF_8);
        
        URL myurl = new URL(url);
        HttpURLConnection con = (HttpURLConnection) myurl.openConnection();

        con.setDoOutput(true);
        con.setRequestMethod("POST");
        con.setRequestProperty("User-Agent", "Java client");
        con.setRequestProperty("Content-Type", "application/json");

        try (DataOutputStream wr = new DataOutputStream(con.getOutputStream())) {
            wr.write(postData);
        }
    }
    catch(Exception ex)
    {
        
    }
}

public void SendNotification()
{
    String url = "https://buffer.blipnow.com/BufferService.svc/SendNotification";
    
    List<PushNotification> pushNotifications = new ArrayList<PushNotification>(); 
    List<Device> deviceNotification = new ArrayList<Device>();
    deviceNotification.add(new Device("123456")); //DeviceID
    deviceNotification.add(new Device("abc@xyz.com")); //Email
    deviceNotification.add(new Device("ID of user")); // UserID

    PushNotification pushNotification = new PushNotification();
    
    pushNotification.ApplicationId = "9a680ce6-a627-4b93-8a86-d4d27495705a"; 
    pushNotification.Devices = deviceNotification; 
    pushNotification.Message = "Notification Title 1"; 
    pushNotification.MessageTitle = "Notification Body 1"; 
    pushNotification.MessageType = "Text";

    pushNotifications.add(pushNotification);

    // Notification #2
    pushNotification = new PushNotification();

    deviceNotification = new ArrayList<Device>();
    deviceNotification.add(new Device("external ID of user")); // ExternalUserID

    pushNotification.ApplicationId = "9a680ce6-a627-4b93-8a86-d4d27495705a";
    pushNotification.Devices = deviceNotification;
    pushNotification.Message = "Notification Title 2";
    pushNotification.MessageTitle = "Notification Body 2";
    pushNotification.MessageType = "Text";

    pushNotifications.add(pushNotification);

    clientObject co = new clientObject();
    co.pushNotifications = pushNotifications;
            
    ObjectMapper mapper = new ObjectMapper();

    try
    {
        String jsonString = mapper.writeValueAsString(co);
        byte[] postData = jsonString.getBytes(StandardCharsets.UTF_8);
        
        URL myurl = new URL(url);
        HttpURLConnection con = (HttpURLConnection) myurl.openConnection();

        con.setDoOutput(true);
        con.setRequestMethod("POST");
        con.setRequestProperty("User-Agent", "Java client");
        con.setRequestProperty("Content-Type", "application/json");

        try (DataOutputStream wr = new DataOutputStream(con.getOutputStream())) {
            wr.write(postData);
        }
    }
    catch(Exception ex)
    {
        
    }
}