Ajera API
message for Ajera API general doc
For additional api methods see the following below:
Home
Clients API
Contacts API
Employees 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 VendorsPOST/AjeraAPI.ashx?{id}
ListVendors returns an array of Vendors, limited by the optional filters detailed below.
Each returned Vendor includes only very basic information. This method is intended to be used for querying Vendors for particular key values, which can then be passed to GetVendors for more detailed information.
Example URI
- id
string
(required) Example: ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9An unique identifier required for api access.
ListVendors
Headers
Content-Type: application/json
Accept: application/json
Body
{
Method: "ListVendors",
SessionToken: "",
MethodArguments: {
FilterByCompany: [1, 2, 3],
FilterByStatus: ["Active"],
FilterByNameLike: "string",
FilterByVendorType: [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",
FilterByVendorType: "int array, optional"
FilterByEarliestModifiedDate: "date string, optional(specific format)",
FilterByLatestModifiedDate: "date string, optional(specific format)"
}
}
200
Headers
Content-Type: application/json
Body
{
ResponseCode: 200,
Message: "Success",
Errors: [],
Content: {
VendorKey: 3,
Name: "ADP"
},
UsageKey: "6e983af4-946f-4947-9fbd-a233f796f6b4"
}
Schema
{
ResponseCode: {
type: int
},
Message: {
type: "string"
},
Errors: {
type: "array"
},
Content: {
type: "object",
properties: {
VendorKey: {
type: int
},
Name: {
type: "string"
}
}
},
UsageKey: {
type: "guid"
}
}
}
Get VendorsPOST/AjeraAPI.ashx?{id}
GetVendors takes one or more key values, and returns an array of matching Vendors.
This method returns detailed information, which can be used to populate required fields when calling UpdateVendors.
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.
GetVendors
Headers
Content-Type: application/json
Accept: application/json
Body
{
Method: "GetVendors",
SessionToken: "",
MethodArguments: {
RequestedVendors: [1, 2, 3]
}
}
Schema
{
Method: "string, required",
SessionToken: "string",
MethodArguments: {
RequestedVendors: "int array, optional"
}
}
200
Headers
Content-Type: application/json
Body
{
ResponseCode: 200,
Message: "Success",
Errors: [],
Content: [
UpdatedVenders: {[
VendorKey: 3,
Name: "ADPT",
Status: "Active",
DateEstablished: "2016-07-11",
Receives1099Form: false,
FormType1099: "Rents",
RecipientID1099: "",
RecipientName1099: "",
ReportedAmount1099: 0.0,
FederalTaxWitheld: 0.0,
ReceivesW9Form: false,
BuisnessTypeW9: "Individual/Sole Proprietor",
OtherDescriptionW9: "",
DepartmentKey: null,
DepartmentDescription: null,
AccountKey: null,
AccountDescription: null,
AccountID: null,
CalculatePaymentDateMethod: "Day of the month",
NumberOfDaysFromInvoiceDate: 0,
DayOfTheMonthToPay: 10,
PrimaryPhoneNumber: "503-513-7300",
PrimaryPhoneDescription: "Business",
SecondaryPhoneNumber: "",
SecondaryPhoneDescription: "",
TertiaryPhoneNumber: "",
TertiaryPhoneDescription: "",
FaxNumber: "503-513-7381",
FaxDescription: "Busniess fax",
Email: "",
Website: "www.adp.com",
PrimaryAddressLineOne: "4099 SE International Way",
PrimaryAddressLineTwo: "",
PrimaryAddressLineThree: "",
PrimaryAddressCity: "Milwaukie",
PrimaryAddressZip: "97222",
PrimaryAddressState: "OR",
PrimaryAddressCountry: "USA",
MailingAddressSameAsPrimary: true,
MailingAddressLineOne: "4099 SE International Way",
MailingAddressLineTwo: "",
MailingAddressLineThree: "",
MailingAddressCity: "Milwaukie",
MailingAddressZip: "97222",
MailingAddressState: "OR",
MailingAddressCountry: "USA",
Contacts: [],
Notes: "",
VendorTypeKey: 4,
VendorTypeDescription: "General Office",
VendorTypeIsConsultant: false,
VendorTypeIsCreditCard: false,
VendorTypeNotes: "",
LastModifiedDate: "2016-07-12 14:20:00.393 GMT-05:00 (Central Daylight Time)"
}],
NumberOfVendorsUpdated: 1
},
UsageKey: "6e983af4-946f-4947-9fbd-a233f796f6b4"
}
Schema
{
Errors: {
type: "array"
},
Message: {
type: "string"
},
ResponseCode: {
type: int
},
Content: {
type: "object",
properties: {
VendorKey: {
type: int
},
Name: {
type: "string"
},
Status: {
type: "string"
},
DateEstablished: {
type: "string"
},
Receives1099Form: {
type: boolean
},
FormType1099: {
type: "string"
},
RecipientID1099: {
type: "string"
},
RecipientName1099: {
type: "string"
},
ReportedAmount1099: {
type: float
},
FederalTaxWitheld: {
type: float
},
ReceivesW9Form: {
type: boolean
},
BuisnessTypeW9: {
type: "string"
},
OtherDescriptionW9: {
type: "string"
},
DepartmentKey: {
type: int
},
DepartmentDescription: {
type: "string"
},
AccountKey: {
type: int
},
AccountDescription: {
type: "string"
},
AccountID: {
type: "string"
},
CalculatePaymentDateMethod: {
type: "string"
},
NumberOfDaysFromInvoiceDate: {
type: int
},
DayOfTheMonthToPay: {
type: int
},
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: {
type: "array"
},
Notes: {
type: "string"
},
VendorTypeKey: {
type: int
},
VendorTypeDescription: {
type: "string"
},
VendorTypeIsConsultant: {
type: boolean
},
VendorTypeIsCreditCard: {
type: boolean
},
VendorTypeNotes: {
type: "string"
},
LastModifiedDate: {
type: "string"
}
}
},
UsageKey: {
type: "guid"
}
}
}
Update VendorsPOST/AjeraAPI.ashx?{id}
UpdateVendors is used to update, create or delete vendors.
To create vendors, Vendors is set to empty, and UpdatedVendors items are given an VendorKey with a negative value.
To update or delete vendors, Vendors must be provided with all fields populated with current data, most likely obtained from calling GetVendors. If updating, UpdatedVendors is populated with the desired values in place for each field, and optional fields may be omitted. If deleting, UpdatedVendors has the optional “Delete” field set to true, and only VendorKey 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.
UpdateVendors
Headers
Content-Type: application/json
Accept: application/json
Body
{
Method: "UpdateVendors",
SessionToken: "",
MethodArguments: {
UpdatedVendors: [
{
VendorKey: -1,
Name: "American Express",
Status: "Active",
DateEstablished: "2015-03-11",
Receives1099Form: false,
FormType1099: "Royalties",
RecipientID1099: "",
RecipientName1099: "",
ReportedAmount1099: 199.99,
FederalTaxWitheld: 199.99,
ReceivesW9Form: false,
BuisnessTypeW9: "Other",
OtherDescriptionW9: "",
DepartmentKey: 3,
DepartmentDescription: "Interiors",
AccountKey: 1,
AccountDescription: "Accounts Receivable",
AccountID: "1210",
CalculatePaymentDateMethod: "Day of the month",
NumberOfDaysFromInvoiceDate: 0,
DayOfTheMonthToPay: 1,
PrimaryPhoneNumber: "555-555-5555",
PrimaryPhoneDescription: "",
SecondaryPhoneNumber: "555-555-5555",
SecondaryPhoneDescription: "",
TertiaryPhoneNumber: "555-555-5555",
TertiaryPhoneDescription: "",
FaxNumber: "555-555-5555",
FaxDescription: "Buisness fax",
Email: "",
Website: "",
PrimaryAddressLineOne: "",
PrimaryAddressLineTwo: "",
PrimaryAddressLineThree: "",
PrimaryAddressCity: "",
PrimaryAddressZip: "",
PrimaryAddressState: "",
PrimaryAddressCountry: "",
MailingAddressSameAsPrimary: true,
MailingAddressLineOne: "",
MailingAddressLineTwo: "",
MailingAddressLineThree: "",
MailingAddressCity: "",
MailingAddressZip: "",
MailingAddressState: "",
MailingAddressCountry: "",
Contacts: [
{
ContactKey: -1,
Order: 1,
Text: "text",
FirstName: "",
MiddleName: "",
LastName: "",
Title: "",
Company: ""
}
],
Notes: "",
VendorTypeKey: 1,
VendorTypeDescription: "",
VendorTypeIsConsultant: false,
VendorTypeIsCreditCard: false,
VendorTypeNotes: "",
LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700"
},{
VendorKey: 1,
Name: "American Express",
Status: "Active",
DateEstablished: "2015-03-11",
Receives1099Form: false,
FormType1099: "Royalties",
RecipientID1099: "",
RecipientName1099: "",
ReportedAmount1099: 199.99,
FederalTaxWitheld: 199.99,
ReceivesW9Form: false,
BuisnessTypeW9: "Other",
OtherDescriptionW9: "",
DepartmentKey: 3,
DepartmentDescription: "Interiors",
AccountKey: 1,
AccountDescription: "Accounts Receivable",
AccountID: "1210",
CalculatePaymentDateMethod: "Day of the month",
NumberOfDaysFromInvoiceDate: 0,
DayOfTheMonthToPay: 1,
PrimaryPhoneNumber: "555-555-5555",
PrimaryPhoneDescription: "",
SecondaryPhoneNumber: "555-555-5555",
SecondaryPhoneDescription: "",
TertiaryPhoneNumber: "555-555-5555",
TertiaryPhoneDescription: "",
FaxNumber: "555-555-5555",
FaxDescription: "Buisness fax",
Email: "",
Website: "",
PrimaryAddressLineOne: "",
PrimaryAddressLineTwo: "",
PrimaryAddressLineThree: "",
PrimaryAddressCity: "",
PrimaryAddressZip: "",
PrimaryAddressState: "",
PrimaryAddressCountry: "",
MailingAddressSameAsPrimary: true,
MailingAddressLineOne: "",
MailingAddressLineTwo: "",
MailingAddressLineThree: "",
MailingAddressCity: "",
MailingAddressZip: "",
MailingAddressState: "",
MailingAddressCountry: "",
Contacts: [
{
ContactKey: -1,
Order: 1,
Text: "text",
FirstName: "",
MiddleName: "",
LastName: "",
Title: "",
Company: ""
}
],
Notes: "",
VendorTypeKey: 1,
VendorTypeDescription: "",
VendorTypeIsConsultant: false,
VendorTypeIsCreditCard: false,
VendorTypeNotes: "",
LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700"
},{
VendorKey: 2,
LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700",
Delete: true
}
],
UnchangedVendors: [
{
VendorKey: -1,
Name: "American Express",
Status: "Active",
DateEstablished: "2015-03-11",
Receives1099Form: false,
FormType1099: "Royalties",
RecipientID1099: "",
RecipientName1099: "",
ReportedAmount1099: 199.99,
FederalTaxWitheld: 199.99,
ReceivesW9Form: false,
BuisnessTypeW9: "Other",
OtherDescriptionW9: "",
DepartmentKey: 3,
DepartmentDescription: "Interiors",
AccountKey: 1,
AccountDescription: "Accounts Receivable",
AccountID: "1210",
CalculatePaymentDateMethod: "Day of the month",
NumberOfDaysFromInvoiceDate: 0,
DayOfTheMonthToPay: 1,
PrimaryPhoneNumber: "555-555-5555",
PrimaryPhoneDescription: "",
SecondaryPhoneNumber: "555-555-5555",
SecondaryPhoneDescription: "",
TertiaryPhoneNumber: "555-555-5555",
TertiaryPhoneDescription: "",
FaxNumber: "555-555-5555",
FaxDescription: "Buisness fax",
Email: "",
Website: "",
PrimaryAddressLineOne: "",
PrimaryAddressLineTwo: "",
PrimaryAddressLineThree: "",
PrimaryAddressCity: "",
PrimaryAddressZip: "",
PrimaryAddressState: "",
PrimaryAddressCountry: "",
MailingAddressSameAsPrimary: true,
MailingAddressLineOne: "",
MailingAddressLineTwo: "",
MailingAddressLineThree: "",
MailingAddressCity: "",
MailingAddressZip: "",
MailingAddressState: "",
MailingAddressCountry: "",
Contacts: [
{
ContactKey: -1,
Order: 1,
Text: "text",
FirstName: "",
MiddleName: "",
LastName: "",
Title: "",
Company: ""
}
],
Notes: "",
VendorTypeKey: 1,
VendorTypeDescription: "",
VendorTypeIsConsultant: false,
VendorTypeIsCreditCard: false,
VendorTypeNotes: "",
LastModifiedDate: "2015-03-11 16:22:54.229 GMT-0700"
}
]
UseSingleTransaction: false
}
}
Schema
{
Method: "string, required",
UseSessionCookie: "boolean",
MethodArgument: { "object, required"
UpdatedVendors: [ "array of objects, required"
{
VendorKey: "int, required",
Name: "string, required, max(80 characters)",
Status: "string, required",
DateEstablished: "date string, optional, nullable",
Receives1099Form: "boolean, optional, default false, if false other 1099 fields will be ignored",
FormType1099: "string, optional",
RecipientID1099: "string, optional, max(80 characters), disabled if Receives1099Form is false",
RecipientName1099: "string, optional, max(80 characters), disabled if Receives1099Form is false",
ReportedAmount1099: "float, optional, disabled if Receives1099Form is false",
FederalTaxWitheld: "float, optional, disabled if Receives1099Form is false",
ReceivesW9Form: "boolean, optional"
BuisnessTypeW9: "string, optional",
OtherDescriptionW9: "string, optional, max(20 characters)",
DepartmentKey: "int, optional, FK to Department",
DepartmentDescription: "string, Readonly, description of the given department, optional, will only exist if DepartmentKey is populated",
AccountKey: "int, optional, FK to GLAccount",
AccountDescription: "string, Readonly,, description of the given Account, optional, will only exist if AccountKey is populated",
AccountID: "string, optional, will only exist if AccountKey is populated",
CalculatePaymentDateMethod: "string, required",
NumberOfDaysFromInvoiceDate: "int, if CalculatePaymentDateMethod is set to 1 (Number of days) then this is required, if not it is ignored",
DayOfTheMonthToPay:"int, if CalculatePaymentDateMethod is set to 2(Day of the month) then this is required, if not it is ignored",
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 vendor"],
Notes: "string, optional, nullable",
VendorTypeKey: "int, optional, nullable",
VendorTypeDescription: "string, optional, max(80 characters), Only valid if VendorTypeKey is populated and valid",
VendorTypeIsConsultant: "boolean, optional, Only valid if VendorTypeKey is populated and valid",
VendorTypeIsCreditCard: "boolean, optional, Only valid if VendorTypeKey is populated and valid",
VendorTypeNotes: "string, optional, nullable, Only valid if VendorTypeKey is populated and valid",
LastModifiedDate: "string, required, date string format",
Delete: "boolean, optional"
}
],
UnchangedVendors: [], "array of objects, required, empty is the minimum requirement"
UseSingleTransaction: "boolean, required"
}
}
200
Headers
Content-Type: application/json
Body
{
Content: {
Vendors:[]
},
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 Vendor TypesPOST/AjeraAPI.ashx?{id}
ListVendorTypes returns an array of Vendor Types, limited by the optional filters detailed below.
Each returned Vendor Type includes only very basic information. This method is intended to be used for querying Vendor Types for particular key values.
Example URI
- id
string
(required) Example: ew0KICAiRGF0YWJhc2VOYW1lIjogIkFqZXJhX01haW4iDQp9An unique identifier required for api access.
ListVendorTypes
Headers
Content-Type: application/json
Accept: application/json
Body
{
Method: "ListVendorTypes",
SessionToken: "",
MethodArguments: {
FilterByStatus: ["Active"],
FilterByIsCreditCard: [true, false],
FilterByIsConsultant: [true, false],
}
}
Schema
{
Method: "string, required",
SessionToken: "string",
MethodArguments: {
FilterByStatus: "string array, optional",
FilterByIsCreditCard: "boolean array, optional",
FilterByIsConsultant: "boolean array, optional"
}
}
200
Headers
Content-Type: application/json
Body
{
ResponseCode: 200,
Message: "Success",
Errors: [],
Content: {
VendorTypes: [
{
"VendorTypeKey": 1,
"Description": "Communications",
"Status": "Active",
"Notes": ""
},
]
},
UsageKey: "d286b4e7-41fe-42f9-97e8-bfd842a77b88"
}
}
Schema
{
ResponseCode: {
type: int
},
Message: {
type: "string"
},
Errors: {
type: "array"
},
Content: {
type: "object",
properties: {
VendorTypeKey: {
type: int
},
Description: {
type: "string"
},
Status: {
type: "string"
},
Notes: {
type: "string"
}
}
},
UsageKey: {
type: "guid"
}
}