Sometimes you need a custom field where the values are fetched from an external system. This can be your website or any other source.
A typical example is to link an article to a certain brand, where your website has a collection of brands on file.
StoryChief provides the option to create custom select fields, where the available options are fetched from your own API.
โ ๏ธ Caution: This article assumes basic knowledge of APIs.
Start using dynamic custom fields
Step 1. Provide an endpoint where StoryChief can fetch the available options from in JSON.
Example: GET https://my-website.com/api/companies
[
{
"key":"659",
"value":"Microsoft"
},
{
"key":"4740",
"value":"Amazon"
},
{
"key":"49",
"value":"Apple"
}
]
๐Note: Basic security could be added in the form of a shared private key as a URL parameter if your endpoint is served with SSL/TLS.
Example: https://my-website.com/api/companies?key=OPTIONAL_SECRET_KEY
Step 2. Reach out to your StoryChief support engineer for finalization.
โ Limitation: This feature is only available on Enterprise plans.
The result would look like this:
When publishing the key will be sent over from your original API response. In this case, โMicrosoftโ would result in key โ659โ being sent.