📘 2025 Report:Mexico Economic Review 2025 — outlook, charts, and sector signalsRead

    API Integration Tutorials

    Five steps verified against the official docs: credentials, first call, SAT onboarding with CIEC, polling, and webhooks.

    Developer resources

    Five resources, five purposes. Pick the one that matches where you are in your integration.

    Step-by-Step Guides

    1. Get Your Credentials (apiId + apiKey)

    Register with CRiskCo to receive your apiId and apiKey by email. Both travel as headers on every request — there is no OAuth flow or Bearer token. Test-mode keys return sandbox data at no cost.

    # Required headers on every API call
    apiId: YOUR_API_ID
    apiKey: YOUR_API_KEY
    Content-Type: application/json

    2. Your First Authenticated Call

    Verify your credentials work by calling GET /get-applicants. The base URL for all calls is https://service.criskco.com/apiservice.svc.

    curl -G "https://service.criskco.com/apiservice.svc/get-applicants" \
      -H "apiId: YOUR_API_ID" \
      -H "apiKey: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    3. Onboard an Applicant with CIEC

    SAT onboarding uses the taxpayer's CIEC password (CRiskCo does not require e.firma). Send the RFC and CIEC to the OnboardingSatIntegration endpoint.

    POST https://service.criskco.com/apiservice.svc/OnboardingSatIntegration
    Headers: apiId, apiKey, Content-Type: application/json
    
    {
      "IsAgreeTerms": true,
      "DateAgreeTerms": "2026-04-16",
      "VersionAgreeTerms": "1",
      "Email": "contact@empresa.com",
      "User": "GAPXXXXXXXXX",
      "Password": "CIEC_PASSWORD",
      "RefApplicantId": "loan-app-00482"
    }

    4. Poll the Onboarding Status

    After onboarding, poll GET /get-applicants every 5–10 seconds until onboardingStatus is 'Available'. Possible values: NotConnected, Processing, Available.

    curl -G "https://service.criskco.com/apiservice.svc/get-applicants" \
      -H "apiId: YOUR_API_ID" \
      -H "apiKey: YOUR_API_KEY" \
      --data-urlencode "taxId=GAPXXXXXXXXX" \
      --data-urlencode "onboardingStatus=true"
    
    # Response includes onboardingStatus: NotConnected | Processing | Available

    5. Subscribe to Webhooks

    Register a CallbackUrl with POST /Subscriptions. CRiskCo will first send a GET validation request to your URL — your server must respond HTTP 200 within 2 seconds. Then you'll receive events with FileType: 'JSON' (inline payload in APIResponse) or 'JSON_LINK' (download URL in DownloadUrlList).

    # 1) Register the webhook
    POST https://service.criskco.com/apiservice.svc/Subscriptions
    Headers: apiId, apiKey, Content-Type: application/json
    { "CallbackUrl": "https://yourdomain.com/webhooks/criskco" }
    
    # 2) Sample event payload your endpoint will receive
    {
      "SubscriptionId": 1,
      "ReferrerId": "your_referrer_id",
      "WebhookUrl": "https://yourdomain.com/webhooks/criskco",
      "ApiServiceName": "GetApplicants",
      "FileType": "JSON",
      "DownloadUrlList": null,
      "applicantId": "1000143693",
      "refApplicantId": "loan-app-00482",
      "APIResponse": "{ \"onboardingStatus\": \"Available\", ... }"
    }

    Ready to integrate?

    Register for your apiId/apiKey and start consuming SAT data in minutes.

    Explore More