Through this endpoint it is possible to change the seat / armchair / cabin without changing the values or date of departure of a ticket previously authorized through the API.
URL
Production: POST https://bpe.ns.eti.br/v1/bpe/alterpol
Input Data
Field | Description | Occurrence | Data Type | Notes |
---|---|---|---|---|
X-AUTH-TOKEN | Software house access token | 0-1 | String | Can also be sent in the request header |
chBPe | BP-e access key | 1-1 | Int | |
tpAmb | Type of BP-e authorization environment, 1 - Production, 2 - Approval | 1-1 | Int | |
dhEvento | Event date and time | 1-1 | String ( date and time format ) | Sefaz Standard: YYYY-MM-DDTHH: MM: SS + UTC. Ex.: 2016-06-13T15: 04: 10-02: 00 |
nProt | BP-e authorization protocol number | 1-1 | Int | |
poltrona | Number of the new BP-e armchair / seat / cabin | 1-1 | Int |
Request Example
Seat Change Request Example
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"chBPe": "99999999999999999999999999999999999999999999",
"tpAmb": 2,
"dhEvento": "2017-05-15T12:00:00-03:00",
"nProt": "999999999999999",
"poltrona": "2"
}'
https://bpe.ns.eti.br/v1/bpe/alterpol
Returned Data
Field | Description | Data Type | Parent | Notes |
---|---|---|---|---|
status | Status code | Int | ||
motivo | Literal description of processing status | String | ||
retEvento | Object containing the cancellation processing data at Sefaz | Object | Only in status = 200 | |
cStat | Processing status code | Int | retEvento | |
xMotivo | Literal description of the processing situation at Sefaz | String | retEvento | |
chBPe | BP-e access key | Int | retEvento | Only when cStat = 135 |
dhRegEvento | Date and time of the event registration at Sefaz | String ( date and time format ) | retEvento | Sefaz Standard: YYYY-MM-DDTHH: MM: SS + UTC. Ex .: 2016-06-13T15: 04: 10-03: 00. Only in cStat = 135 |
nProt | Número do protocolo de autorização do evento | Int | retEvento | Only when cStat = 135 |
xml | XML de distribuição do evento de cancelamento | String | retEvento | Only when cStat = 135 |
erro | Object containing the error information in case the cancellation cannot be carried out successfully | Object | Only in different than 200 | |
cStat | Error status code | Int | erro | |
xMotivo | Literal description of the error | String | erro |
Response Example
Successful Response
{
"status": 200,
"motivo": "Processamento de evento realizado com sucesso",
"retEvento": {
"cStat": 135,
"xMotivo": "Evento registrado e vinculado a BP-e",
"chBPe": "99999999999999999999999999999999999999999999",
"dhRegEvento": "2018-02-21T14:58:46-03:00",
"nProt": "999999999999999",
"xml": "<?xml version=\"1.0\" encoding=\"utf-8\"?><procEventoBPe versao=\"1.00\" xmlns=\"http://www.portalfiscal.inf.br/bpe\">...</procEventoBPe>"
}
}
Retuned Codes
Code | Description |
---|---|
200 | Successful event processing |
-2 | Invalid access key |
-3 | It was not possible to link the event to BP-e. Check the error object for more information |