e-copedia hjælpecenter

Which API should I use?

How to choose between RESTAPI or OpenAPI

Sidst opdateret:
Skrevet af Charles J

When starting a new integration with e-conomic, we generally recommend using our OpenAPIs whenever the functionality you need is available there.

Why choose OpenAPI?

Our OpenAPIs have several advantages compared to the RESTAPI.

They are better documented and easier to work with, with a more consistent and developer-friendly structure across the different APIs.

They are also versioned, which allows us to introduce changes and improvements without requiring every existing integration to immediately adapt.

OpenAPIs generally has better performance and we continue to develop and introduce new functionality therein.

Our RESTAPI is still supported, but it is currently in featurefreeze. This means that existing functionality will continue to work and be maintained, but new functionality will generally be developed for our OpenAPIs instead.

Versioning

One of the main advantages of OpenAPI is versioning.

Each API has its own version, allowing integrations to continue using the version they were built against while newer versions are released.

This gives us the ability to introduce changes that might otherwise be breaking without forcing all integrations to upgrade immediately.

Obs

💡In the event of major version changes, the previous version will be supported for at least 12 months. It is the Partner's responsibility to transition to the latest version to avoid service disruptions.

For example, if a new version of an API introduces a structural change, an integration using the previous version can continue operating while the developer prepares the transition to the newer version.

This makes upgrades more predictable and gives developers greater control over when changes are introduced into their integrations.

So, which API should I use?

For new integrations, we recommend starting with OpenAPI and checking whether the functionality you need is available there. OpenAPI should generally be your first choice.

There are still areas where functionality is only available through the RESTAPI. In those cases, it is perfectly fine to use REST alongside OpenAPI.

Obs

⭐ Authentication between Open- and RESTAPI is the same.

An integration therefore does not have to choose exclusively between the two. You can use OpenAPI for the functionality available there and REST for endpoints that have not yet been made available through OpenAPI.

Var denne artikel nyttig?