App Sync is an API endpoint that allows you to push the status of the data in your App back to the object in Commerce7. You can post as many syncs as you want per object.

App Sync data is public but only writable by your appId.

Create App sync

POST: /app-sync

ENUMS
objectType:
['Order', 'Customer', 'Customer Address', 'Club Membership', 'Product', 'Reservation']
status:
['Error', 'Success']

{
"objectType": "Order",
"objectId": "",
"status": "Error",
"issues": ["Issue 1", "Issue 2"],
"actions": [{
 "httpType": "Get",
 "url": "https://",
 "label": "Resolve"
}]
}

List App syncs

Get: /app-syncs/:objectId

{
"appSyncs": [{
"id": "07e8d129-e6ff-4df8-bca4-c4c84a3ecef4",
"appId": "acme-order-fulfillment",
"objectType": "Order",
"objectId": "9b6e6e43-d163-4cbe-8e66-8e0783332f8e",
"status": "Error",
"lastActivityDate": "2020-02-07T17:11:21.400Z",
"createdAt": "2020-02-05T23:48:00.469Z",
"updatedAt": "2020-02-07T17:11:21.408Z",
"actions": [{
 "id": "a7193b6b-9678-4641-bbd3-622845af2ebe",
 "httpType": "Get",
 "url": "https://api.acmefulfillment.com/orders",
 "label": "Resolve"
}],
"attempts": [{
 "id": "8293ae6c-2428-44c5-98c2-de9a8a296d3d",
 "status": "Error",
 "activityDate": "2020-02-07T17:11:21.400Z",
 "issues": [{
  "id": "d8d2175a-ffc6-4a07-bfef-9eecc28fcf61",
  "appSyncAttemptId": "8294be6b-2428-44c5-98c2-de9a8a296d3d",
  "issue": "{\"error\":\"Weather Hold. Order could not be shipped.\"}"
 }]
}, {
 "id": "c8401b46-9685-4fb9-b845-e2c5368edeb9",
 "status": "Error",
 "activityDate": "2020-02-08T02:04:57.564Z",
 "issues": [{
  "id": "609c35b1-c992-44f7-b31a-504b090fc5bd",
  "appSyncAttemptId": "c8401a46-9685-4fb9-b845-e2c5368edeb9",
  "issue": "{\"error\":\"Weather Hold. Order could not be shipped.\"}"
 }]
}]
}],
"total": 1
}

Display in Commerce7 List View and Detail View