submitAppBlockForm
Requires permission sales:sales_order:update.
Save a form an installed app draws in its block on an admin order (for example "Mark packed"). The values go into the app's own custom fields on that order; nothing else changes. Re-read the blocks after a save.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation SubmitAppBlockForm($input: SubmitAppBlockFormInput!) {
submitAppBlockForm(input: $input) {
saved
savedAt
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SubmitAppBlockForm($input: SubmitAppBlockFormInput!) {\n submitAppBlockForm(input: $input) {\n saved\n savedAt\n }\n}",
"variables": {
"input": {
"contextId": "id",
"extensionHandle": "string",
"formKey": "string",
"idempotencyKey": "string",
"installationId": "id",
"target": "string",
"values": [
{
"key": "string",
"value": "string"
}
]
}
}
}
EOF
Variables:
{
"input": {
"contextId": "id",
"extensionHandle": "string",
"formKey": "string",
"idempotencyKey": "string",
"installationId": "id",
"target": "string",
"values": [
{
"key": "string",
"value": "string"
}
]
}
}
Response:
{
"data": {
"submitAppBlockForm": {
"saved": true,
"savedAt": "string"
}
}
}
submitAppBlockForm(
input: SubmitAppBlockFormInput!
): AppBlockFormResult!
Arguments
submitAppBlockForm.input ● SubmitAppBlockFormInput! non-null input
Which form, on which record, and the values.
Type
AppBlockFormResult object
The outcome of saving an app block's form.