The Certify API

The Certify API is a RESTful API that enables you to build applications and integrations that interact directly with data in Certify. Make calls directly to our API endpoints without having to login and access the data manually.

All production API requests are made to:

https://api.certify.com/v1/


REST

The Certify API uses standard RESTful API calls via HTTP web requests with methods like GET, POST, and PUT. All calls must be made using HTTPS.

JSON and XML

The Certify API accepts requests and returns responses in either JSON or XML. Please set the Content-Type header to either “application/json” or “application/xml” in the requests to define which format you would like. The default format is JSON.

Authentication

All API calls to the Certify API must include authentication information to verify the identity of the caller. Authentication is comprised of two tokens called the API Key and the API Secret. The API Key is a hashed code for your company; it tells us who you are. The API Secret is a generated token that grants you access to your Certify data. Both tokens can be found in the Configuration section of your company’s administrator users inside Certify. These tokens should NOT be freely given out, they should only be given to parties trusted with access to your company’s data.

To properly provide authentication, each API call must have the following headers:

Header Name Header Value
x-api-key API Key
x-api-secret API Secret

Responses

Successful responses returned from the Certify API will be formatted according to the specific API method called. Any errors returned will be in the following format:

JSON
{
  errorCode: {code}
  errorValue: {value}
}
XML
<Error>
    <ErrorCode>{code}</ErrorCode>
    <ErrorMessage>{message}</ErrorMessage>
<Error>

Refer to the list of general error codes or the documentation for the specific API method called for more information.

Code Description
400 Bad Request. Method request is incorrectly formatted.
401 Unauthorized. Authentication failed. API Key or API Secret is invalid or not provided in the request.
403 maximum response record limit exceeded or invalid method endpoint.
405 Method Not Allowed. Request contains an HTTP method type that is not supported for that API function.
500 Internal Server Error. Contact Certify for further assistance.
Pagination

The following API methods support pagination:

  • GET /cpdlists
  • GET /departments
  • GET /expensecategories
  • GET /expensereports
  • GET /expenses
  • GET /invoicereports
  • GET /invoices
  • GET /mileagerates
  • GET /mileageratedetails
  • GET /receipts
  • GET /users

Note: For all other methods, there is a maximum limit of 1,000 records returned. If the request returns more than the limit, it must be narrowed down using the filter parameters of the method.

Pagination is automatically enabled for the above methods.
The max number of results per page is 1,000.

Example Paginated Response
{
    "Page": 1,
    "PageCount": 8,
    "Records": 10,
    "RecordCount": 74,
    "ExpenseCategories": [
        {
            "ff4484da-6847-4617-bc2d-d1150878a15a",
            ...
        }
    ]
}
<ExpenseCategories Page="1" PageCount="1" Records="74" RecordCount="74">
    <ExpenseCategory>
        <ID>ff4484da-6847-4617-bc2d-d1150878a15a</ID>
        ...
    </ExpenseCategory>
</ExpenseCategories>
Field Value Description
Page Current page being returned.
PageCount Total number of pages.
Records Number of records on current page.
RecordCount Total number or records.

API Methods Expand All   |  Collapse All

{{method.type}}
{{method.name}}
Expand Method
Description

{{method.description}}

Parameters
Name Located in Description Required Schema
{{item}}
Responses
Code Description
{{item}}
Example Request
{{method.sampleReq ? getSampleJSON(method.sampleReq, method.type) : ""}}
{{method.sampleReq ? getSampleXML(method.sampleReq) : ""}}
Response

{{method.responseDesc}}

Example Response
{{getSampleJSON(method.sampleData, method.type)}}
{{getSampleXML(method.sampleData)}}
Fields
Field Value Description