Back to top

Ajera API

message for Ajera API general doc

For additional api methods see the following below:
Home
Contacts API
Employees API
Vendors API
Projects API
Expense Reports API
GL Accounts API
Various List Methods

Messages

Group of all messages-related resources.

API Endpoint

id is an Ajera API specific id that is required to access the API for any given API server call. This id and specific url can be obtained from the Ajera 8 Menu Utility -> Setup Integrations -> API Settings

List Clients
POST/AjeraAPI.ashx?{id}

ListClients returns an array of Clients, limited by the optional filters detailed below.

Each returned Client includes only very basic information. This method is intended to be used for querying Clients for particular key values, which can then be passed to GetClients for more detailed information.

Example URI

POST /AjeraAPI.ashx?ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9
URI Parameters
HideShow
id
string (required) Example: ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9

An unique identifier required for api access.

Request  ListClients
HideShow
Headers
Content-Type: application/json
Accept: application/json
Body
{
    Method: "ListClients",
    SessionToken: "",
    MethodArguments: {
        FilterByCompany: [4,5], 
        FilterByStatus: ["Active"], 
        FilterByNameLike: "string",
        FilterByNameEquals: "string", 
        FilterByClientType: [1, 2, 3],  
        FilterByEarliestModifiedDate: "2015-03-11 16:22:54.229 GMT-0700",
        FilterByLatestModifiedDate: "2015-03-11 16:22:54.229 GMT-0700"
    }
}
Schema
{
    Method: "string, required",
    Username: "string, max(# characters)",
    Password: "string, max(# characters)",
    APIVersion: "int",
    UseSessionCookie: "boolean"
    Method: "string, required",
    SessionToken: "string",
    MethodArguments: {
      FilterByCompany: "int array, optional", 
      FilterByStatus: "string array, optional", 
      FilterByNameLike: "string, optional",
      FilterByNameEquals: "string, optional", 
      FilterByClientType: "int array, optional" 
      FilterByEarliestModifiedDate: "date string, optional(specific format)",
      FilterByLatestModifiedDate: "date string, optional(specific format)"
   }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    ResponseCode: 200,
    Message: "Success",
    Errors: [],
    Content: {
      Clients: [
        {
            ClientKey: 4,
            Description: "City of Portland"
        },
        {
            ClientKey: 5,
            Description: "Portland Public Schools"
        } 
       ]
     },
    UsageKey: "acb5509b-d7ba-434a-8e51-937db175d651"
}
Schema
{
    ResponseCode: {
            type: int
        },
    Message: {
            type: "string"
        },
    Errors: {
            type: "array"
        },
    Content: {
            type: "object",
            properties: {
                ClientKey: {
                    type: int
                },
                Description: {
                    type: "string"
                }
            }
        },                     
        UsageKey: {
            type: "guid"
        }
    }
}

Get Clients
POST/AjeraAPI.ashx?{id}

GetClients takes one or more key values, and returns an array of matching Clients.

This method returns detailed information, which can be used to populate required fields when calling UpdateClients.

CustomFields can be viewed/updated, the field names are prepended with the string CF_

Example URI

POST /AjeraAPI.ashx?ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9
URI Parameters
HideShow
id
string (required) Example: ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9

An unique identifier required for api access.

Request  GetClients
HideShow
Headers
Content-Type: application/json
Accept: application/json
Body
{
    Method: "GetClients",
    SessionToken: "",
    MethodArguments: {
        RequestedClients: [1, 2, 3]
    }
}
Schema
{
    Method: "string, required",
    SessionToken: "string",
    MethodArguments: {
        RequestedClients: "int array, optional"                 
    }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    ResponseCode: 200,
    Message: "Success",
    Errors: [],
    Content: {              
        ClientKey: 1, 
        Status: "Active",
        Description: "Shop Architects",                     
        DateEstablished: "2015-03-11", 
        SendStatements: true, 
        CreateFinanceCharge: true, 
        AnnualPercentageRate: 0.00, 
        PrePaymentBeginningBalance: 0.0, 
        AccountID: "", 
        PrimaryPhoneNumber: "555-555-5555", 
        PrimaryPhoneDescription: "", 
        SecondaryPhoneNumber: "555-555-5555", 
        SecondaryPhoneDescription: "",
        TertiaryPhoneNumber: "555-555-5555",
        TertiaryPhoneDescription: "", 
        FaxNumber: "", 
        FaxDescription: "",  
        Email: "", 
        Website: "", 
        PrimaryAddressLineOne: "", 
        PrimaryAddressLineTwo: "", 
        PrimaryAddressLineThree: "", 
        PrimaryAddressCity: "", 
        PrimaryAddressZip: "", 
        PrimaryAddressState: "", 
        PrimaryAddressCountry: "", 
        MailingAddressSameAsPrimary: true, 
        MailingAddressLineOne: "", 
        MailingAddressLineTwo: "", 
        MailingAddressLineThree: "", 
        MailingAddressCity: "", 
        MailingAddressZip: "", 
        MailingAddressState: "",
        MailingAddressCountry: "",
        EmailStatementTemplateKey: 1,
        EmailStatementTemplateDescription: "",
        Contacts: [
            {
            ContactKey: 21,
            Text: "Contact for all questions on active jobs",
            FirstName: "Adrian",
            MiddleName: "",
            LastName: "Dalton",
            Title: "Engineer",
            Company: "Portland Public Schools",
            Order: 0
           }
        ],
        Notes: "", 
        ClientTypeKey: 1, 
        ClientTypeDescription: "Test", 
        ClientTypeNotes: "",
        LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700"
    },               
    UsageKey: "6e983af4-946f-4947-9fbd-a233f796f6b4"
}
Schema
{
   ResponseCode: {
            type: int
        },
    Message: {
            type: "string"
        },
    Errors: {
            type: "array"
        },
    Content: {
            type: "object",
            properties: {
                ClientKey: {
                    type: int
                }, 
                Description: {
                    type: "string"
                },
                Status: {
                    type: "string"
                },
                DateEstablished: {
                    type: "string"
                },
                SendStatements: {
                    type: boolean
                }, 
                CreateFinanceCharge: {
                    type: boolean
                }, 
                AnnualPercentageRate: {
                    type: float
                },  
                PrePaymentBeginningBalance: {
                    type: int
                }, 
                AccountID: {
                    type: "string"
                },
                PrimaryPhoneNumber: {
                    type: "string"
                },
                PrimaryPhoneDescription: {
                    type: "string"
                },
                SecondaryPhoneNumber: {
                    type: "string"
                },
                SecondaryPhoneDescription: {
                    type: "string"
                },
                TertiaryPhoneNumber: {
                    type: "string"
                },
                TertiaryPhoneDescription: {
                    type: "string"
                },
                FaxNumber:{
                    type: "string"
                }, 
                FaxDescription: {
                    type: "string"
                }, 
                Email: {
                    type: "string"
                },
                Website: {
                    type: "string"
                },
                PrimaryAddressLineOne: {
                    type: "string"
                },
                PrimaryAddressLineTwo: {
                    type: "string"
                },
                PrimaryAddressLineThree: {
                    type: "string"
                },
                PrimaryAddressCity: {
                    type: "string"
                },
                PrimaryAddressZip: {
                    type: "string"
                }, 
                PrimaryAddressState: {
                    type: "string"
                }, 
                PrimaryAddressCountry: {
                    type: "string"
                },
                MailingAddressSameAsPrimary: {
                    type: boolean
                }, 
                MailingAddressLineOne: {
                    type: "string"
                }, 
                MailingAddressLineTwo: {
                    type: "string"
                },
                MailingAddressLineThree: {
                    type: "string"
                },
                MailingAddressCity: {
                    type: "string"
                }, 
                MailingAddressZip: {
                    type: "string"
                }, 
                MailingAddressState: {
                    type: "string"
                },
                MailingAddressCountry: {
                    type: "string"
                },
                Contacts: [ ],
                Notes: {
                    type: "string"
                }, 
                ClientTypeKey: {
                    type: "string"
                },  
                ClientTypeDescription: {
                    type: "string"
                },
                ClientTypeNotes: {
                    type: "string"
                },                             
                LastModifiedDate: {
                    type: "string"
                },
                EmailStatementTemplateKey: {
                    type: int
                }, 
                EmailStatementTemplateDescription: {
                    type: "string"
                },
            }
        },                    
        UsageKey: {
            type: "guid"
        }
    }
}

Update Clients
POST/AjeraAPI.ashx?{id}

UpdateClients is used to update, create or delete clients.

To create clients, Clients is set to empty, and UpdatedClients items are given an ClientKey with a negative value.

To update or delete clients, Clients must be provided with all fields populated with current data, most likely obtained from calling GetClients. If updating, UpdatedClients is populated with the desired values in place for each field, and optional fields may be omitted. If deleting, UpdatedClients has the optional “Delete” field set to true, and only ClientKey and LastModifiedDate fields are required.

CustomFields can be viewed/updated, the field names are prepended with the string CF_

Example URI

POST /AjeraAPI.ashx?ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9
URI Parameters
HideShow
id
string (required) Example: ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9

An unique identifier required for api access.

Request  UpdateClients
HideShow
Headers
Content-Type: application/json
Accept: application/json
Body
{
    Method: "UpdateClients",
    SessionToken: "",
    MethodArguments: {
        UpdatedClients: [
            {
                ClientKey: -1,
                Description: "Shop Architects",
                LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700",
                Delete: false,
                Status: "Active",
                DateEstablished: "2015-03-11",
                SendStatements: true,
                CreateFinanceCharge: true,
                AnnualPercentageRate: 0,
                PrePaymentBeginningBalance: 0,
                AccountID: "sldfkjsdf",
                PrimaryPhoneNumber: "555-555-5555",
                PrimaryPhoneDescription: "",
                SecondaryPhoneNumber: "555-555-5555",
                SecondaryPhoneDescription: "",
                TertiaryPhoneNumber: "555-555-5555",
                TertiaryPhoneDescription: "",
                FaxNumber: "",
                FaxDescription: "",
                Email: "",
                Website: "",
                PrimaryAddressLineOne: "",
                PrimaryAddressLineTwo: "",
                PrimaryAddressLineThree: "",
                PrimaryAddressCity: "",
                PrimaryAddressZip: "",
                PrimaryAddressState: "",
                PrimaryAddressCountry: "",
                MailingAddressSameAsPrimary: true,
                MailingAddressLineOne: "",
                MailingAddressLineTwo: "",
                MailingAddressLineThree: "",
                MailingAddressCity: "",
                MailingAddressZip: "",
                MailingAddressState: "",
                MailingAddressCountry: "",
                EmailStatementTemplateKey: 1,
                Contacts: [
                  {
                    ContactKey: 1,
                    Order: 1,
                    Note: "text",
                    FirstName: "",
                    MiddleName: "",
                    LastName: "",
                    Title: "",
                    Company: ""
                  }
                ],
                Notes: "",
                ClientTypeKey: 1,
                ClientTypeDescription: "",
                ClientTypeNotes: ""
            },{
                ClientKey: 1,
                Description: "Shop Architects",
                LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700",
                Delete: false,
                Status: "Active",
                DateEstablished: "2015-03-11",
                SendStatements: true,
                CreateFinanceCharge: true,
                AnnualPercentageRate: 0,
                PrePaymentBeginningBalance: 0,
                AccountID: "sldfkjsdf",
                PrimaryPhoneNumber: "555-555-5555",
                PrimaryPhoneDescription: "",
                SecondaryPhoneNumber: "555-555-5555",
                SecondaryPhoneDescription: "",
                TertiaryPhoneNumber: "555-555-5555",
                TertiaryPhoneDescription: "",
                FaxNumber: "",
                FaxDescription: "",
                Email: "",
                Website: "",
                PrimaryAddressLineOne: "",
                PrimaryAddressLineTwo: "",
                PrimaryAddressLineThree: "",
                PrimaryAddressCity: "",
                PrimaryAddressZip: "",
                PrimaryAddressState: "",
                PrimaryAddressCountry: "",
                MailingAddressSameAsPrimary: true,
                MailingAddressLineOne: "",
                MailingAddressLineTwo: "",
                MailingAddressLineThree: "",
                MailingAddressCity: "",
                MailingAddressZip: "",
                MailingAddressState: "",
                MailingAddressCountry: "",
                Contacts: [
                  {
                    ContactKey: 1,
                    Order: 1,
                    Note: "text",
                    FirstName: "",
                    MiddleName: "",
                    LastName: "",
                    Title: "",
                    Company: ""
                  }
                ],
                Notes: "",
                ClientTypeKey: 1,
                ClientTypeDescription: "",
                ClientTypeNotes: ""
            },{
                ClientKey: 2, 
                LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700",                            
                Delete: true
            }
        ],
        UnchangedClients: [
            {
                ClientKey: 1,
                Description: "Shop Architects",
                LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700",
                Delete: false,
                Status: "Active",
                DateEstablished: "2015-03-11",
                SendStatements: true,
                CreateFinanceCharge: true,
                AnnualPercentageRate: 0,
                PrePaymentBeginningBalance: 0,
                AccountID: "sldfkjsdf",
                PrimaryPhoneNumber: "555-555-5555",
                PrimaryPhoneDescription: "",
                SecondaryPhoneNumber: "555-555-5555",
                SecondaryPhoneDescription: "",
                TertiaryPhoneNumber: "555-555-5555",
                TertiaryPhoneDescription: "",
                FaxNumber: "",
                FaxDescription: "",
                Email: "",
                Website: "",
                PrimaryAddressLineOne: "",
                PrimaryAddressLineTwo: "",
                PrimaryAddressLineThree: "",
                PrimaryAddressCity: "",
                PrimaryAddressZip: "",
                PrimaryAddressState: "",
                PrimaryAddressCountry: "",
                MailingAddressSameAsPrimary: true,
                MailingAddressLineOne: "",
                MailingAddressLineTwo: "",
                MailingAddressLineThree: "",
                MailingAddressCity: "",
                MailingAddressZip: "",
                MailingAddressState: "",
                MailingAddressCountry: "",
                Contacts: [
                  {
                    ContactKey: 1,
                    Order: 1,
                    Note: "text",
                    FirstName: "",
                    MiddleName: "",
                    LastName: "",
                    Title: "",
                    Company: ""
                  }
                ],
                Notes: "",
                ClientTypeKey: 1,
                ClientTypeDescription: "",
                ClientTypeNotes: ""
            }
        ]
        UseSingleTransaction: false
}
Schema
{
    Method: "string, required",
    UseSessionCookie: "boolean",
    SessionToken: "string, required, unless UseSessionCookie is true",
    MethodArguments: {
        UpdatedClients: [
            {
                ClientKey: "int, required", 
                Description: "string, required",
                LastModifiedDate: "string, required, date string format",  
                Delete: "boolean, required, default false"
                Status: "string, required, default Active",
                DateEstablished: "date string, optional, nullable",
                SendStatements: "boolean, optional, default true",
                CreateFinanceCharge: "boolean, optional, default true",
                AnnualPercentageRate: "float, optional",
                PrePaymentBeginningBalance: "double, optional, readonly",                           
                AccountID: "string, optional, will only exist if AccountKey is populated",  
                PrimaryPhoneNumber: "string, optional, max(30 characters)",
                PrimaryPhoneDescription: "string, optional, max(80 characters)",
                SecondaryPhoneNumber: "string, optional, max(30 characters)",
                SecondaryPhoneDescription: "string, optional, max(80 characters)",
                TertiaryPhoneNumber: "string, optional, max(30 characters)",
                TertiaryPhoneDescription: "string, optional, max(80 characters)",
                FaxNumber: "string, optional, max(30 characters)",
                FaxDescription: "string, optional, max(80 characters)",
                Email: "string, optional, max(254 characters)",
                Website: "string, optional, max(100 characters)",
                PrimaryAddressLineOne: "string, optional, max(50 characters)",
                PrimaryAddressLineTwo:  "string, optional, max(50 characters)",
                PrimaryAddressLineThree:  "string, optional, max(50 characters)",
                PrimaryAddressCity: "string, optional, max(30 characters)",
                PrimaryAddressZip:  "string, optional, max(20 characters)",
                PrimaryAddressState: "string, optional, max(10 characters)",
                PrimaryAddressCountry: "string, optional, max(30 characters)",
                MailingAddressSameAsPrimary: "boolean, optional, default true",
                MailingAddressLineOne: "string, optional, max(50 characters)",
                MailingAddressLineTwo: "string, optional, max(50 characters)",
                MailingAddressLineThree:  "string, optional, max(50 characters)",
                MailingAddressCity: "string, optional, max(30 characters)",
                MailingAddressZip:  "string, optional, max(20 characters)",
                MailingAddressState:  "string, optional, max(10 characters)",
                MailingAddressCountry: "string, optional, max(30 characters)",
                Contacts: [ "array, optional, max of 5 contacts per client"],
                Notes: "string, optional, nullable", 
                ClientTypeKey: "int, optional, nullable",
                ClientTypeDescription: "string, optional, max(80 characters), Only valid if ClientTypeKey is populated and valid",               
                ClientTypeNotes: "string, optional, nullable, Only valid if ClientTypeKey is populated and valid"
            }
        ],
        UnchangedClients: [] "array, required, see UpdatedClients"
        UseSingleTransaction: "boolean, required"
    }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    Content: {
       Clients:[]
    },
    Errors: [],
    Message: "Success",
    ResponseCode: 0,
    UsageKey: "6e983af4-946f-4947-9fbd-a233f796f6b4"
}
Schema
{
        Content: {
            type: "object"
        },
        Errors: {
            type: "array"
        },
        Message: {
            type: "string"
        },
        ResponseCode: {
            type: int
        },
        UsageKey: {
            type: "guid"
        }
}

List Client Types
POST/AjeraAPI.ashx?{id}

ListClientTypes returns an array of Client Types, limited by the optional filters detailed below.

Each returned Client Type includes only very basic information. This method is intended to be used for querying Client Types for particular key values.

Example URI

POST /AjeraAPI.ashx?ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9
URI Parameters
HideShow
id
string (required) Example: ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9

An unique identifier required for api access.

Request  ListClientTypes
HideShow
Headers
Content-Type: application/json
Accept: application/json
Body
{
    Method: "ListClientTypes",
    SessionToken: "",
    MethodArguments: {
        FilterByStatus: ["Active"]
   }
}
Schema
{
    Method: "string, required",
    SessionToken: "string",
    MethodArguments: {
        FilterByStatus: "string array, optional"
   }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    ResponseCode: 200,
    Message: "Success",
    Errors: [],
    Content: {
        ClientTypes: [{
            ClientTypeKey: 1, 
            Description: "Architect",
            Status: "Active", 
            Notes: "some random text"
        }]
    },
    UsageKey: "d286b4e7-41fe-42f9-97e8-bfd842a77b88"
}
Schema
{
    ResponseCode: {
            type: int
        },
    Message: {
            type: "string"
        },
    Errors: {
            type: "array"
        },
    Content: {
            type: "object",
            properties: {
                ClientTypeKey: {
                    type: int
                },
                Description: {
                    type: "string"
                },
                Status: {
                    type: "string"
                },
                Notes: {
                    type: "string"
                }
            }
        },  
    UsageKey: {
            type: "guid"
        }
    }
}

Generated by aglio on 26 Jul 2021