API

API CRE

API is the abbreviation for an application programming interface.

In simple terms it is an “electronic handshake” between two systems.

This electronic handshake defines a “common language” for the systems to talk to each other – i.e. for data to pass through. In the data-heavy world of commercial real estate (CRE), it is most commonly used to pass data between two systems.

What are the different types of APIs?

  • Private: For internal company user only
  • Partner: Approved third parties can use it
  • Public: Using a special key (token or customer status validation) you, as a member of the public, can use the endpoint.

API documentation 

As with any formal relationship, documentation is very important (and most helpful).

Documentation is considered good if it covers the following bases:

  • Quickstart guide
  • Authentication guide
  • Endpoint definitions
  • Code snippets – examples of the code (in relevant languages) that developers use to call the API
  • Example responses

For bonus points, we also recommend providing a “library” of fields providing the following

  • Field name
  • Object field belongs to
  • Example of data
  • Field type (e.g. string, boolean, integer etc.)
  • Explanation of the field (what it represents)
  • Also
    • Where data is pulled from: for fields where values are pre-defined, what fields you can expect back
    • Where data is pushed in: any criteria (validation) required for data to pass successfully, any critical fields

This ensures that each party does not have to understand the intricacies behind each system – a strong benefit of this method.

When parts of an API change, these changes should be explicitly and proactively documented. (And, needless to say, any documentation should also be “version controlled” – for example: on this day, the API changed, and these were the changes)

What are some good practices in API development?

A good API will provide detailed feedback in the event of any transaction / message failures, and will avoid “failing silently”. For example, for a push API, when data that fails the required shape of data approved for that field, the pusher will be notified.

Changes, especially “breaking changes”, should be proactively communicated to third parties relying on the API. Such changes should be communicated in advance to enable users of the API to know ahead of time.

API-related resources

Here, from Stack Overflow, is an article unpacking best practices for REST API design[/vc_column_text][/vc_column][/vc_row]

Related terms

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Content categories