Mock data lets you simulate export output or import response data while configuring a flow, instead of running the actual export or waiting for a webhook listener to receive live data. Mock data must be in integrator.io's canonical JSON format — this article is the reference for those formats. For entering mock data in a flow step, see Provide mock data for testing flows. For using mock data in a full test run, see Run a flow in test mode.
Webhook listeners always use the canonical format for record data.
Canonical format for record data
{
"page_of_records": [
{
"record": {
"id": "12345",
"name": "Mary Poppins",
"type": "customer",
"address": {
"street": "17 Cherry Tree Lane",
"City": "London"
}
}
},
{
"record": {
"id": "98765",
"name": "Sherlock Holmes",
"type": "customer",
"address": {
"street": "221B Baker Street",
"City": "London"
}
}
}
]
}Canonical format for rows data
{
"page_of_records": [{
"rows": [
{
"id": "12345",
"name": "Mary Poppins",
"type": "customer",
"address": {
"street": "17 Cherry Tree Lane",
"City": "London"
}
},
{
"id": "98765",
"name": "Sherlock Holmes",
"type": "customer",
"address": {
"street": "221B Baker Street",
"City": "London"
}
}
]
}]
}Canonical format for mock response data
[
{
"id": "1234567890",
"errors": [],
"_json": {
"mockResponse": "replace me"
},
"statusCode": 200,
"ignored": false,
"dataURI": "",
"_headers": {
"content-type": "application/json; charset=utf-8"
}
}
]Mock response data fields
| Field | Description |
|---|---|
| statusCode | The HTTP status code indicating whether the import request succeeded. Use 200 for success and 422 for failure. Required. |
| id | The record's unique identifier. Optional. |
| errors | An array of error objects, each with a code, message, and source: [{code: <error_code>, message: <error_message>, source: <error_source>}]. Optional. |
| _json | The full HTTP response the endpoint returned. Optional. |
| dataURI | The HTTP URL to the processed data in the export application. Optional. |
| _headers | The HTTP headers returned by a live call to the endpoint. Optional. |
Canonical format for sample headers and parameters
[
{
"name": "",
"value": ""
}
]Canonical format for NetSuite
{
"id": 478945,
"statusCode": 200,
"_json": {
"id": 478945
},
"ignored": false,
"errors": [],
"dataURI": ""
}Canonical format for Salesforce Composite
{
"statusCode": 200,
"id": "0010o000037gWjsAAE",
"_json": [
{
"body": [
{
"id": "0010o000037gWjsAAE",
"success": true,
"errors": []
}
],
"httpHeaders": {},
"httpStatusCode": 200,
"referenceId": "refAccount"
}
],
"errors": []
}Canonical format for Salesforce REST
{
"statusCode": 200,
"id": "0010o000037gWmyAAE",
"_json": {
"id": "0010o000037gWmyAAE",
"success": true,
"errors": []
},
"_headers": {
"date": "Fri, 25 Aug 2023 11:50:41 GMT",
"sforce-limit-info": "api-usage=10/15000"
},
"errors": []
}Canonical format for Salesforce SOAP
{
"statusCode": 200,
"id": "0010o000037gWmtAAE",
"_json": {
"id": "0010o000037gWmtAAE",
"success": true
},
"errors": []
}Canonical format for API requests
{
"pathParams": {
"storeId": "samplestoreId"
},
"queryParams": {
"petType": "sample petType"
},
"headers": {
"customHeader": "sample customHeader"
},
"body": {
"pets": [
{
"id": 1,
"name": "sample name",
"type": "sample type",
"age": 1,
"status": "sample status"
}
]
}
}