Skip to main content

API Origins

Distributor/API builder steps for allowing external websites to call your Encompass API Commands (CORS) by adding API Origins to an Application. Needs Solution Authentications and API Edit permissions.

B
Written by Bailey Naas-Thornton

Minimum Version Required: 22.01

Steps

All modern browsers support Cross-Origin Resource Sharing, or CORS. This means that by default, the javascript on a page cannot make a request to a different domain unless the receiving domain has explicitly allowed it.
​
​
To allow this in Encompass, API builders need to add records to the API Origins table under their Application.

  • A record in the API Origins table allows your requests from another system to be requested back to the Encompass servers, for your API commands, from the javascipt on that external page.
    ​
    ​

  • For example, this would allow a public site for your company to reach into an API Command you created in your Encompass system to get a product listing.

By default, if no API Origins are created, only requests from the same Encompass domain are allowed to the API Commands.

You must have permission (Solution Authentications) to edit an Application in order to add API Origins to that Application, and the API Edit permission.

Did this answer your question?