Retrieve a consultation's evidence trail
curl --request GET \
--url https://api.example.com/v1/src/evidence/consultations/{id} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/src/evidence/consultations/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/src/evidence/consultations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/v1/src/evidence/consultations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"consultationId": "0192f5c4-1c2f-7c3a-8a1b-9f2e3d4c5b6a",
"records": [
{
"kind": "acceptance",
"occurredAt": "2023-11-07T05:31:56Z",
"sequence": 1,
"correctsSequence": 123,
"data": {}
}
]
}{
"correlationId": "req-7a3f9c2e",
"detail": "check digits are invalid for the declared documentType",
"instance": "/v1/src/consultations",
"status": 400,
"title": "Bad Request",
"traceId": "a1b2c3d4",
"type": "<string>",
"violations": [
{
"field": "document",
"reason": "check digits are invalid for the declared documentType",
"code": "<string>"
}
],
"code": "<string>",
"details": {}
}{
"correlationId": "req-7a3f9c2e",
"detail": "check digits are invalid for the declared documentType",
"instance": "/v1/src/consultations",
"status": 400,
"title": "Bad Request",
"traceId": "a1b2c3d4",
"type": "<string>",
"violations": [
{
"field": "document",
"reason": "check digits are invalid for the declared documentType",
"code": "<string>"
}
],
"code": "<string>",
"details": {}
}{
"correlationId": "req-7a3f9c2e",
"detail": "check digits are invalid for the declared documentType",
"instance": "/v1/src/consultations",
"status": 400,
"title": "Bad Request",
"traceId": "a1b2c3d4",
"type": "<string>",
"violations": [
{
"field": "document",
"reason": "check digits are invalid for the declared documentType",
"code": "<string>"
}
],
"code": "<string>",
"details": {}
}{
"correlationId": "req-7a3f9c2e",
"detail": "check digits are invalid for the declared documentType",
"instance": "/v1/src/consultations",
"status": 400,
"title": "Bad Request",
"traceId": "a1b2c3d4",
"type": "<string>",
"violations": [
{
"field": "document",
"reason": "check digits are invalid for the declared documentType",
"code": "<string>"
}
],
"code": "<string>",
"details": {}
}{
"correlationId": "req-7a3f9c2e",
"detail": "check digits are invalid for the declared documentType",
"instance": "/v1/src/consultations",
"status": 400,
"title": "Bad Request",
"traceId": "a1b2c3d4",
"type": "<string>",
"violations": [
{
"field": "document",
"reason": "check digits are invalid for the declared documentType",
"code": "<string>"
}
],
"code": "<string>",
"details": {}
}{
"correlationId": "req-7a3f9c2e",
"detail": "check digits are invalid for the declared documentType",
"instance": "/v1/src/consultations",
"status": 400,
"title": "Bad Request",
"traceId": "a1b2c3d4",
"type": "<string>",
"violations": [
{
"field": "document",
"reason": "check digits are invalid for the declared documentType",
"code": "<string>"
}
],
"code": "<string>",
"details": {}
}Retrieve a consultation's evidence trail
Returns the evidence trail of one consultation: every record, in ascending sequence order. This order reconstructs the history of the consultation.
An unknown or malformed id returns 404 with code SRC-0301. A trail too large for one response returns 422 with code SRC-0002.
GET
/
v1
/
src
/
evidence
/
consultations
/
{id}
Retrieve a consultation's evidence trail
curl --request GET \
--url https://api.example.com/v1/src/evidence/consultations/{id} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/src/evidence/consultations/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/src/evidence/consultations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/v1/src/evidence/consultations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"consultationId": "0192f5c4-1c2f-7c3a-8a1b-9f2e3d4c5b6a",
"records": [
{
"kind": "acceptance",
"occurredAt": "2023-11-07T05:31:56Z",
"sequence": 1,
"correctsSequence": 123,
"data": {}
}
]
}{
"correlationId": "req-7a3f9c2e",
"detail": "check digits are invalid for the declared documentType",
"instance": "/v1/src/consultations",
"status": 400,
"title": "Bad Request",
"traceId": "a1b2c3d4",
"type": "<string>",
"violations": [
{
"field": "document",
"reason": "check digits are invalid for the declared documentType",
"code": "<string>"
}
],
"code": "<string>",
"details": {}
}{
"correlationId": "req-7a3f9c2e",
"detail": "check digits are invalid for the declared documentType",
"instance": "/v1/src/consultations",
"status": 400,
"title": "Bad Request",
"traceId": "a1b2c3d4",
"type": "<string>",
"violations": [
{
"field": "document",
"reason": "check digits are invalid for the declared documentType",
"code": "<string>"
}
],
"code": "<string>",
"details": {}
}{
"correlationId": "req-7a3f9c2e",
"detail": "check digits are invalid for the declared documentType",
"instance": "/v1/src/consultations",
"status": 400,
"title": "Bad Request",
"traceId": "a1b2c3d4",
"type": "<string>",
"violations": [
{
"field": "document",
"reason": "check digits are invalid for the declared documentType",
"code": "<string>"
}
],
"code": "<string>",
"details": {}
}{
"correlationId": "req-7a3f9c2e",
"detail": "check digits are invalid for the declared documentType",
"instance": "/v1/src/consultations",
"status": 400,
"title": "Bad Request",
"traceId": "a1b2c3d4",
"type": "<string>",
"violations": [
{
"field": "document",
"reason": "check digits are invalid for the declared documentType",
"code": "<string>"
}
],
"code": "<string>",
"details": {}
}{
"correlationId": "req-7a3f9c2e",
"detail": "check digits are invalid for the declared documentType",
"instance": "/v1/src/consultations",
"status": 400,
"title": "Bad Request",
"traceId": "a1b2c3d4",
"type": "<string>",
"violations": [
{
"field": "document",
"reason": "check digits are invalid for the declared documentType",
"code": "<string>"
}
],
"code": "<string>",
"details": {}
}{
"correlationId": "req-7a3f9c2e",
"detail": "check digits are invalid for the declared documentType",
"instance": "/v1/src/consultations",
"status": 400,
"title": "Bad Request",
"traceId": "a1b2c3d4",
"type": "<string>",
"violations": [
{
"field": "document",
"reason": "check digits are invalid for the declared documentType",
"code": "<string>"
}
],
"code": "<string>",
"details": {}
}Autorizações
The access token received from the authorization server in the OAuth 2.0 flow.
Cabeçalhos
Optional correlation id (UUID) propagated through logs/traces.
Parâmetros de caminho
Consultation identifier (UUID). An identifier that is unknown or malformed returns 404 SRC-0301.
Exemplo:
"0192f5c4-1c2f-7c3a-8a1b-9f2e3d4c5b6a"
Esta página foi útil?

