API Call Samples

We reserve the right to log and verify your API calls and to contact you if we detect abuse on your part. For example:
  • the requests takes too long to return
  • the requests return too much data at a time
  • The requests are too frequent
We strongly suggest using the date filter parameters to return only the data that is relevant.

Selecting a category  

Selecting a function  

HTTP GET:

https://api.aceproject.com/?fct=saveaccount&guid=8d46a6bb-9c75-46bb-8d00-96d33a50e537&timezone=NULL&accountname=NULL&accountaddress=NULL&accountcity=NULL&accountprovince=NULL&accountcountry=NULL&accountzipcode=NULL&accountphonenumber=NULL&accountfaxnumber=NULL&accountwebsite=NULL&contactname=NULL&contactemail=NULL&contactphonenumber=NULL&contactfaxnumber=NULL&contactmobilenumber=NULL&lcid=NULL&weekmanagement=NULL&typicalworkday=NULL&timetracking=NULL&costtracking=NULL&currency=NULL&emailnotifsubject=NULL&startsoon=NULL&soondue=NULL&overdue=NULL&reminderfrequency=NULL&logoguid=NULL&customuserskin=NULL&workingwithrecurrency=NULL&strongpassword=NULL&passwordexpiration=NULL&format=DS


Function Details
Name Guid Required Description
SaveAccount True Updates account information. You must be an account administrator to access this function.

Parameter Details
Name DataType Is Nullable Max length Domain Values Default Value Is Required
(Insert)
Is Required
(Update)
Is Required Description
Guid String False True Unique identifier for the authenticated user. The GUID has an expiry date and time which is managed automatically by the API.
Timezone String True See GetTimeZonesList function. NULL True False Timezone identifier from the list of available timezones for AceProject
AccountName String True 100 NULL True False The account name is visible on the account login page.
AccountAddress String True NULL True False Account's address
AccountCity String True 100 NULL True False Account's city
AccountProvince String True 50 NULL True False Account's province
AccountCountry String True 100 NULL True False Account's country
AccountZipcode String True 20 NULL True False Account's zip code or postal code
AccountPhoneNumber String True 30 NULL True False Account's phone number
AccountFaxNumber String True 30 NULL True False Account's fax number
AccountWebSite String True 255 NULL True False Account's Web site
ContactName String True 100 NULL True False Contact's name
ContactEmail String True 100 NULL True False Contact's E-mail
ContactPhoneNumber String True 30 NULL True False Contact's phone number
ContactFaxNumber String True 30 NULL True False Contact's fax number
ContactMobileNumber String True 30 NULL True False Contact's mobile number
Lcid Integer True 1033 : m/d/yyyy 12:00:00 AM (0.0)
1041 : yyyy/mm/dd 24:00:00 (0.0)
2057 : dd/mm/yyyy 24:00:00 (0.0)
3084 : yyyy-mm-dd 24:00:00 (0,0)
4105 : yyyy-mm-dd 12:00:00 AM (0.0)
7177 : yyyy/mm/dd 24:00:00 (0,0)
NULL True False Default account date and number format
WeekManagement Integer True 0 : Sunday to Saturday
1 : Monday to Sunday
6 : Saturday to Friday
NULL True False Account's week management setting for time sheets. The setting can't be changed if time sheets are already created in the account.
TypicalWorkDay Decimal True Between 0 and 24 hours NULL True False Typical work day set in hours (decimal value) to use as default for all users within the account. When NULL, the typical work day value is ignored for the user workload reports.
TimeTracking Boolean True True or False NULL True False Flag which indicates if time tracking is activated and used within the account. If not, all references to time tracking will be disabled and related data columns will not be returned to the caller.
CostTracking Boolean True True or False NULL True False Flag which indicates if cost tracking is activated and used within the account. If not, all references to cost tracking will be disabled and related data columns will not be returned to the caller.
Currency String True 3 NULL True False Currency symbol used in AceProject screens when cost tracking is enabled. Parameter is ignored when CostTracking is false.
EmailNotifSubject Integer True 1 : Task # modified by user - project name
2 : Task created/modified by user: # Summary
NULL True False Lets you choose the format for the "Subject" field of AceProject's task email notifications.
StartSoon Integer True NULL or greater or equal to 0 NULL True False Number of calendar days you wish all assigned or reviewer users to be reminded before the tasks' Estimated Start Date. If NULL, the start soon task reminders are disabled.
SoonDue Integer True NULL or greater or equal to 0 NULL True False Number of calendar days you wish all assigned or reviewer users to be reminded before the tasks' Estimated End Date. If NULL, the soon due task reminders are disabled.
OverDue Integer True NULL or greater or equal to 0 NULL True False Number of calendar days you wish all assigned or reviewer users to be reminded after the tasks' Estimated End Date. If NULL, the overdue task reminder is disabled.
ReminderFrequency Integer True 1 : One per day
2 : Only one notification
NULL True False It is possible to send all assigned or reviewer users one email per day or one email only
LogoGUID String True 100 NULL True
CustomUserSkin Boolean True True or False NULL True
WorkingWithRecurrency Boolean True True or False NULL True False Flag which indicates if task recurrences are activated and used within the account.
StrongPassword Boolean True True or False NULL False Indicates whether the user needs to use a strong password or not.
PasswordExpiration Integer True NULL False Indicates in how many days the password will expire after its last modification. (O = Never)
Format String False RS: RecordSet
DS: DataSet
JSON: JSON
DS True Return Format

.Net Code:
Public Class Sample

    Public Sub CodeSample_saveaccount()
        Dim strXML As String = String.Empty

        Dim dsOutput As DataSet = Nothing
        Dim guid As String = String.Empty
        Dim sb As New System.Text.StringBuilder
        Try
            sb = New System.Text.StringBuilder
            'Building API QueryString
            sb.Append("fct=saveaccount")
            sb.Append(String.Format("&guid={0}", "284edd65-6d07-4bfe-9c7a-74dba76113bd"))
            sb.Append(String.Format("&timezone={0}", "NULL"))
            sb.Append(String.Format("&accountname={0}", "NULL"))
            sb.Append(String.Format("&accountaddress={0}", "NULL"))
            sb.Append(String.Format("&accountcity={0}", "NULL"))
            sb.Append(String.Format("&accountprovince={0}", "NULL"))
            sb.Append(String.Format("&accountcountry={0}", "NULL"))
            sb.Append(String.Format("&accountzipcode={0}", "NULL"))
            sb.Append(String.Format("&accountphonenumber={0}", "NULL"))
            sb.Append(String.Format("&accountfaxnumber={0}", "NULL"))
            sb.Append(String.Format("&accountwebsite={0}", "NULL"))
            sb.Append(String.Format("&contactname={0}", "NULL"))
            sb.Append(String.Format("&contactemail={0}", "NULL"))
            sb.Append(String.Format("&contactphonenumber={0}", "NULL"))
            sb.Append(String.Format("&contactfaxnumber={0}", "NULL"))
            sb.Append(String.Format("&contactmobilenumber={0}", "NULL"))
            sb.Append(String.Format("&lcid={0}", "NULL"))
            sb.Append(String.Format("&weekmanagement={0}", "NULL"))
            sb.Append(String.Format("&typicalworkday={0}", "NULL"))
            sb.Append(String.Format("&timetracking={0}", "NULL"))
            sb.Append(String.Format("&costtracking={0}", "NULL"))
            sb.Append(String.Format("&currency={0}", "NULL"))
            sb.Append(String.Format("&emailnotifsubject={0}", "NULL"))
            sb.Append(String.Format("&startsoon={0}", "NULL"))
            sb.Append(String.Format("&soondue={0}", "NULL"))
            sb.Append(String.Format("&overdue={0}", "NULL"))
            sb.Append(String.Format("&reminderfrequency={0}", "NULL"))
            sb.Append(String.Format("&logoguid={0}", "NULL"))
            sb.Append(String.Format("&customuserskin={0}", "NULL"))
            sb.Append(String.Format("&workingwithrecurrency={0}", "NULL"))
            sb.Append(String.Format("&strongpassword={0}", "NULL"))
            sb.Append(String.Format("&passwordexpiration={0}", "NULL"))
            sb.Append(String.Format("&format={0}", "DS"))

            'Calling API
            strXML = CallHttp("https://api.aceproject.com/", sb.ToString)
            'Retreive Output structure generate by API
            dsOutput = Deserialize(Of DataSet)(strXML)
            If dsOutput IsNot Nothing AndAlso dsOutput.Tables.Count > 0 Then
                If dsOutput.Tables.Contains("dtAPIErrors") Then
                    Throw New Exception(String.Format("{0}: {1}", _
                                                      dsOutput.Tables(0).Rows(0).Item("ErrorNumber").ToString, _
                                                      dsOutput.Tables(0).Rows(0).Item("ErrorDescription").ToString))
                End If
            End If
        Catch ex As Exception
            Throw
        Finally
            If sb IsNot Nothing Then sb = Nothing
            If dsOutput IsNot Nothing Then
                dsOutput.Dispose()
                dsOutput = Nothing
            End If
        End Try
    End Sub

    Private Shared Function CallHttp( ByVal url As String, _ 
                                      ByVal params As String) As String
        Dim loHttp As System.Net.HttpWebRequest
        loHttp = CType(System.Net.WebRequest.Create(url), System.Net.HttpWebRequest)
        loHttp.Method = "POST"
        Dim requestWriter As System.IO.StreamWriter = New System.IO.StreamWriter(loHttp.GetRequestStream())

        If Not String.IsNullOrEmpty(params) Then
            requestWriter.Write(params)
        End If
        requestWriter.Close()
        loHttp.ContentType = "application/x-www-form-urlencoded"
        loHttp.Headers.Set("Pragma", "no-cache")
        loHttp.AllowAutoRedirect = True
        loHttp.KeepAlive = True
        loHttp.Timeout = 30 * 1000

        Dim loWebResponse As System.Net.HttpWebResponse = CType(loHttp.GetResponse(), System.Net.HttpWebResponse)
        Dim enc As Encoding = System.Text.Encoding.UTF8
        Dim loResponseStream As System.IO.StreamReader = New System.IO.StreamReader(loWebResponse.GetResponseStream(), enc)
        Dim lcHtml As String = loResponseStream.ReadToEnd()

        loWebResponse.Close()
        loResponseStream.Close()

        Return lcHtml
    End Function


    Private Shared Function Deserialize(Of T)( ByVal strXML As String) As T
        Dim objet As T = Nothing
        Dim objType As Type = GetType(T)
        Try
            If Not String.IsNullOrEmpty(strXML) Then
                Dim objSerializer As New System.Xml.Serialization.XmlSerializer(objType)
                Dim objText As New System.Text.StringBuilder()
                Dim objXmlReader As New System.IO.StringReader(strXML)
                objet = DirectCast(objSerializer.Deserialize(objXmlReader), T)
                objXmlReader.Close()
            End If
            Return objet
        Catch ex As Exception
            Throw
        Finally
            If objet IsNot Nothing Then objet = Nothing
        End Try
    End Function

End Class