Skip to main content

Application data

Upload task application data#

Uploads a per-store list of items for a nested survey: a SURVEY task whose form is filled in differently for every store, based on data you upload ahead of time โ€” instead of every executor answering the same fixed list of questions. See the Tasks with nested surveys guide for the full flow.
  • Both applicationId and the catalog attribute ids are specific to your tenant and are provided by Qvalon when your integration is set up.
  • templateId must be one of the form templates configured for the given applicationId โ€” use exactly the applicationId/templateId pair Qvalon gave you for this integration, not an id you find elsewhere in the admin UI, since it may not be registered for this application.
  • Each shopSap must match an active store.

Request body:

AttributeTypeDescriptionNullable
applicationIdIntegerIdentifier of the application (survey configuration) provided by Qvalon during integration setupfalse
formsList objectsThe data to upload, grouped by target form template. Each entry has:
templateId โ€” identifier of the form template; must be one of the templates configured for the given applicationId
source โ€” the items to check, one entry per store and item, each with:
  • shopSap โ€” shop code (SAP) the item belongs to; must match an active store
  • catalogValue.name โ€” name of the item (e.g. product name)
  • catalogValue.attributes โ€” optional additional identifying attributes for the item (e.g. barcode, internal SKU), each an {id, value} pair where id is a tenant-specific catalog attribute identifier provided by Qvalon
  • labels โ€” optional arbitrary key-value labels attached to the item
false

Response

Returns the identifier of the uploaded data file and the store codes referenced in it

Examples

curl --request POST https://api.qvalon.com/v1/applications/tasks/data \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
-d '{"applicationId":1,"forms":[{"templateId":"3e3f52b1-f92f-4cc9-a0a5-a3ee96d703c5","source":[{"shopSap":"001","catalogValue":{"name":"Chocolate bar","attributes":[{"id":12,"value":"1234567890"},{"id":13,"value":"557788"}]}},{"shopSap":"001","catalogValue":{"name":"Sparkling water 0.5L","attributes":[{"id":12,"value":"1234567894"},{"id":13,"value":"557766"}]}}]}]}'
200 OK
{
"fileUid": "c137c8fd-ea86-402c-b5c4-14d3d60dc5c0",
"shopSap": [
"001"
]
}

Possible errors#

StatusMessageCause
400 Bad RequestapplicationId must be not nullapplicationId was omitted
400 Bad RequestNot found application infoapplicationId doesn't exist for your tenant
400 Bad RequestWrong templateId <id>, this id not in applicationtemplateId isn't registered under the given applicationId
400 Bad RequestShop not found by sap <sap>shopSap doesn't match any active store