Get Order Attempts
curl --request GET \
--url https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts"
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))
}HttpResponse<String> response = Unirest.get("https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attempts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_number": "<string>",
"order_status": "<string>",
"order_payment_status": "<string>",
"order_trashed": true,
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>"
},
"status": "issued",
"environment": "test",
"pilot": true,
"mode": "redirect",
"current": true,
"session": "<string>",
"session_bound": true,
"amount": "<string>",
"currency": "<string>",
"approved_amount": "<string>",
"loan_amount": "<string>",
"remote_status": "PENDING",
"remote_checked_at": "2023-11-07T05:31:56Z",
"next_check_at": "2023-11-07T05:31:56Z",
"check_failures": 123,
"check_failing_since": "2023-11-07T05:31:56Z",
"client_status": "<string>",
"paid_by": "webhook",
"close_reason": "<string>",
"decline_reason": "<string>",
"opened_at": "2023-11-07T05:31:56Z",
"submitted_at": "2023-11-07T05:31:56Z",
"decided_at": "2023-11-07T05:31:56Z",
"signed_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"attention": [
"amount_mismatch"
],
"last_event": {
"source": "webhook",
"kind": "paid",
"outcome": "pending_check",
"remote_status": "PENDING",
"received_at": "2023-11-07T05:31:56Z"
},
"events": [
{
"source": "webhook",
"kind": "paid",
"outcome": "pending_check",
"remote_status": "PENDING",
"received_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_before": "issued",
"status_after": "issued",
"key_environment": "test",
"amount": "<string>"
}
],
"events_total": 123
}
]
},
"meta": {
"page": 123,
"page_size": 123,
"total": 123,
"total_pages": 123
},
"error": "<string>",
"error_code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Integrations & modules
Get Order Attempts
La scheda Iute dell’ordine (§10.3): i suoi tentativi dal più recente, ognuno con gli eventi; current dice
quello su cui valgono le azioni. Elenco vuoto per un ordine senza tentativi; 404 order.not_found.
GET
/
api
/
v1
/
admin
/
iute
/
orders
/
{order_id}
/
attempts
Get Order Attempts
curl --request GET \
--url https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts"
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))
}HttpResponse<String> response = Unirest.get("https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vellaro.io/api/v1/admin/iute/orders/{order_id}/attempts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attempts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_number": "<string>",
"order_status": "<string>",
"order_payment_status": "<string>",
"order_trashed": true,
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>"
},
"status": "issued",
"environment": "test",
"pilot": true,
"mode": "redirect",
"current": true,
"session": "<string>",
"session_bound": true,
"amount": "<string>",
"currency": "<string>",
"approved_amount": "<string>",
"loan_amount": "<string>",
"remote_status": "PENDING",
"remote_checked_at": "2023-11-07T05:31:56Z",
"next_check_at": "2023-11-07T05:31:56Z",
"check_failures": 123,
"check_failing_since": "2023-11-07T05:31:56Z",
"client_status": "<string>",
"paid_by": "webhook",
"close_reason": "<string>",
"decline_reason": "<string>",
"opened_at": "2023-11-07T05:31:56Z",
"submitted_at": "2023-11-07T05:31:56Z",
"decided_at": "2023-11-07T05:31:56Z",
"signed_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"attention": [
"amount_mismatch"
],
"last_event": {
"source": "webhook",
"kind": "paid",
"outcome": "pending_check",
"remote_status": "PENDING",
"received_at": "2023-11-07T05:31:56Z"
},
"events": [
{
"source": "webhook",
"kind": "paid",
"outcome": "pending_check",
"remote_status": "PENDING",
"received_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_before": "issued",
"status_after": "issued",
"key_environment": "test",
"amount": "<string>"
}
],
"events_total": 123
}
]
},
"meta": {
"page": 123,
"page_size": 123,
"total": 123,
"total_pages": 123
},
"error": "<string>",
"error_code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}