description |
---|
This endpoint allows you to edit an account's profile field within your community. |
{% swagger method="post" path="/general/edit_acc_profile_fields" baseUrl="https://api.sonorancms.com" summary="Edit Account Profile Fields" %} {% swagger-description %} Edit profile fields on a community account found by API ID or account ID. {% endswagger-description %}
{% swagger-parameter in="body" name="id" type="string" required="true" %} Community ID {% endswagger-parameter %}
{% swagger-parameter in="body" name="key" type="string" required="true" %} API Key {% endswagger-parameter %}
{% swagger-parameter in="body" required="true" name="type" type="string" %} CLOCK_IN___OUT {% endswagger-parameter %}
{% swagger-parameter in="body" required="true" name="data" type="array" %} Array of request objects {% endswagger-parameter %}
{% swagger-response status="200: OK" description="The following 200 response texts may be sent in response:" %}
[
{
"id": "d9d1288e-3892-40d6-acc5-be2c3d294bd4",
"value": ["some", "strings", "for", "array"]
},
... // This will return all profile fields that have data associated from the account
]
{% endswagger-response %}
{% swagger-response status="400: Bad Request" description="The following 400 errors may be sent in response:" %}
INVALID API KEY
INVALID COMMUNITY ID
API ID NOT LINKED TO AN ACCOUNT IN THIS COMMUNITY
{% endswagger-response %}
{% swagger-response status="404: Not Found" description="The following 404 errors may be sent in response:" %}
API ID NOT LINKED TO AN ACCOUNT IN THIS COMMUNITY
{% endswagger-response %} {% endswagger %}
{
"id": "YOUR_COMMUNITY_ID",
"key": "YOUR_API_KEY",
"type": "EDIT_ACC_PROFLIE_FIELDS",
"data": [
{
// User Identification
"apiId": "SOME_API_ID", // Optional - must have one
"username": "SOMEUSERNAME", // Optional - must have one
"accId": "SOMEACCID", // Optional - must have one
"discord": "111122223333444455", // Optional - must have one
"uniqueId": 1234 // Optional - must have one
// Configuration
"profileFields": [
{
"id": "d9d1288e-3892-40d6-acc5-be2c3d294bd4",
"value": ["some", "strings", "for", "array"]
},
... // You can supply a min. of one profile field but can take as many "update" objects as needed.
]
}
]
}