Articles on: coreFORCE Advanced & Enterprise

coreFORCE - Development: Getting started with the coreFORCE API

coreFORCE Enterprise Only

Create a Developer account in coreFORCE**

In the backend of coreFORCE, go to Developer > API > Developers.  (If you do not see the Developer menu in your site, contact Coreware support to enable it)

Click Add.  On the Developer tab, enter the name and username, if desired, for the developer.  If desired, enter contact details on the Contact tab.  



On the Access tab:

If the developer does not have a user account, select a user from the Log In as dropdown.  It is recommended to give every developer their own account to make it clear which user made which changes.

Assign access to API Method Groups and/or individual API methods.  If the developer account does not have access to a method, they will get an error when they attempt to access it.

For internal development purposes, it may be desirable to check "Full Access". DO NOT GRANT FULL ACCESS TO CUSTOMERS.  A developer account with Full Access has as much power as a Full Client Access user.

If you want to restrict a Developer account to connect only from certain IP addresses, add the IP addresses at the bottom of the page.  By default, a developer can connect from any IP address.



From the Developer tab, copy the Connection Key and share it with the developer.  This will serve as the login for API access.

Connecting to the API

Once the Developer account is set up, you can begin to connect to the API.  It is recommended to use Postman for initial testing and development.

The endpoint for your API is your coreFORCE URL with /api.php at the end.  For example, if the front end of your coreFORCE site is https://bobsonlinestore.com, the API endpoint will be https://bobsonlinestore.com/api.php

The developer's connection key is the login for the API.  There are four ways to send the connection key:

As a Query Parameter for a GET request: https://bobsonlinestore.com/api.php?connection_key=C18B4BDA12EA90EB2417DC5EA45B52A8

As an HTTP header.  The HTTP header must have the name Connection-Key (with a dash instead of an underscore)![](https://storage.crisp.chat/users/helpdesk/website/35b7e45ffee6da00/84e1112b-ac78-4c1d-b102-861040_aiwkwg.png)

As a POST parameter in the body of the request.![](https://storage.crisp.chat/users/helpdesk/website/2534509c4dc8a400/754ba296-98c4-4d76-a547-1b5f16_u4151k.png)

In JSON in the body of the request.![](https://storage.crisp.chat/users/helpdesk/website/7a25676410bed40/378ab802-36a2-4328-b6d3-740a91_1b4ihi8.png)

The API method you are calling can be specified with the query parameter "action" or "method".  For example:

https://bobonlinestore.com/api.php?action=test_credentials

In general, GET methods will read data from query parameters, POST parameters, or JSON.  POST methods will require POST or JSON.

API Method Documentation

Documentation for API methods is available in the backend of coreFORCE at Developer > API > Documentation.  Select a method to see the method code and parameters.



In this example, to access the product catalog and look up two products by ID, you would run the following API call (remember to include the connection key either as an HTTP header or a query parameter):

https://bobsonlinestore.com/api.php?method=get_catalog&product_ids=277,12374

Updated on: 06/26/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!