Responses

The response to your request contains the status code in the response header and any requested data in the response body.

Successful requests return the requested resource and the return status success code.
Request Return status success code Requested resource
GET 200 OK The current JSON representation of the resource.
POST 201 Created The location of the newly created resource in the Location header, along with the current JSON representation of the resource. If an error such as a business rule violation occurs, the details of the error are provided in the response in JSON format.
PUT 200 OK The current JSON representation of the updated resource. If the user does not have access to update the resource, the PUT returns 403 Forbidden.
DELETE 200 OK If the user does not have access to delete the resource, the DELETE returns 403 Forbidden.

Sometimes requests to the API are not successful. Errors can occur for a wide range of reasons. In all cases, the API returns a status code that indicates the nature of the failure with a response body containing additional information. Here are some of the most common error codes:

Code Meaning Description
400 Bad request This error usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of the request and try again.
401 No authorization A valid API key was not provided with the request, so the API could not associate a user with the request.
403 Forbidden The user does not have access to the requested resource. The API key and request syntax were valid but the server is refusing to complete the request.
404 Not found Either the object specified by the request does not exist, or the request method and path supplied do not specify a known API.
500 Internal server error There was a problem on the application server.
503 Service unavailable The server is temporarily unable to handle the request.

The server validates the following:

  • JSON name-value pairs: The server validates the name-value pairs against the database schema.
  • Login: The server validates that the login credentials are valid.
  • Data: The server validates the input data to ensure referential integrity and other database column level dependencies.

Example

Here is an example of a request to get the contact with ID 123456789.

curl --request GET \
  --url 'https://{{url}}/contact/123456789' \
  --header 'authorization: Bearer {{oauth_token}}' \
  --header 'content-type: application/json'

Here is an example of the JSON returned in the response body:

[
    {
        "Company": "Town of Marblehead",
        "flName": "Michael Simpson, PE ",
        "ContactID": "123456789",
        "ClientID": "0000MARBLE",
        "CLAddress": "Default",
        "Vendor": "",
        "VEAdddress":"",
        "LastName": "Simpson",
        "FirstName": "Michael",
        "MiddleName": "Phillip",
        "Salutation": "Mr.",
        "Suffix": "PE",
        "Title": "Project Manager",
        "Address1": "377 DeSoto Rd.",
        "Address2": "",
        "Address3": "",
        "Address4": "",
        "City": "Paris",
        "State": "CA",
        "Zip": "39348",
        "Country": "",
        "Phone": "508.631.4590",
        "Fax": "508.631.4500",
        "Pager": "(123) 456-7890", 
        "CellPhone": "508.784.9382",
        "HomePhone": "508.267.0927",
        "Email": "email@company.com",
        "Memo": "",
        "MailingAddress": "N",
        "Billing": "N",
        "PrimaryInd": "N",
        "ContactStatus": "A",
        "CreateUser": "William Apple",
        "CreateDate": "2018-02-14T16:34:58.000",
        "ModUser": "William Apple",
        "ModDate": "2018-03-18T23:21:06.000",
        "Addressee": "",
        "PreferredName": "Mike",
        "CustomCurrencyCode": "USD",
        "Source": "ClientRefe",
        "PagerFormat": "(###) ###-####",
        "CellPhoneFormat": "###.###.####",
        "HomePhoneFormat": "###.###.####",
        "AjeraSync": "N",
        "TLInternalKey": "",
        "TLSyncModDate": "",
        "Owner": "",
        "StatusReason": "",
        "Rating": "",
        "FirmDescription": "Name of the firm associated with the contact",
        "FirmAddress1": "2340 Ocean Avenue",
        "FirmAddress2": "Suite 123B",
        "FirmAddress3": "",
        "FirmAddress4": "",
        "FirmCity": "Marblehead",
        "FirmState": "MA",
        "FirmZip": "06130",
        "FirmCountry": "US",
        "FirmBusinessPhone": "508.631.4590",
        "FirmBusinessPhoneFormat": "###.###.####",
        "FirmBusinessFax": "508.631.4500",
        "FirmBusinessFaxFormat": "",
        "FirmPager": "(123)456-7890",
        "Market": "Government",
        "Website": "https://www.deltek.com",
        "QualifiedStatus": "sysQual",
        "StatusDate": "2017-03-30T17:50:31.520",
        "ProfessionalSuffix": "",
        "SFID": "",
        "emOwnerfl": "",
        "RecentOpportunityName": "",
        "RecentOpportunityID": "",
        "RecentOppRole": "",
        "TopTPStartDate": "",
        "TopTPSubject": "",
        "TopTPContactID": "",
        "TopTPCreateEmployee": "",
        "TopTPCreateUserName": "",
        "HasPhoto": 0,
        "PhotoModDate": "",
        "ClientName": "Town of Marblehead",
        "VName": "",
        "QBOID": "",
        "QBOIsMainContact": "",
        "QBOLastUpdated": "",
        "custNewsletter": "Y",
        "custCorporateList": "Y",
        "custPromotional": "N",
        "custMarket": "DoD",
        "custPersonal": "",
        "custBirthDate": "",
        "custGolf": "N",
        "custSpouseName": "",
        "custPromotional": "Y"
    }
]