Ajera API
message for Ajera API general doc
For additional api methods see the following below:
Home
Clients 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 ContactsPOST/AjeraAPI.ashx?{id}
ListContacts returns an array of Contacts, limited by the optional filters detailed below.
Each returned Contact includes only very basic information. This method is intended to be used for querying Contacts for particular key values, which can then be passed to GetContacts for more detailed information.
Example URI
- id
string
(required) Example: ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9An unique identifier required for api access.
ListContacts
Headers
Content-Type: application/json
Accept: application/json
Body
{
Method: "ListContacts",
SessionToken: "",
MethodArguments: {
FilterByCompany: [1, 2, 3],
FilterByStatus: ["Active"],
FilterByText: "string",
FilterByContactType: [1, 2, 3, null],
FilterByEarliestModifiedDate: "2015-03-11 16:22:54.229 GMT-0700",
FilterByLatestModifiedDate: "2015-03-11 16:22:54.229 GMT-0700"
}
}
Schema
{
Method: "string, required",
SessionToken: "string",
MethodArguments: {
FilterByCompany: "int array, optional",
FilterByStatus: "string array, optional",
FilterByText: "string, optional",
FilterByContactType: "int array, optional"
FilterByEarliestModifiedDate: "date string, optional(specific format)",
FilterByLatestModifiedDate: "date string, optional(specific format)"
}
}
200
Headers
Content-Type: application/json
Body
{
ResponseCode: 200,
Errors: [],
Message: "Success",
Content: {
Contacts: [{
ContactKey: 3,
FirstName: "Bob",
MiddleName: "M",
LastName: "Johnson",
Company: "Accuterra"
}]
},
UsageKey: "6e983af4-946f-4947-9fbd-a233f796f6b4"
}
Schema
{
ResponseCode: {
type: int
},
Errors: {
type: "array"
},
Message: {
type: "string"
},
Content: {
type: "object",
properties: {
ContactKey: {
type: int
},
FirstName: {
type: "string"
},
MiddleName: {
type: "string"
},
LastName: {
type: "string"
},
Company: {
type: "string"
}
},
UsageKey: {
type: "guid"
}
}
}
Get ContactsPOST/AjeraAPI.ashx?{id}
GetContacts takes one or more key values, and returns an array of matching Contacts.
This method returns detailed information, which can be used to populate required fields when calling UpdateContacts.
CustomFields can be viewed/updated, the field names are prepended with the string CF_
Example URI
- id
string
(required) Example: ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9An unique identifier required for api access.
GetContacts
Headers
Content-Type: application/json
Accept: application/json
Body
{
Method: "GetContacts",
SessionToken: "",
MethodArguments: {
RequestedContacts: [11]
}
}
Schema
{
Method: "string, required",
SessionToken: "string",
MethodArguments: {
RequestedContacts: "int array, required"
}
}
200
Headers
Content-Type: application/json
Body
{
ResponseCode: 200,
Message: "Success",
Errors: [],
Content: {
Contacts: [{
ContactKey: 11,
Status: "Active",
FirstName: "Dominica",
MiddleName: "",
LastName: "Appleton",
Company: "Anderson Construction",
Title: "Architect",
FaxNumber: "(503)245-1551",
FaxDescription: "",
Email: "dappleton@andersonconstr.com",
Website: "www.andersonconstr.com",
Notes: "",
PrimaryAddressLineOne: "965 NE Savie Drive",
PrimaryAddressLineTwo: "",
PrimaryAddressLineThree: "",
PrimaryAddressCity: "Portland",
PrimaryAddressZip: "97227",
PrimaryAddressState: "OR",
PrimaryAddressCountry: "USA",
MailingAddressSameAsPrimary: true,
MailingAddressLineOne: "965 NE Savie Drive",
MailingAddressLineTwo: "",
MailingAddressLineThree: "",
MailingAddressCity: "Portland",
MailingAddressZip: "97227",
MailingAddressState: "OR",
MailingAddressCountry: "USA",
PrimaryPhoneNumber: "503-240-5000",
PrimaryPhoneDescription: "Office",
SecondaryPhoneNumber: "",
SecondaryPhoneDescription: "",
TertiaryPhoneNumber: "",
TertiaryPhoneDescription: "",
ContactTypeKey: 6,
ContactTypeDescription: "Client",
ContactTypeNotes: "",
LastModifiedDate: "2015-05-19 10:24:30.610 GMT-05:00"
}]
},
UsageKey: "6e983af4-946f-4947-9fbd-a233f796f6b4"
}
Schema
{
ResponseCode: {
type: int
},
Errors: {
type: "array"
},
Message: {
type: "string"
},
Content: {
type: "object",
properties: {
ContactKey: {
type: int
},
Status: {
type: "string"
},
FirstName: {
type: "string"
},
MiddleName: {
type: "string"
},
LastName: {
type: "string"
},
Company: {
type: "string"
},
Title: {
type: "string"
},
FaxNumber: {
type: "string"
},
FaxDescription: {
type: "string"
},
Email: {
type: "string"
},
Website: {
type: "string"
},
Notes: {
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"
},
PrimaryPhoneNumber: {
type: "string"
},
PrimaryPhoneDescription: {
type: "string"
},
SecondaryPhoneNumber: {
type: "string"
},
SecondaryPhoneDescription: {
type: "string"
},
TertiaryPhoneNumber: {
type: "string"
},
TertiaryPhoneDescription: {
type: "string"
},
ContactTypeKey: {
type: "int"
},
ContactTypeDescription: {
type: "string"
},
ContactTypeNotes: {
type: "string"
}
LastModifiedDate: {
type: "string"
}
}
},
UsageKey: {
type: "guid"
}
}
}
Update ContactsPOST/AjeraAPI.ashx?{id}
UpdateContacts is used to update, create or delete contacts.
To create contacts, Contacts is set to empty, and UpdatedContacts items are given an ContactKey with a negative value.
To update or delete contacts, Contacts must be provided with all fields populated with current data, most likely obtained from calling GetContacts. If updating, UpdatedContacts is populated with the desired values in place for each field, and optional fields may be omitted. If deleting, UpdatedContacts has the optional “Delete” field set to true, and only ContactKey and LastModifiedDate fields are required.
CustomFields can be viewed/updated, the field names are prepended with the string CF_
Example URI
- id
string
(required) Example: ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9An unique identifier required for api access.
UpdateContacts
Headers
Content-Type: application/json
Accept: application/json
Body
{
Method: "UpdateContacts",
SessionToken: "",
MethodArguments: {
UpdatedContacts: [
{
ContactKey: 1,
LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700",
Delete: false,
FirstName: "Tom",
MiddleName: "",
LastName: "Harding",
Company: "Test Company",
Title: "Manager",
FaxNumber: "555-555-5555",
FaxDescription: "Buisness fax",
Email: "",
Website: "",
Notes: "",
PrimaryAddressLineOne: "",
PrimaryAddressLineTwo: "",
PrimaryAddressLineThree: "",
PrimaryAddressCity: "",
PrimaryAddressZip: "",
PrimaryAddressState: "",
PrimaryAddressCountry: "",
MailingAddressSameAsPrimary: true,
MailingAddressLineOne: "",
MailingAddressLineTwo: "",
MailingAddressLineThree: "",
MailingAddressCity: "",
MailingAddressZip: "",
MailingAddressState: "",
MailingAddressCountry: "",
PrimaryPhoneNumber: "555-555-5555",
PrimaryPhoneDescription: "",
SecondaryPhoneNumber: "555-555-5555",
SecondaryPhoneDescription: "",
TertiaryPhoneNumber: "555-555-5555",
TertiaryPhoneDescription: "",
ContactTypeKey: 1,
ContactTypeDescription: "Test",
ContactTypeNotes: ""
},{
ContactKey: -1,
LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700",
Delete: false,
FirstName: "Tom",
MiddleName: "",
LastName: "Harding",
Company: "Test Company",
Title: "Manager",
FaxNumber: "555-555-5555",
FaxDescription: "Buisness fax",
Email: "",
Website: "",
Notes: "",
PrimaryAddressLineOne: "",
PrimaryAddressLineTwo: "",
PrimaryAddressLineThree: "",
PrimaryAddressCity: "",
PrimaryAddressZip: "",
PrimaryAddressState: "",
PrimaryAddressCountry: "",
MailingAddressSameAsPrimary: true,
MailingAddressLineOne: "",
MailingAddressLineTwo: "",
MailingAddressLineThree: "",
MailingAddressCity: "",
MailingAddressZip: "",
MailingAddressState: "",
MailingAddressCountry: "",
PrimaryPhoneNumber: "555-555-5555",
PrimaryPhoneDescription: "",
SecondaryPhoneNumber: "555-555-5555",
SecondaryPhoneDescription: "",
TertiaryPhoneNumber: "555-555-5555",
TertiaryPhoneDescription: "",
ContactTypeKey: 1,
ContactTypeDescription: "Test",
ContactTypeNotes: ""
}, {
ContactKey: 2,
LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700",
Delete: true
}
],
UnchangedContacts: [
{
ContactKey: 1,
LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700",
Delete: false,
FirstName: "Tom",
MiddleName: "",
LastName: "Harding",
Company: "Test Company",
Title: "Manager",
FaxNumber: "555-555-5555",
FaxDescription: "Buisness fax",
Email: "",
Website: "",
Notes: "",
PrimaryAddressLineOne: "",
PrimaryAddressLineTwo: "",
PrimaryAddressLineThree: "",
PrimaryAddressCity: "",
PrimaryAddressZip: "",
PrimaryAddressState: "",
PrimaryAddressCountry: "",
MailingAddressSameAsPrimary: true,
MailingAddressLineOne: "",
MailingAddressLineTwo: "",
MailingAddressLineThree: "",
MailingAddressCity: "",
MailingAddressZip: "",
MailingAddressState: "",
MailingAddressCountry: "",
PrimaryPhoneNumber: "555-555-5555",
PrimaryPhoneDescription: "",
SecondaryPhoneNumber: "555-555-5555",
SecondaryPhoneDescription: "",
TertiaryPhoneNumber: "555-555-5555",
TertiaryPhoneDescription: "",
ContactTypeKey: 1,
ContactTypeDescription: "Test",
ContactTypeNotes: ""
}
],
UseSingleTransaction: false
}
}
Schema
{
Method: "string, required",
SessionToken: "string, required",
UseSessionCookie: "boolean",
MethodArguments: {
UpdatedContacts: [
{
ContactKey: "int, required",
LastModifiedDate: "string, required, date string format",
Delete: "boolean, default false",
Status: "string, default Active",
FirstName: "string, optional if company is populated",
MiddleName: "string, optional",
LastName: "string, optional if company is populated",
Company: "string, optional if FirstName, MiddleName, LastName is populated",
Title: "string, optional",
FaxNumber: "string, optional, max(30 characters)",
FaxDescription: "string, optional, max(80 characters)",
Email: "string, optional, max(254 characters)",
Website: "string, optional, max(100 characters)",
Notes: "string, optional, nullable",
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)",
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)",
ContactTypeKey: "int, optional, nullable",
ContactTypeDescription: "string, optional",
ContactTypeNotes: "string, optional"
}
],
UnchangedContacts: "array, required, use contact record from GetContacts, empty array if only creating",
UseSingleTransaction: "boolean, required"
}
}
200
Headers
Content-Type: application/json
Body
{
Content: {
Contacts:[]
},
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 Contact TypesPOST/AjeraAPI.ashx?{id}
ListContactTypes returns an array of Contact Types, limited by the optional filters detailed below.
Each returned Contact Type includes only very basic information. This method is intended to be used for querying Contact Types for particular key values.
Example URI
- id
string
(required) Example: ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9An unique identifier required for api access.
ListContactTypes
Headers
Content-Type: application/json
Accept: application/json
Body
{
Method: "ListContactTypes",
SessionToken: "",
MethodArguments: {
FilterByStatus: ["Active"]
}
}
Schema
{
Method: "string, required",
SessionToken: "string",
MethodArguments: {
FilterByStatus: "string array, optional"
}
}
200
Headers
Content-Type: application/json
Body
{
ResponseCode: 200,
Message: "Success",
Errors: [],
Content: {
ContactTypes: [{
ContactTypeKey: 1,
Description: "Accountant",
Status: "Active",
Notes: ""
}],
},
UsageKey: "d286b4e7-41fe-42f9-97e8-bfd842a77b88"
}
Schema
{
ResponseCode: {
type: int
},
Message: {
type: "string"
},
Errors: {
type: "array"
},
Content: {
type: "object",
properties: {
ContactTypeKey: {
type: int
},
Description: {
type: "string"
},
Status: {
type: "string"
},
Notes: {
type: "string"
}
}
},
UsageKey: {
type: "guid"
}
}