Back to top

Ajera API

message for Ajera API general doc

For additional api methods see the following below:
Home
Clients API
Contacts API
Employees API
Vendors 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 Vendor Invoices
POST/AjeraAPI.ashx?{id}

In order to find the correct vendor invoices, you must first find the vendor invoices by using the ListVendorInvoices API method. This method will return a list of vendor invoices that match the criteria you specify. You can then use the following filters to help you find the correct vendor invoices.

Filter Input Type Description
FilterByVendor array of integers A list of vendor ids to filter by.
See ListVendors
FilterByCompany integer The company key to filter by.
See ListCompanies
FilterByVendorType integer The vendor type key to filter by.
See ListVendorTypes
FilterByPaid boolean Filter by paid status.
FilterByUnpaid boolean Filter by unpaid status.
FilterByVoided boolean Filter by voided status.
FilterByEarliestInvoiceDate date (YYYY-MM-DD) Filter invoices where invoice date greater than or equal to the specified date.
FilterByLatestInvoiceDate date (YYYY-MM-DD) Filter invoices where invoice date less than or equal to the specified date.
FilterByEarliestAccountingDate date (YYYY-MM-DD) Filter invoice where accounting date greater than or equal to the specified date.
FilterByLatestAccountingDate date (YYYY-MM-DD) Filter invoice where accounting date less than or equal to the specified date.
FilterByEarliestInvoiceDatetoPay date (YYYY-MM-DD) Filter invoice where invoice date to pay greater than or equal to the specified date.
FilterByLatestDatetoPay date (YYYY-MM-DD) Filter invoice where invoice date to pay less than or equal to the specified date.
FilterByGreaterThanAmount decimal Filter invoice where invoice amount greater than the specified amount.
FilterByLessThanAmount decimal Filter invoice where invoice amount less than the specified amount.
FilterByEqualToAmount decimal Filter invoice where invoice amount equal to the specified amount.

Note that some filters are mutually exclusive. For example, you cannot filter by both paid and unpaid status. Other filters include ammounts and dates. You can only filter by one of these at a time.

Example URI

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

An unique identifier required for api access.

Request  ListVendorInvoices
HideShow
Headers
Content-Type: application/json
Body
{
  "Method": "ListVendorInvoices",
  "SessionToken": "{{SessionToken}}",
  "MethodArguments": {
    // "FilterByVendor": [ 19 ],
    // "FilterByCompany": 1
    // "FilterByVendorType": 1
    // "FilterByPaid": false,
    // "FilterByUnpaid": false,
    // "FilterByVoided": false
    // "FilterByEarliestInvoiceDate": "2018-07-07"
    // "FilterByLatestInvoiceDate": "2012-05-17",
    // "FilterByEarliestAccountingDate": "2018-05-17",
    // "FilterByLatestAccountingDate": "2012-05-17",
    // "FilterByEarliestInvoiceDatetoPay": "2018-09-15",
    // "FilterByLatestDatetoPay": "2012-06-07",
    // "FilterByGreaterThanAmount": 20000.0,
    // "FilterByLessThanAmount": 100.0,
    // "FilterByEqualToAmount": 75.0
  }
}
Response  200
HideShow
Body
{
  "ResponseCode": 200,
  "Message": "Success",
  "Errors": [],
  "Content": {
    "VendorInvoices": [
      {
        "VendorInvoiceKey": 1,
        "VendorKey": 18,
        "VendorDescription": "Global Blueprinting",
        "VendorTypeKey": 4,
        "VendorTypeDescription": "General Office",
        "Description": "",
        "Status": "Normal",
        "Type": "BeginningBalance",
        "Number": "2569",
        "Date": "2012-05-16",
        "AccountingDate": "2012-05-16",
        "DateToPay": "2012-06-15",
        "Amount": 241.82,
        "Notes": "",
        "OnHold": false
      }
    ]
  }
}

Get Vendor Invoices
POST/AjeraAPI.ashx?{id}

Once you have found the correct vendor invoices, you can use the GetVendorInvoices method to get the details of the vendor invoices. You can specify a list of vendor invoice keys to retrieve using the RequestedVendorInvoices argument. This argument is mandatory and must contain at least one vendor invoice key in the array.

Example URI

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

An unique identifier required for api access.

Request  GetVendorInvoices
HideShow
Headers
Content-Type: application/json
Body
{
  "Method": "GetVendorInvoices",
  "SessionToken": "{{SessionToken}}",
  "MethodArguments": {
    "RequestedVendorInvoices": [
      1
    ]
  }
}
Response  200
HideShow
Body
{
  "ResponseCode": 200,
  "Message": "Success",
  "Errors": [],
  "Content": {
    "VendorInvoices": [
      {
        "VendorInvoiceKey": 1,
        "VendorKey": 18,
        "VendorDescription": "Global Blueprinting",
        "VendorTypeKey": 4,
        "VendorTypeDescription": "General Office",
        "CompanyKey": 1,
        "CompanyDescription": "Accutera Architects",
        "Description": "",
        "Status": "Normal",
        "Type": "BeginningBalance",
        "Number": "2569",
        "Date": "2012-05-16",
        "AccountingDate": "2012-05-16",
        "DateToPay": "2012-06-15",
        "Amount": 241.82,
        "Notes": "",
        "OnHold": false
      }
    ],
    "VendorInvoicesDetails": [
      {
        "VendorInvoiceKey": 1,
        "TransactionKey": 90,
        "ProjectKey": 19,
        "ProjectDescription": "Highland Shopping Center",
        "ProjectID": "03-138",
        "PhaseKey": 23,
        "PhaseDescription": "Architectural",
        "PhaseID": "",
        "ActivityKey": 12,
        "ActivityDescription": "Blueprints",
        "CompanyKey": 1,
        "CompanyDescription": "Accutera Architects",
        "Units": 0,
        "UnitDescription": "print",
        "CostRate": 0,
        "CostAmount": 207.27,
        "AccountKey": 79,
        "AccountDescription": "Billable Reproduction & Printing",
        "DepartmentKey": 2,
        "DepartmentDescription": "Architectural",
        "Hold": false,
        "Non_1099": false,
        "Notes": ""
      },
      {
        "VendorInvoiceKey": 1,
        "TransactionKey": 91,
        "ProjectKey": 19,
        "ProjectDescription": "Highland Shopping Center",
        "ProjectID": "03-138",
        "PhaseKey": 24,
        "PhaseDescription": "Interior Design",
        "PhaseID": "",
        "ActivityKey": 12,
        "ActivityDescription": "Blueprints",
        "CompanyKey": 1,
        "CompanyDescription": "Accutera Architects",
        "Units": 0,
        "UnitDescription": "print",
        "CostRate": 0,
        "CostAmount": 25.91,
        "AccountKey": 79,
        "AccountDescription": "Billable Reproduction & Printing",
        "DepartmentKey": 3,
        "DepartmentDescription": "Interiors",
        "Hold": false,
        "Non_1099": false,
        "Notes": ""
      },
      {
        "VendorInvoiceKey": 1,
        "TransactionKey": 92,
        "ProjectKey": 19,
        "ProjectDescription": "Highland Shopping Center",
        "ProjectID": "03-138",
        "PhaseKey": 25,
        "PhaseDescription": "Landscape Design",
        "PhaseID": "",
        "ActivityKey": 12,
        "ActivityDescription": "Blueprints",
        "CompanyKey": 1,
        "CompanyDescription": "Accutera Architects",
        "Units": 0,
        "UnitDescription": "print",
        "CostRate": 0,
        "CostAmount": 8.64,
        "AccountKey": 79,
        "AccountDescription": "Billable Reproduction & Printing",
        "DepartmentKey": 4,
        "DepartmentDescription": "Landscape",
        "Hold": false,
        "Non_1099": false,
        "Notes": ""
      }
    ]
  },
  "UsageKey": "2bed43e9-3723-40d9-b9c6-683ab8207346"
}

Create Vendor Invoices
POST/AjeraAPI.ashx?{id}

You can create a new vendor invoice by using the CreateVendorInvoices method. This method will create a new vendor invoice.

Some fields are only required if you specify some other fields. For example, if you specify a project key, you must also specify a phase key and an activity key.

The Amount field must be equal to the sum of the CostAmount fields in the LineItems array.

The minimum required fields to create a vendor invoice are:

{
  "Method": "CreateVendorInvoices",
  "SessionToken": "{{SessionToken}}",
  "MethodArguments": {
    "ShowTiming": true,
    "VendorInvoices": [
      {
        "VendorKey": 18,
        "Amount": 1200.0,
        "LineItems": [
          {
            "AccountKey": 79,
            "DepartmentKey": 2,
            "CostAmount": 1000.0
          },
          {
            "AccountKey": 79,
            "DepartmentKey": 3,
            "CostAmount": 200.0
          }
        ]
      }
    ]
  }
}

Example URI

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

An unique identifier required for api access.

Request  CreateVendorInvoices
HideShow
Headers
Content-Type: application/json
Body
{
  "Method": "CreateVendorInvoices",
  "SessionToken": "{{SessionToken}}",
  "MethodArguments": {
    "VendorInvoices": [
      {
        "VendorKey": 18,
        "CompanyKey": 1,
        "Description": "",
        "Number": "2569",
        "Date": "2012-05-16",
        "AccountingDate": "2012-05-16",
        "Amount": 241.82,
        "Notes": "",
        "LineItems": [
          {
            "ProjectKey": 19,
            "PhaseKey": 23,
            "ActivityKey": 12,
            "CompanyKey": 1,
            "Units": 0.0,
            "CostRate": 0.0,
            "CostAmount": 207.27,
            "AccountKey": 79,
            "DepartmentKey": 2,
            "Hold": false,
            "Non_1099": false,
            "Notes": ""
          },
          {
            "ProjectKey": 19,
            "PhaseKey": 24,
            "ActivityKey": 12,
            "CompanyKey": 1,
            "Units": 0.0,
            "CostRate": 0.0,
            "CostAmount": 25.91,
            "AccountKey": 79,
            "DepartmentKey": 3,
            "Hold": false,
            "Non_1099": false,
            "Notes": ""
          },
          {
            "ProjectKey": 19,
            "PhaseKey": 25,
            "ActivityKey": 12,
            "CompanyKey": 1,
            "Units": 0.0,
            "CostRate": 0.0,
            "CostAmount": 8.64,
            "AccountKey": 79,
            "DepartmentKey": 4,
            "Hold": false,
            "Non_1099": false,
            "Notes": ""
          }
        ]
      }
    ],
  }
}
Response  200
HideShow
Body
{
  "ResponseCode": 200,
  "Message": "Success",
  "Errors": [],
  "Warnings": [],
  "Content": {
    "VendorInvoices": [
      {
        "VendorInvoiceKey": 92,
        "VendorKey": 18,
        "VendorDescription": "Global Blueprinting",
        "VendorTypeKey": 4,
        "VendorTypeDescription": "General Office",
        "CompanyKey": 1,
        "CompanyDescription": "Accutera Architects",
        "Description": "",
        "Status": "Normal",
        "Type": "Normal",
        "Number": "2569",
        "Date": "2012-06-06",
        "AccountingDate": "2012-06-16",
        "DateToPay": "2012-07-06",
        "Amount": 241.82,
        "Notes": "",
        "OnHold": false
      }
    ],
    "VendorInvoicesDetails": [
      {
        "VendorInvoiceKey": 92,
        "TransactionKey": 4147,
        "ProjectKey": 19,
        "ProjectDescription": "Highland Shopping Center",
        "ProjectID": "03-138",
        "PhaseKey": 23,
        "PhaseDescription": "Architectural",
        "PhaseID": "",
        "ActivityKey": 12,
        "ActivityDescription": "Blueprints",
        "CompanyKey": 1,
        "CompanyDescription": "Accutera Architects",
        "Units": 0,
        "UnitDescription": "print",
        "CostRate": 0,
        "CostAmount": 207.27,
        "AccountKey": 79,
        "AccountDescription": "Billable Reproduction & Printing",
        "DepartmentKey": 2,
        "DepartmentDescription": "Architectural",
        "Hold": false,
        "Non_1099": false,
        "Notes": ""
      },
      {
        "VendorInvoiceKey": 92,
        "TransactionKey": 4148,
        "ProjectKey": 19,
        "ProjectDescription": "Highland Shopping Center",
        "ProjectID": "03-138",
        "PhaseKey": 24,
        "PhaseDescription": "Interior Design",
        "PhaseID": "",
        "ActivityKey": 12,
        "ActivityDescription": "Blueprints",
        "CompanyKey": 1,
        "CompanyDescription": "Accutera Architects",
        "Units": 0,
        "UnitDescription": "print",
        "CostRate": 0,
        "CostAmount": 25.91,
        "AccountKey": 79,
        "AccountDescription": "Billable Reproduction & Printing",
        "DepartmentKey": 3,
        "DepartmentDescription": "Interiors",
        "Hold": false,
        "Non_1099": false,
        "Notes": ""
      },
      {
        "VendorInvoiceKey": 92,
        "TransactionKey": 4149,
        "ProjectKey": 19,
        "ProjectDescription": "Highland Shopping Center",
        "ProjectID": "03-138",
        "PhaseKey": 25,
        "PhaseDescription": "Landscape Design",
        "PhaseID": "",
        "ActivityKey": 12,
        "ActivityDescription": "Blueprints",
        "CompanyKey": 1,
        "CompanyDescription": "Accutera Architects",
        "Units": 0,
        "UnitDescription": "print",
        "CostRate": 0,
        "CostAmount": 8.64,
        "AccountKey": 79,
        "AccountDescription": "Billable Reproduction & Printing",
        "DepartmentKey": 4,
        "DepartmentDescription": "Landscape",
        "Hold": false,
        "Non_1099": false,
        "Notes": ""
      }
    ]
  },
  "UsageKey": "f2ab69d9-698f-4f9b-a9db-61b986d61888"
}

Generated by aglio on 17 Oct 2024