The ItemPath API is based around REST (https://en.wikipedia.org/wiki/Representational_state_transfer).

In REST, there are up to 5 endpoints for every resource.

For example, here are the endpoints for materials:

  • GET /api/materials, a list of materials with optional get parameters
  • POST /api/materials, used to create a new material
  • GET /api/materials/:id, for accessing a singular material by id
  • POST /api/materials/:id, for updating a singular material by id
  • DELETE /api/materials/:id, for removing a material

These endpoints are standard across all REST API's.

What is an API?

An API in very simple terms is a way for one software program to exchange information with another source.

Send a Request. Get a Response.

We use APIs for everyday things like:

  • Checking the weather forecast.
  • Buying something from Amazon (where the supplier uses Amazon's API to list their
  • stuff).
  • Using our smartphone to set the temperature at home using our connected thermostat.
  • Checking airfares on a travel site.
  • Using an app to reserve a table at a restaurant or a seat at a movie theater..
  • Paying for things online.
  • Checking the sports scores

An API lets a developer make a specific “call” or “request” in order to send or receive information. It can also be used to make a defined action such as updating or deleting data.

There are four basic request methods that can be made with API:

  1. GET – Gather information (e.g. Pull all Materials in PPG -- with a filter applied)
  2. PUT – Update pieces of data (e.g. Update a Material in PPG)
  3. POST – Create a new record (e.g. Add an Order Line to PPG)
  4. DELETE –Delete a record (e.g. Remove an Order Line from PPG)

Why use an API -- instead of file transfers or intermediate SQL tables?

  • Using APIs makes life easier for developers. Most modern software programs offer an API to enable developers to more easily and securely send and receive information than a file transfer or table approach.
  • When a modern ERP system offers an API, it is a more efficient, reliable, and easier way to exchange data than managing files and table records.
  • An API can give a quick response with an acknowledgement, errors, etc. much more easily than with file transfers or intermediate tables.

How is an API different from Web Services?

Web Services is a form of API using SOAP and XML files. It's a more specific type of API that is becoming less common, in favour of REST APIs which are generally the preferred choice among modern software companies and developers.