GET
/
operations
/
connection_health
/
{merchant_id}
curl --request GET \
  --url https://sandbox-api.violet.io/v1/operations/connection_health/{merchant_id}
{
  "merchant_id": 123,
  "merchant_name": "<string>",
  "merchant_email": "<string>",
  "merchant_status": "INACTIVE",
  "platform": "OTHER",
  "store_url": "<string>",
  "distribution_type": "PUBLIC",
  "connection": {
    "status": "COMPLETE",
    "error": {
      "message": "<string>",
      "error": "<string>",
      "code": 123,
      "data": {
        "skus": [
          {
            "message": "<string>",
            "name": "<string>",
            "skuId": 123,
            "orderSkuId": 123,
            "bagId": 123
          }
        ]
      },
      "id": {},
      "ids": [
        {}
      ]
    },
    "results": {
      "isConnected": true,
      "hasActivePlatformPlan": true,
      "hasShippingMethods": true,
      "storeScopes": {
        "hasValidScopes": true,
        "requiredScopes": [
          "<string>"
        ],
        "missingScopes": [
          "<string>"
        ]
      },
      "connected": true
    }
  },
  "scope_validation": {
    "status": "COMPLETE",
    "error": {
      "message": "<string>",
      "error": "<string>",
      "code": 123,
      "data": {
        "skus": [
          {
            "message": "<string>",
            "name": "<string>",
            "skuId": 123,
            "orderSkuId": 123,
            "bagId": 123
          }
        ]
      },
      "id": {},
      "ids": [
        {}
      ]
    },
    "results": {
      "valid": true,
      "missing_scopes": [
        "<string>"
      ]
    }
  },
  "sync_status": {
    "status": "COMPLETE",
    "error": {
      "message": "<string>",
      "error": "<string>",
      "code": 123,
      "data": {
        "skus": [
          {
            "message": "<string>",
            "name": "<string>",
            "skuId": 123,
            "orderSkuId": 123,
            "bagId": 123
          }
        ]
      },
      "id": {},
      "ids": [
        {}
      ]
    },
    "results": {
      "id": 123,
      "merchant_id": 123,
      "status": "NOT_STARTED",
      "abort": true,
      "total_products": 123,
      "total_products_synced": 123,
      "resync_required": true,
      "date_last_synced": "2023-11-07T05:31:56Z",
      "taxonomy_synced": true,
      "webhooks_created": true,
      "date_shipping_last_synced": "2023-11-07T05:31:56Z",
      "app_id": 123
    }
  },
  "invalid_products": {
    "status": "COMPLETE",
    "error": {
      "message": "<string>",
      "error": "<string>",
      "code": 123,
      "data": {
        "skus": [
          {
            "message": "<string>",
            "name": "<string>",
            "skuId": 123,
            "orderSkuId": 123,
            "bagId": 123
          }
        ]
      },
      "id": {},
      "ids": [
        {}
      ]
    },
    "results": {
      "count": 123,
      "invalid_product": {
        "id": 123,
        "external_id": "<string>",
        "name": "<string>",
        "thumbnail_url": "<string>",
        "merchant_id": 123,
        "issues": "<string>",
        "status": "UNRESOLVED",
        "date_created": "2023-11-07T05:31:56Z",
        "date_last_modified": "2023-11-07T05:31:56Z"
      }
    }
  },
  "offers_published": {
    "status": "COMPLETE",
    "error": {
      "message": "<string>",
      "error": "<string>",
      "code": 123,
      "data": {
        "skus": [
          {
            "message": "<string>",
            "name": "<string>",
            "skuId": 123,
            "orderSkuId": 123,
            "bagId": 123
          }
        ]
      },
      "id": {},
      "ids": [
        {}
      ]
    },
    "results": {
      "sync_complete": true,
      "count": 123
    }
  },
  "payout_account": {
    "status": "COMPLETE",
    "error": {
      "message": "<string>",
      "error": "<string>",
      "code": 123,
      "data": {
        "skus": [
          {
            "message": "<string>",
            "name": "<string>",
            "skuId": 123,
            "orderSkuId": 123,
            "bagId": 123
          }
        ]
      },
      "id": {},
      "ids": [
        {}
      ]
    },
    "results": {
      "id": 123,
      "account_type": "MERCHANT",
      "account_id": 123,
      "merchant_id": 123,
      "app_id": 123,
      "is_active": true,
      "country_code": "<string>",
      "payment_provider": "STRIPE",
      "payment_provider_account_id": "<string>",
      "payment_provider_account_type": "EXPRESS",
      "payment_provider_metadata": {},
      "payment_provider_account": {},
      "date_deactivated": "2023-11-07T05:31:56Z",
      "errors": [
        {
          "id": 123,
          "error_code": 123,
          "error_message": "<string>",
          "resolved": true,
          "date_resolved": "2023-11-07T05:31:56Z",
          "date_created": "2023-11-07T05:31:56Z",
          "payout_account_id": 123
        }
      ],
      "date_created": "2023-11-07T05:31:56Z",
      "date_last_modified": "2023-11-07T05:31:56Z"
    }
  },
  "migration": {
    "status": "COMPLETE",
    "error": {
      "message": "<string>",
      "error": "<string>",
      "code": 123,
      "data": {
        "skus": [
          {
            "message": "<string>",
            "name": "<string>",
            "skuId": 123,
            "orderSkuId": 123,
            "bagId": 123
          }
        ]
      },
      "id": {},
      "ids": [
        {}
      ]
    },
    "results": "MIGRATION_REQUIRED"
  },
  "commission_rate": {
    "status": "COMPLETE",
    "error": {
      "message": "<string>",
      "error": "<string>",
      "code": 123,
      "data": {
        "skus": [
          {
            "message": "<string>",
            "name": "<string>",
            "skuId": 123,
            "orderSkuId": 123,
            "bagId": 123
          }
        ]
      },
      "id": {},
      "ids": [
        {}
      ]
    },
    "default_rate": 123,
    "overrides": [
      {
        "status": "COMPLETE",
        "error": {
          "message": "<string>",
          "error": "<string>",
          "code": 123,
          "data": {
            "skus": [
              {
                "message": "<string>",
                "name": "<string>",
                "skuId": 123,
                "orderSkuId": 123,
                "bagId": 123
              }
            ]
          },
          "id": {},
          "ids": [
            {}
          ]
        },
        "app_id": 123,
        "rate": 123,
        "commission_locked": true
      }
    ]
  }
}

Retrieve the connection health for a specific Merchant given their merchant_id. You can use this endpoint to understand whether or not merchants are ready for transactions through your app.

This endpoint cached once every 24 hours. The data you see may be stale, although if you refresh a specific merchant, those updates will be reflected here. We highly recommend subscribing to our Webhooks to get accurate information about when a merchant needs attention.

Headers

X-Violet-Token
string
X-Violet-App-Secret
string
X-Violet-App-Id
integer

Path Parameters

merchant_id
integer
required

Query Parameters

app_id
integer
refresh
boolean
default:false

Will refresh and re-calculate the merchant's connection health. This is a heavy operation and should not be done programmatically. Only pass this param when you have reason to believe something has changed the merchant's status. We recommend using our webhooks to be notified when a merchant has become unhealthy or has completed onboarding.

Response

default - application/json
default response

The container for all status objects comprising merchant connection health