GET COUNTER
Last updated: 04-Dec-2024
This command retrieves the last counter used for a given MAC label.
Device UI Required: No
Request Packet
Field | Rule | Type | Min | Max | Value | Comments |
---|---|---|---|---|---|---|
FUNCTION_TYPE | Required | Static Value |
|
|
ADMIN | Type of function |
COMMAND | Required | Static Value |
|
|
GET_COUNTER | Command name |
POS_RECON | Optional | Character | 1 | 30 | Ex: RetailPOS1 | POS reconciliation. NOTE: POS Reconciliation field to be echoed back in response to POS. |
MAC_LABEL | Required | Character | 1 | 50 | Ex: REG1 | Retrieve last counter used for this MAC label. NOTE: Do NOT send COUNTER with the GET_COUNTER request. |
Example
Following is an example of request packet
<TRANSACTION>
<FUNCTION_TYPE>ADMIN</FUNCTION_TYPE>
<COMMAND>GET_COUNTER</COMMAND>
<MAC_LABEL>REG1</MAC_LABEL>
</TRANSACTION>
Response Packet
Field | Type | Value | Comments |
---|---|---|---|
RESPONSE_TEXT | Character | Ex: Operation Successful | Processor response text |
RESULT | Character | Ex: OK | This indicates the Result details. |
RESULT_CODE | Numeric | -1 59002 59005 59040 59045 |
This indicates the result code. NOTE: Refer to Result/Error Codes section. |
TERMINATION_STATUS | Character | SUCCESS or FAILURE |
This indicates the transaction termination status. This is the overall status of the transaction irrespective of approved or declined. Like, if the output is generated then the status is SUCCESS and if no output is generated then the status will be FAILURE. |
TIME | Character | Ex: 20160521122005 | Current time in YYYYMMDDhhmmss format. SCA is required to query and return the current date/time after it is set. |
POS_RECON | Character | Ex: RetailPOS1 | POS reconciliation field echoed back if sent in request. |
COUNTER | Numeric | Ex: 1 | Returns the Last counter used for the given MAC label. |
Example
<RESPONSE>
<RESPONSE_TEXT>Operation Successful</RESPONSE_TEXT>
<RESULT>OK</RESULT>
<RESULT_CODE>-1</RESULT_CODE>
<TERMINATION_STATUS>SUCCESS</TERMINATION_STATUS>
<COUNTER>1</COUNTER>
</RESPONSE>
Note
The COUNTER resets to 0 with each REGISTER command.
Rate this article: