applications.submit
Submits the player’s answers to an application form.
POST
/api/v1/{locale}/applications/{slug}API scope applications.submit
Request
Send Authorization: Bearer <key> with each request.
Requires a signed-in player and applicable permission.
Path parameters
| Field | Type | Requirement | Description |
|---|---|---|---|
locale | tr or en | Required | Request locale. |
slug | string | Required | URL slug of the resource. |
Request body
| Field | Type | Requirement | Description |
|---|---|---|---|
revision | integer | Required | The form operation’s application.revision value. |
answers | object | Required | String answers keyed by question key. Required questions and accepted values depend on the form. |
Run samples from your application server. See Quickstart for variables and sessions.
curl --fail-with-body --request POST \
-H "Authorization: Bearer $MINEXON_API_KEY" \
-b "$MINEXON_COOKIE_JAR" -c "$MINEXON_COOKIE_JAR" \
-H 'Content-Type: application/json' \
--data '{
"revision": 1,
"answers": {
"q1": "Friday evenings"
}
}' \
"${MINEXON_BASE_URL}/api/v1/en/applications/example"Response
HTTP 200 · application/json
| Field | Type | Requirement | Description |
|---|---|---|---|
next | string | Required | URL of the next player page. |
notices | string[] | Conditional | Success and state codes. |
error | string | Conditional | Error code. |
errors | string[] | Conditional | Field or operation error codes. |
{
"next": "/en/my-applications"
}When the form is shown again, the response can contain data instead of next. Check the HTTP status and the error fields together.
Form response fields
| Field | Type | Requirement | Description |
|---|---|---|---|
locale | string | Required | Response locale. |
error | string or null | Conditional | Action error. Can be empty on success. |
errors | array or object | Conditional | Field or form validation errors. |
notice | string or null | Conditional | Action notice. |
application | JSON value | Conditional | Value determined by screen and configuration. |
existing | JSON value | Conditional | Value determined by screen and configuration. |
application.questions[].key | string | Conditional | Question key for the answers object. |
application.questions[].type | string | Conditional | Question input type. |
application.questions[].label | string | Conditional | Question text to display. |
application.questions[].options | string[] | Conditional | Accepted values for choice questions. |
application.questions[].required | boolean | Conditional | Whether the question is required. |
Flow and error cases
On success or a duplicate submission, next points to application history. Form or answer errors can return HTTP 422 with data.error.