It enables headless clients to dynamically retrieve feature status exposed via APIs
Endpoint
Endpoint
request type
API Type
https://{{Swym> API Endpoint }}/api/v3/config/metafields/enabled-features
POST
shopper
Query Params
Parameter
Type
Required
Description
pid
string (Encoded)
Yes
Unique identifier for the store available in Swym Admin
Example Curl
curl --location --request GET '{{Swym API Endpoint}}/api/v3/config/metafields/enabled-features?pid={{URL Encoded PID}}'\
--header 'Accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded;charset=UTF-8'
🚧
Curl Placeholders
Assuming these values are provided above, the curl command should work correctly. However, if there are any issues with the API endpoint or the data being passed in the request, there could still be errors that need to be resolved before you can test these APIS.
Placeholders
Descriptions
{{Swym API Endpoint}}
This needs to be replaced with the actual Swym API endpoint URL.
{{URL Encoded PID}}
This needs to be replaced with the actual PID value, URL-encoded.
{
"status": "error",
"error-code": "user-not-logged-in",
"error-msg": "User is not logged in. This API only supports logged in users. Please refer our API documentation for more details."
}
Error Response:
If the request is unsuccessful, the API will return a JSON response with an error message and an HTTP status code indicating the type of error that occurred.
Status Code
Type
Description
400
Bad Request
Your request is invalid, change your request params and query and try again.
401
Unauthorised
You are performing an action on a resource that is not granted to the current logged-in user. Additionally, for REST APIs, this could mean your API key is wrong.
404
Not Found
The specified requested data could not be found.
500
Internal Server Error
We had a problem with our server. Try again later.
503
Service Unavailable
We're temporarily offline for maintenance. Please try again later.