Queries
Query by Transaction
This functionality is intended to return transaction data from its key.
The key consists of the fields:
- CodSit
- transaction date
- NSU SiTef
- Cstore code SiTef
- Customer code (only on the platform SiTef GW/Express)
This key must be sent as a parameter in the request URL(QueryString).
Optionally, you can enter the field (invoice) and, in this case, it is not necessary to include the NSU SiTef of the
transaction. It should be noted, however, that as the field (invoice) is not a transaction search key, more of a transaction can be returned in that case.
Another option is to replace the SiTef Store Code filter with Sub-Acquirer Store Code (codlojatronco).
Call details
-
Method:
GET -
URL:
Basic URL + transacoes/busca?codsit=000&datatrn=aaaammdd&nsusitef=00000000&codlojasitef=00000000 -
Resposta: List of Transactions (see List of Transactions)
-
Description of URL parameters:
| Field | Description | Type | Size | Format | Required |
|---|---|---|---|---|---|
| codsit | SiTef Network Code | Numeric | 1-4 | - | Yes |
| datatrn | Transaction date | Numeric | 8 | YYYYMMDD | Yes |
| nsusitef | Transaction NSU SiTef | Numeric | 6 | - | No* |
| codlojasitef | Transaction SiTef Store Code | Alphanumeric | 8 | - | No** |
| cupomfiscal | Invoice associated with the transaction | Text | 1-20 | - | Not* |
| codlojatronco | Csub-acquirer store code | Alphanumeric | 8 | - | No** |
| codigo_cliente | Customer code | Numeric | 1-19 | - | Yes*** |
* It is necessary to inform nsusitef or invoice
** It is necessary to inform codlojasitef or codlojatronco
*** codigo_cliente is required when used on SiTef GW/Express platform. Not used on SiTef-Conciliation customers.
Query for pending Transaction
This functionality is intended to return all transactions pending in the period indicated in the URL of
request (QueryString).
If the dateto parameter contains the current day, transactions made in the last few days will not be included in the response.
two hours (based on the current time in the database).
In SiTef GW/Express platform queries, it is possible to filter transactions by a specific customer,
sending the customer code parameter.
The key consists of the fields:
- Initial date
- Final date
- Start time
- End time
- Customer Code (only on SiTef GW/Express platform)
Call Details
- Method:
GET - URL:
Basic URL + transacoes/pendencias?datefrom=aaaammdd&dateto=aaaammdd - Response: Lista de Transações (vide Lista de Transações)
- Description of URL parameters:
| Field | Description | Type | Size | Format | Required |
|---|---|---|---|---|---|
| datefrom | Search Period Start Date | Numeric | 8 | YYYYMMDD | Yes |
| dateto | Search Period End Date | Numeric | 8 | YYYYMMDD | Yes |
| horainicial | Search start time | Numeric | 6 | HHMMSS | No |
| horafinal | Search end time | Numeric | 6 | HHMMSS | No |
| codigo_cliente | Customer code | Numeric | 1-19 | - | No* |
* codigo_cliente is required when used on SiTef GW/Express platform. Not used on SiTef-Conciliation clients.
Query for Pending Transaction Confirmation
This functionality is intended to confirm a transaction in the "PENDING" status from the key of the
same.
The key consists of the fields:
- SitCod
- Transaction date
- NSU SitTef
- SiTef Store Code
- Customer Code (only on GW/Express platform)
This key must be sent as a parameter in the request URL (QueryString).
Call details
- Method:
POST - URL:
Basic URL + transacoes/pendencias/confirma?codsit=000&datatrn=aaaammdd&nsusitef=00000000&codlojasitef=00000000 - Answer:
Header Status 200 - Description of URL parameters:
| Field | Description | Type | Size | Format | Required |
|---|---|---|---|---|---|
| codsit | SiTef Network Code | Numeric | 1-4 | - | Yes |
| datatrn | Transaction date | Numeric | 8 | YYYYMMDD | Yes |
| nsusitef | Transaction NSU SiTef | Numeric | 6 | - | Yes |
| codlojasitef | CSiTef store code of the transaction | Alphanumeric | 8 | - | Yes |
| codigo_cliente | Customer code | Numeric | 1-19 | - | Yes* |
* codigo_cliente is required when used on SiTef GW/Express platform. Not used on SiTef- customers Conciliation.
Query for Pending Transaction Cancellation
This functionality is intended to cancel a transaction in the "PENDING" status from the key of the
same.
The key consists of the fields:
- SitCod
- Transaction date
- NSU SiTef
- SiTef Store Code
- Customer Code (only on SiTef GW/Express platform)
This key must be sent as a parameter in the request URL (QueryString).
Call details
- Method:
POST - URL:
Basic URL + transacoes/pendencias/cancelaa?codsit=000&datatrn=aaaammdd&nsusitef=00000000&codlojasitef=00000000 - Answer:
Header Status 200 - Description of URL parameters:
| Field | Description | Type | Size | Format | Required |
|---|---|---|---|---|---|
| codsit | SiTef Network Code | Numeric | 1-4 | - | Yes |
| datatrn | Transaction date | Numeric | 8 | YYYYMMDD | Yes |
| nsusitef | Transaction NSU SiTef | Numeric | 6 | - | Yes |
| codlojasitef | Transaction SiTef Store Code | Alphanumeric | 8 | - | Yes |
| codigo_loja | Customer code | Numeric | 1-19 | - | Yes* |
* codigo_loja is required when used on SiTef GW/Express platform. Not used on SiTef-Conciliation costumers.
Version query
This functionality is intended to obtain the version of WSConsulta being executed.
Call Details
- Method:
GET - URL:
Basic URL + versao - Answer:
{ "version":"6d37805c704f (14/08/2018 17:14)" } - Description of URL parameters: No parameters
Query by BIN Transaction
This functionality is intended to return all transactions for a specific date, cashier
and, in particular, the first six digits of the credit card (BIN).
Request details
-
Method:
GET -
URL:
Basic URL + transacoes/buscabin?datatrn=yyyymmdd&operator=xxxxx&bin=000000 -
Answer: Transaction List (see Transaction List)
-
Description of URL parameters:
| Field | Description | Type | Size | Format | Required |
|---|---|---|---|---|---|
| datatrn | Transaction date | Numeric | 8 | YYYYMMDD | Yes |
| operador | Transaction operator in front of cashier | Alphanumeric | 1-20 | - | Yes |
| bin | First six digits of the card | Numeric | 6 | - | Yes |
| codigo_cliente | Customer code | Numeric | 1-19 | - | Yes* |
* codigo_cliente is required when used on SiTef GW/Express platform. Not used on SiTef- customer
Conciliation.Observation:
O bin parameter must contain exactly 6 digits (the first 6 digits of the credit card a
search).
Query by Date
This functionality is intended to return all transactions for a specific date.
Optionally, you can filter by a specific period (based on start time and end time), or by a
terminal in specific.
In GW/Express platform queries, it is possible to filter transactions by a specific customer,
sending the client code parameter.
The key consists of the fields:
- Transaction date
- Start time
- End time
- POS number
- Customer Code (only on GW/Express platform)
Call details
- Method:
GET - URL:
Basic URL + transactions/buscadata?datatrn=aaaammdd - Answer: Transaction List (see Transaction List)
- Description of URL parameters:
| Field | Description | Type | Size | Format | Required |
|---|---|---|---|---|---|
| datatrn | Transaction date | Numeric | 8 | YYYYMMDD | Yes |
| horainicial | Search - start time | Numeric | 6 | HHMMSS | No |
| horafinal | Search - end time | Numeric | 6 | HHMMSS | No |
| numpdv | Identificação do terminal PDV | Alfanumérico | 1 -8 | - | Não |
| codigo_cliente | Customer code | Numeric | 1-19 | - | No* |
* The codigo_cliente will only be used on SiTef GW/Express platform. Not used on costumers a SiTef-Conciliation
Remark:
The parameters start-time and end-time are not mandatory, but must always be together, otherwise an error will be returned.
Remark:
In addition to the transactions carried out, the service Query transactions by date searches for transactions whose pending issues were resolved on the search date, as well as transactions that were canceled on that date.
Query by export Date
This functionality is intended to return all transactions in which there was export to the database
data from at least one of the transaction steps (3-steps of a transaction lifecycle: sending
host transaction -> pending POS confirmation -> completed (completed/canceled)).
Thus, it is possible for the same transaction to be presented on different dates, but always with
different status.
In SiTef GW/Express platform queries, it is possible to filter transactions by a specific customer,
sending the client code parameter.
Call details
-
Method:
GET -
URL:
Basic URL + transacoes/buscadataexportacao?datatrn=aaaammdd -
Resposta: List of Transactions (see List of Transactions)
-
Description of URL parameters:
| Field | Description | Type | Size | Format | Required |
|---|---|---|---|---|---|
| datatrn | Transaction date | Numeric | 8 | YYYYMMDD | Yes |
| horainicial | Search start time | Numeric | 6 | HHMMSS | No |
| horafinal | Search end time | Numeric | 6 | HHMMSS | No |
| codigo_cliente | Customer code | Numeric | 1-19 | - | No* |
* The codigo_cliente will only be used on SiTef GW/Express platform. Not used on SiTef-Conciliation customers.
Remark:
The parameters horainicial and horafinal are not mandatory, but must always be
put together, otherwise an error will be returned.
Paged Query by Transaction Date
This functionality is intended to return all transactions for a specific date.
Optionally, you can filter by a specific period (based on start time and end time), or by a
terminal in specific.
In GW/Express platform queries, it is possible to filter transactions by a specific customer,
sending the client code parameter.
The key consists of the fields:
- Transaction date
- Start time
- End time
- POS number
- Customer Code (only on GW/Express platform)
Call details
- Method:
GET - URL:
Basic URL + transacoes/buscadatatransacao-paginado?datatrn=aaaammdd - Answer: Transaction List (see Transaction List)
- Description of URL parameters:
| Field | Description | Type | Size | Format | Required |
|---|---|---|---|---|---|
| datatrn | Transaction date | Numeric | 8 | YYYYMMDD | Yes |
| horainicial | Search - start time | Numeric | 6 | HHMMSS | No |
| horafinal | Search - end time | Numeric | 6 | HHMMSS | No |
| numpdv | Identificação do terminal PDV | Alphanumeric | 1 -8 | - | Não |
| codigo_cliente | Customer code | Numeric | 1-19 | - | No* |
| codlojasitef | Store code | Alphanumeric | 1 -8 | - | Não |
| page | Page number to be searched, starting at 0 (zero) | Numeric | - | - | Sim |
| size | Maximum number of records that will be returned per page | Numeric | - | - | Sim |
| hash | Hash that will be returned in the request for the first page if the number of records in the system is greater than the amount specified in the "size" parameter. This parameter is mandatory for requesting pages greater than 0. | Alphanumeric | - | - | Yes, when the page is greater than zero |
* The codigo_cliente will only be used on SiTef GW/Express platform. Not used on costumers a SiTef-Conciliation
Remark:
The parameters horainicial and horafinal are not mandatory, but must always be together, otherwise an error will be returned.
Remark:
In addition to the transactions carried out, the service Query transactions by date searches for transactions whose pending issues were resolved on the search date, as well as transactions that were canceled on that date.
Optimized Query by Transaction Date
This functionality is intended to return all transactions for a specific date.
Optionally, you can filter by a specific period (based on start time and end time), or by a
terminal in specific.
In GW/Express platform queries, it is possible to filter transactions by a specific customer,
sending the client code parameter.
The key consists of the fields:
- Transaction date
- Start time
- End time
- POS number
- Customer Code (only on GW/Express platform)
Call details
- Method:
GET - URL:
Basic URL + transacoes/buscadatatransacao?datatrn=aaaammdd - Answer: Transaction List (see Transaction List)
- Description of URL parameters:
| Field | Description | Type | Size | Format | Required |
|---|---|---|---|---|---|
| datatrn | Transaction date | Numeric | 8 | YYYYMMDD | Yes |
| horainicial | Search - start time | Numeric | 6 | HHMMSS | No |
| horafinal | Search - end time | Numeric | 6 | HHMMSS | No |
| numpdv | Identificação do terminal PDV | Alphanumeric | 1 -8 | - | Não |
| codigo_cliente | Customer code | Numeric | 1-19 | - | No* |
| codlojasitef | Store code | Alphanumeric | 1 -8 | - | Não |
* The codigo_cliente will only be used on SiTef GW/Express platform. Not used on costumers a SiTef-Conciliation
Remark:
The parameters horainicial and horafinal are not mandatory, but must always be together, otherwise an error will be returned.
Remark:
In addition to the transactions carried out, the service Query transactions by date searches for transactions whose pending issues were resolved on the search date, as well as transactions that were canceled on that date.
Reversal Transaction query
This functionality is intended to return data from a reversal transaction and its respective
transaction reversed from the reversal keys.
The key consists of the fields:
- SitCod
- Transaction date
- NSU SiTef
- SiTef Store Code
- Customer Code (only on GW/Express platform)
This key must be sent as a parameter in the request URL (QueryString).
Call Details
- Method:
GET - URL:
Basic URL + estornos/busca?codsit=000&datatrn=yyyymmdd&nsusitef=00000000&codlojasitef=00000000 - Answer: List of Reversal and Reversal Transactions (see [List of Reversal and Reversal Transactions
Reversals] (returns-requests.md#list-of-transactions-reversals-and-reversed)) - Description of URL parameters:
| Field | Description | Type | Size | Format | Required |
|---|---|---|---|---|---|
| codsit | SiTef Network Code | Numeric | 1-4 | - | Yes |
| datatrn | Transaction date | Numeric | 8 | YYYYMMDD | Yes |
| nsusitef | Transaction's Sitef's NSU | Numeric | 6 | - | Yes |
| codlojasitef | Transaction SiTef store code | Numeric | 8 | - | No* |
| codlojatronco | Sub-acquirer store code | alphanumeric | 8 | - | No* |
| codigo_cliente | Customer Code | Numeric | 1-8 | - | Yes** |
* It is necessary to inform codlojasitef or codlojatronco
** codigo_cliente is required when used on SiTef GW/Express platform. Not used on SiTef- clients
Conciliation.By default the Reversal Queries are ignored and are not initialized together with the
application. If you want to enable this functionality, an additional configuration must be done
in thepending-ws.ymlfile:ignore: reversal: false
Inquiry of Reversal Transactions by Date
This functionality is intended to return a list of reversed transactions, and their respective
reversal transactions, of a date.
Optionally, you can filter by a specific period (based on start time and end time).
Call details
- Method:
GET - URL:
Basic URL + estornos/buscadata?datatrn=aaaammdd - Answer: List of Reversal and Reversal Transactions (see List of Reversal and Reversal Transactions reversed)
- Description of URL parameters:
| Field | Description | Type | Size | Format | Required |
|---|---|---|---|---|---|
| datatrn | Transaction date | Numeric | 8 | YYYYMMDD | Yes |
| starttime | Search start time | Numeric | 6 | HHMMSS | No |
| finaltime | Search end time | Numeric | 6 | HHMMSS | No |
| codigo_cliente | Customer code | Numeric | 1-19 | - | Yes* |
* codigo_cliente is required when used on GW/Express platform. Not used on SiTefWeb customers.
Remark:
By default the Reversal Queries are ignored and are not initialized together with the
application. If you want to enable this functionality, an additional configuration must be done
in thepending-ws.ymlfile:ignore: reversal: false
Updated 9 days ago