Transaction
2 min
Create New Transaction
Permite a criação de uma transação/experiência via API
POST
https://api.tsrtech.com.br
Body Parameters
- typestringrequiredDescription
- tokenstringrequiredDescription
- survey_idNumberrequiredDescription
- client_namestringrequiredDescription
- cpfstringDescription
- emailstringDescription
- phonestringDescription
- genderstringDescription
- storestringDescription
- amountstringDescription
- external_idstringDescription
- extrasstringDescription
- channelstringrequiredDescription
curl
curl --location 'https://api.tsrtech.com.br' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "string",
"token": "string",
"survey_id": "Number",
"client_name": "string",
"cpf": "string",
"email": "string",
"phone": "string",
"gender": "string",
"store": "string",
"amount": "string",
"external_id": "string",
"extras": "string",
"channel": "Number"200
{
"created": true,
"status": 0,
"transaction_id": 9999,
"client_id": "9999"
}406
{
"created": false,
"status": 2,
"detail": "invalid survey_id"
}
Get All Transactions
Exibe todas as transações/experiências enviadas para a TSR bem como o status de cada uma.
GET
https://api.tsrtech.com.br
Body Parameters
- tokenstringrequiredDescription
- typestringrequiredDescription
- survey_idNumberrequiredDescription
curl
curl --location --request GET 'https://api.tsrtech.com.br' \
--header 'Accept: application/json' \
--data-raw
'{
"type": "transactions_all,
"token": "string"
"survey_id": number
}'200
{
"id": "2194",
"external_id": "9293",
"created_at": "2023-07-29 02:39:34",
"author": "40",
"survey": "72",
"client": "926",
"store": "loja 01",
"amount": "1",
"extras": "9293",
"channel": "3",
"cicle": "0",
"dispatch": "1",
"dispatch_at": "2023-07-29 02:40:02",
"response": "Canal não permitido",
"status": "2"
}406
{
"message": "no content"
}Get specific transaction
Exibe uma transação em específico, com detalhes de resposta caso houver.
GET
https://api.tsrtech.com.br
Body Parameters
- tokenstringrequiredDescription
- typestringrequiredDescription
- indicatorstringDescription
curl
curl --location --request GET 'https://api.tsrtech.com.br' \
--header 'Accept: application/json' \
--data-raw '{
"type": "transaction",
"token": "string",
"transaction_id": number
}'200
{
"external_id": "",
"transaction_id": "XXXXXX",
"survey_id": "XX",
"response_status": "not answered",
"survey_title": "Pesquisa XXXXX",
"client_name": "XXXXX",
"cpf": "",
"email": "[email protected]",
"phone": "",
"gender": "",
"store": "",
"amount": "",
"cicle": "D+7",
"channel": "WhatsApp",
"last_status": "Falha",
"response_date": null,
"responses": null
}404
{
"error": "transaction not found"
}