Skip to main content

Documentation

Poll - Report Response

Check via the poll method if the terminal has responded to a report request (such as End of Day, X Report, or Transaction List).

Use this endpoint to poll for report responses (EOD, Last EOD, X Report, Transaction List).

Response Types:

  • 200 OK: Report response available.

  • 404 Not Found: Response not yet available, continue polling.

  • 408 Request Timeout: Response has timed out.

  • 429 Too Many Requests: Rate limit exceeded.

This method is rate limited to 1 request per 500ms per pollId.

Note

  • 404 does not mean failure: A 404 Not Found response means the terminal has not yet reported a result to the CloudLink API. This is normal and expected — you should continue polling. Only stop polling when you receive a 200 OK (response available) or 408 Request Timeout (response expired).

  • Polling and receiving the 200 OK response is the acknowledgment. There is no separate confirmation step (the old /poll/confirmation endpoint is deprecated). If you do not poll within the timeout window (~6 seconds of the terminal responding), the response expires and the terminal may void the transaction.

    • pollId

    • The pollId that was provided in the initial report request.

    • eventType

    • The report event type triggered by the terminal (e.g., REPORT_INFORMATION).

    • correlationId

    • The correlation ID provided in the original request.

    • reportType

    • The type of report returned. Values: EOD, LAST_EOD, X_REPORT, or TRANSACTION_LIST.

    • reportData

    • A JSON object containing the report-specific data returned by the terminal.

    • transactionList

    • An array of transaction data. (Only populated when the reportType is TRANSACTION_LIST).

    • type

    • Example: https://tools.ietf.org/html/rfc7231#section-6.5.1

    • title

    • Bad Request

    • status

    • 400

    • detail

    • Invalid pollId or malformed request

    • message

    • Unauthorized

    • Response not yet available

    • The terminal has not reported back yet. This is expected behavior. Keep polling.

    • Response TTL expired

    • The response has expired in the queue. Stop polling.

    • message

    • Too many requests

    • Message

    • Server Error

  • /poll/reportResponse/{pollId}

  • 200 OK - Report Response Available

  • curl -X get https://CloudLinkApi/poll/reportResponse/e02f7fbe-f3a2-49fb-9979-2f240e119499 \
    -H 'X-API-KEY: your-access-key-here'
  • {
      "eventType": "REPORT_INFORMATION",
      "correlationId": "5d1d4ea-8229-44d7-b517-26a5ae6c2fda",
      "reportType": "EOD",
      "reportData": {
        "totalSales": "15000",
        "totalRefunds": "0",
        "netTotal": "15000"
      },
      "transactionList": []
    }
  • 400 Bad Request

  • curl -X get https://CloudLinkApi/poll/reportResponse/e02f7fbe-f3a2-49fb-9979-2f240e119499 \
    -H 'X-API-KEY: your-access-key-here'
  • {
      "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
      "title": "Bad Request",
      "status": 400,
      "detail": "Invalid pollId"
    }
  • 401 Unauthorized

  • curl -X get https://CloudLinkApi/poll/reportResponse/e02f7fbe-f3a2-49fb-9979-2f240e119499 \
    -H 'X-API-KEY: your-access-key-here'
  • {
      "message": "Unauthorized"
    }
  • 404 Not Found - Keep Polling

  • This response returns an empty body. The 404 status code indicates the terminal response is pending.

  • curl -X get https://CloudLinkApi/poll/reportResponse/e02f7fbe-f3a2-49fb-9979-2f240e119499 \
    -H 'X-API-KEY: your-access-key-here'
  • 408 Request Timeout - TTL Expired

  • This response returns an empty body. The 408 status code indicates the response queue has expired.

  • curl -X get https://CloudLinkApi/poll/reportResponse/e02f7fbe-f3a2-49fb-9979-2f240e119499 \
    -H 'X-API-KEY: your-access-key-here'
  • 429 Too Many Requests

  • curl -X get https://CloudLinkApi/poll/reportResponse/e02f7fbe-f3a2-49fb-9979-2f240e119499 \
    -H 'X-API-KEY: your-access-key-here'
  • {
      "message": "Too Many Requests"
    }
  • 500 Server Error

  • curl -X get https://CloudLinkApi/poll/reportResponse/e02f7fbe-f3a2-49fb-9979-2f240e119499 \
    -H 'X-API-KEY: your-access-key-here'
  • {
      "message": "Server Error"
    }