curl --request PUT \
--url https://apiweb.mile.app/api/v3/integration/accurate/rules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"direction": "push",
"module": "delivery-order",
"flowId": "625678f90fc8ba02bb5eb432",
"flowName": "Delivery",
"businessDataId": "123456",
"action": "create",
"event": "onTaskFinished",
"fieldMappings": [
{
"accurateField": "customerNo",
"source": {
"type": "string",
"value": "input1",
"dataType": "string"
}
}
],
"lineItems": {
"billComponentId": "bill1"
}
}
'import requests
url = "https://apiweb.mile.app/api/v3/integration/accurate/rules/{id}"
payload = {
"direction": "push",
"module": "delivery-order",
"flowId": "625678f90fc8ba02bb5eb432",
"flowName": "Delivery",
"businessDataId": "123456",
"action": "create",
"event": "onTaskFinished",
"fieldMappings": [
{
"accurateField": "customerNo",
"source": {
"type": "string",
"value": "input1",
"dataType": "string"
}
}
],
"lineItems": { "billComponentId": "bill1" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
direction: 'push',
module: 'delivery-order',
flowId: '625678f90fc8ba02bb5eb432',
flowName: 'Delivery',
businessDataId: '123456',
action: 'create',
event: 'onTaskFinished',
fieldMappings: [
{
accurateField: 'customerNo',
source: {type: 'string', value: 'input1', dataType: 'string'}
}
],
lineItems: {billComponentId: 'bill1'}
})
};
fetch('https://apiweb.mile.app/api/v3/integration/accurate/rules/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/integration/accurate/rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'direction' => 'push',
'module' => 'delivery-order',
'flowId' => '625678f90fc8ba02bb5eb432',
'flowName' => 'Delivery',
'businessDataId' => '123456',
'action' => 'create',
'event' => 'onTaskFinished',
'fieldMappings' => [
[
'accurateField' => 'customerNo',
'source' => [
'type' => 'string',
'value' => 'input1',
'dataType' => 'string'
]
]
],
'lineItems' => [
'billComponentId' => 'bill1'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/integration/accurate/rules/{id}"
payload := strings.NewReader("{\n \"direction\": \"push\",\n \"module\": \"delivery-order\",\n \"flowId\": \"625678f90fc8ba02bb5eb432\",\n \"flowName\": \"Delivery\",\n \"businessDataId\": \"123456\",\n \"action\": \"create\",\n \"event\": \"onTaskFinished\",\n \"fieldMappings\": [\n {\n \"accurateField\": \"customerNo\",\n \"source\": {\n \"type\": \"string\",\n \"value\": \"input1\",\n \"dataType\": \"string\"\n }\n }\n ],\n \"lineItems\": {\n \"billComponentId\": \"bill1\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://apiweb.mile.app/api/v3/integration/accurate/rules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"direction\": \"push\",\n \"module\": \"delivery-order\",\n \"flowId\": \"625678f90fc8ba02bb5eb432\",\n \"flowName\": \"Delivery\",\n \"businessDataId\": \"123456\",\n \"action\": \"create\",\n \"event\": \"onTaskFinished\",\n \"fieldMappings\": [\n {\n \"accurateField\": \"customerNo\",\n \"source\": {\n \"type\": \"string\",\n \"value\": \"input1\",\n \"dataType\": \"string\"\n }\n }\n ],\n \"lineItems\": {\n \"billComponentId\": \"bill1\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/integration/accurate/rules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"direction\": \"push\",\n \"module\": \"delivery-order\",\n \"flowId\": \"625678f90fc8ba02bb5eb432\",\n \"flowName\": \"Delivery\",\n \"businessDataId\": \"123456\",\n \"action\": \"create\",\n \"event\": \"onTaskFinished\",\n \"fieldMappings\": [\n {\n \"accurateField\": \"customerNo\",\n \"source\": {\n \"type\": \"string\",\n \"value\": \"input1\",\n \"dataType\": \"string\"\n }\n }\n ],\n \"lineItems\": {\n \"billComponentId\": \"bill1\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"data": {
"id": "9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c2d",
"module": "sales-order",
"flowId": "625678f90fc8ba02bb5eb432",
"flowName": "Delivery",
"targetHubId": "64d9932e2beb9037735ff022",
"businessDataId": "123456",
"headerMappings": [
{
"accurateField": "customer.name",
"target": {
"type": "string",
"value": "input1",
"dataType": "string"
}
}
],
"lineItems": {
"targetListId": "bill1",
"rowMappings": [
{
"accurateField": "item.name",
"rowField": "name",
"dataType": "string"
},
{
"accurateField": "quantity",
"rowField": "qty",
"dataType": "number"
}
]
},
"autoCreateRemainderTask": false,
"setupBy": "[email protected]",
"enabledAt": "2026-10-16T03:00:00+00:00",
"enabled": true
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Update Accurate sync rule
Accurate (Accurate Online accounting) integration. Changes a sync rule. The direction comes from the stored rule; send only the fields to change. The same checks as create apply to the resulting rule. Editing a push rule rebuilds its automation.
Requires permission edit/appIntegration.
curl --request PUT \
--url https://apiweb.mile.app/api/v3/integration/accurate/rules/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"direction": "push",
"module": "delivery-order",
"flowId": "625678f90fc8ba02bb5eb432",
"flowName": "Delivery",
"businessDataId": "123456",
"action": "create",
"event": "onTaskFinished",
"fieldMappings": [
{
"accurateField": "customerNo",
"source": {
"type": "string",
"value": "input1",
"dataType": "string"
}
}
],
"lineItems": {
"billComponentId": "bill1"
}
}
'import requests
url = "https://apiweb.mile.app/api/v3/integration/accurate/rules/{id}"
payload = {
"direction": "push",
"module": "delivery-order",
"flowId": "625678f90fc8ba02bb5eb432",
"flowName": "Delivery",
"businessDataId": "123456",
"action": "create",
"event": "onTaskFinished",
"fieldMappings": [
{
"accurateField": "customerNo",
"source": {
"type": "string",
"value": "input1",
"dataType": "string"
}
}
],
"lineItems": { "billComponentId": "bill1" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
direction: 'push',
module: 'delivery-order',
flowId: '625678f90fc8ba02bb5eb432',
flowName: 'Delivery',
businessDataId: '123456',
action: 'create',
event: 'onTaskFinished',
fieldMappings: [
{
accurateField: 'customerNo',
source: {type: 'string', value: 'input1', dataType: 'string'}
}
],
lineItems: {billComponentId: 'bill1'}
})
};
fetch('https://apiweb.mile.app/api/v3/integration/accurate/rules/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/integration/accurate/rules/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'direction' => 'push',
'module' => 'delivery-order',
'flowId' => '625678f90fc8ba02bb5eb432',
'flowName' => 'Delivery',
'businessDataId' => '123456',
'action' => 'create',
'event' => 'onTaskFinished',
'fieldMappings' => [
[
'accurateField' => 'customerNo',
'source' => [
'type' => 'string',
'value' => 'input1',
'dataType' => 'string'
]
]
],
'lineItems' => [
'billComponentId' => 'bill1'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/integration/accurate/rules/{id}"
payload := strings.NewReader("{\n \"direction\": \"push\",\n \"module\": \"delivery-order\",\n \"flowId\": \"625678f90fc8ba02bb5eb432\",\n \"flowName\": \"Delivery\",\n \"businessDataId\": \"123456\",\n \"action\": \"create\",\n \"event\": \"onTaskFinished\",\n \"fieldMappings\": [\n {\n \"accurateField\": \"customerNo\",\n \"source\": {\n \"type\": \"string\",\n \"value\": \"input1\",\n \"dataType\": \"string\"\n }\n }\n ],\n \"lineItems\": {\n \"billComponentId\": \"bill1\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://apiweb.mile.app/api/v3/integration/accurate/rules/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"direction\": \"push\",\n \"module\": \"delivery-order\",\n \"flowId\": \"625678f90fc8ba02bb5eb432\",\n \"flowName\": \"Delivery\",\n \"businessDataId\": \"123456\",\n \"action\": \"create\",\n \"event\": \"onTaskFinished\",\n \"fieldMappings\": [\n {\n \"accurateField\": \"customerNo\",\n \"source\": {\n \"type\": \"string\",\n \"value\": \"input1\",\n \"dataType\": \"string\"\n }\n }\n ],\n \"lineItems\": {\n \"billComponentId\": \"bill1\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/integration/accurate/rules/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"direction\": \"push\",\n \"module\": \"delivery-order\",\n \"flowId\": \"625678f90fc8ba02bb5eb432\",\n \"flowName\": \"Delivery\",\n \"businessDataId\": \"123456\",\n \"action\": \"create\",\n \"event\": \"onTaskFinished\",\n \"fieldMappings\": [\n {\n \"accurateField\": \"customerNo\",\n \"source\": {\n \"type\": \"string\",\n \"value\": \"input1\",\n \"dataType\": \"string\"\n }\n }\n ],\n \"lineItems\": {\n \"billComponentId\": \"bill1\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"data": {
"id": "9a0b1c2d-3e4f-4a5b-8c6d-7e8f9a0b1c2d",
"module": "sales-order",
"flowId": "625678f90fc8ba02bb5eb432",
"flowName": "Delivery",
"targetHubId": "64d9932e2beb9037735ff022",
"businessDataId": "123456",
"headerMappings": [
{
"accurateField": "customer.name",
"target": {
"type": "string",
"value": "input1",
"dataType": "string"
}
}
],
"lineItems": {
"targetListId": "bill1",
"rowMappings": [
{
"accurateField": "item.name",
"rowField": "name",
"dataType": "string"
},
{
"accurateField": "quantity",
"rowField": "qty",
"dataType": "number"
}
]
},
"autoCreateRemainderTask": false,
"setupBy": "[email protected]",
"enabledAt": "2026-10-16T03:00:00+00:00",
"enabled": true
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Authorizations
Use a valid Bearer token to authenticate.
Path Parameters
Sync rule ID (a UUID), from GET /integration/accurate/rules.
Example: 3f6c2a1e-8b4d-4e0f-9a51-2c7d8e9f0a12
Body
Create only. Kind of rule.
push, import Accurate module slug.
Example: delivery-order
MileApp flow ID.
Example: 625678f90fc8ba02bb5eb432
Flow name, for display.
Example: Delivery
Accurate business data (company) ID.
Example: 123456
Push only. Task event that triggers the push.
Default: onTaskFinished
Push only. create makes a new document; update edits the document the task came from.
Default: create
create, update Push only. [{accurateField, source: {type: flow|task|constant|salesOrder, value, dataType}}].
Push only. Bill component ID (same as lineItems.billComponentId).
Import only. Hub of the created tasks.
Example: 64d9932e2beb9037735ff022
Import only. [{accurateField, target: {type: flow, value, dataType}}].
Line items. Push: {billComponentId, rowMappings: [{accurateField, billField}]}. Import: {targetListId, rowMappings: [{accurateField, rowField, dataType}]}.
Import only.