Fix api endpoint url
If application_id length is zero, omit application_id parameter from post