How To Use The API Credential Usage Code - SuiteEngine/APIEngine GitHub Wiki
This Section will describe how to use the API Credential Usage Code in selecting the API Credential Record for an API Call. The API Credential Usage Code (PK2) field is used situations where the API Credential could change based on the applications needs. For example, you could have a number of Shopify Stores, each requiring their own specific credentials, but the API definitions do not change, only the credentials change.
At run time, the SuiteEngine API Engine will assign a credential record to the API Message: created for an individual API Call. It will do so by resolving the API Credential primary key values (API Set Code, Usage Code, API Function Code). As part of this process, the API Engine will look for an API Parameter assigned to the API Message that has a key of CredentialUsageCode and if found, it will use its value as the Usage Code.
The API Engine will then try a series of Gets on the Credential Table to find the most specific API Credential Record to assign to the message and use for Authentication for the API Call. For more information, see: How the API Engine Assigns an API Credential to an API Call.
Example:
🚧 Coming Soon - Walkthrough example of using the API Credential Usage Code.