Veltos.Tech

Development

API

Also known as: application programming interface, REST API, web API

Definition

An API is a fixed set of rules by which one program requests data or actions from another: method addresses, request and response formats, authentication and rate limits, documented so that both sides can evolve independently.

In practice an API looks like a list of addresses and the rules for calling them. The client sends a request, say GET /orders/123 with a token in the header, and the server returns a structured JSON response plus a status code: 200 when all is well, 404 when the object does not exist, 401 for access problems, 429 when a rate limit is hit. The two common styles are REST, where data is exposed as resources and addresses, and GraphQL, where the client describes exactly which fields it wants in a single query.

On a commercial project the API work is almost always the most underestimated line in the estimate. It is how the site exchanges data with the accounting system, the payment provider, the delivery service, the CRM, the mailing platform, the telephony. Each of those is not a one-hour connection: it is field mapping, error and timeout handling, retries, a queue, logging, and a separate plan for when the other system is down. That is why integrations typically eat 10-15% of a website budget and are the usual reason a schedule slips when they were priced by guesswork.

Three traps show up more often than the rest. First, no documentation: when the API contract lives in one developer’s head, changing contractors turns into reverse engineering. Second, breaking changes without versioning: a field gets renamed and the mobile app stops working for half the userbase, because not everyone updates and not immediately. Third, treating somebody else’s API as if it were your own: third-party services have limits, degradations and maintenance windows, and your system has to survive them without losing orders rather than returning a 500 to the customer.

  • Machine-readable documentation (OpenAPI or a GraphQL schema), not a chat thread.
  • Versioning and a stated deprecation policy for endpoints.
  • Token authentication with scoped permissions rather than one all-powerful key.
  • Idempotent money operations: a repeated request must not create a second payment.
  • Rate limits, timeouts, retries and a queue on the calling side.

Related terms

Related services

Read more

Need this done, not just defined?

We do this work, not only write about it. Describe the task and we will scope it and send a staged estimate.