curl --request GET \
--url https://api.ya.onl/v1/orders/{order_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.ya.onl/v1/orders/{order_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.ya.onl/v1/orders/{order_id}', 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.ya.onl/v1/orders/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.ya.onl/v1/orders/{order_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.ya.onl/v1/orders/{order_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ya.onl/v1/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"address": {
"city": "Lima",
"country": "PERU",
"district": "Miraflores",
"full_address": "Av. Larco 1234, Miraflores, Lima",
"state": "Lima"
},
"currency": "PEN",
"customer": {
"document_number": "12345678",
"document_type": "DNI",
"name": "María García",
"phone_number": "+51999888777"
},
"delivery_fee": 10,
"id": 12345,
"items": [
{
"base_price": 49.9,
"name": "Polo Negro - Talla M",
"quantity": 2,
"variant_id": 500
},
{
"base_price": 59.9,
"name": "Jean Slim Fit - Talla 32",
"quantity": 1,
"variant_id": 501
}
],
"order_date": "2026-03-10T15:30:00Z",
"payment_method": "credit_card",
"payment_receipt_urls": [
"https://example.com/vouchers/voucher1.jpg"
],
"payment_terms": "paid",
"pending_amount": 0,
"status": "confirmed",
"summary_conversation": "2 Polos Negro Talla M y 1 Jean Slim Fit Talla 32. Pago con Yape. Envío a Miraflores.",
"total_amount": 139.7
}{
"type": "<string>",
"detail": "<string>"
}{
"type": "<string>",
"detail": "<string>"
}{
"type": "<string>",
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"type": "<string>",
"detail": "<string>"
}Get order by ID
Retrieve a single order by its ID for the authenticated merchant.
curl --request GET \
--url https://api.ya.onl/v1/orders/{order_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.ya.onl/v1/orders/{order_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.ya.onl/v1/orders/{order_id}', 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.ya.onl/v1/orders/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.ya.onl/v1/orders/{order_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.ya.onl/v1/orders/{order_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ya.onl/v1/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"address": {
"city": "Lima",
"country": "PERU",
"district": "Miraflores",
"full_address": "Av. Larco 1234, Miraflores, Lima",
"state": "Lima"
},
"currency": "PEN",
"customer": {
"document_number": "12345678",
"document_type": "DNI",
"name": "María García",
"phone_number": "+51999888777"
},
"delivery_fee": 10,
"id": 12345,
"items": [
{
"base_price": 49.9,
"name": "Polo Negro - Talla M",
"quantity": 2,
"variant_id": 500
},
{
"base_price": 59.9,
"name": "Jean Slim Fit - Talla 32",
"quantity": 1,
"variant_id": 501
}
],
"order_date": "2026-03-10T15:30:00Z",
"payment_method": "credit_card",
"payment_receipt_urls": [
"https://example.com/vouchers/voucher1.jpg"
],
"payment_terms": "paid",
"pending_amount": 0,
"status": "confirmed",
"summary_conversation": "2 Polos Negro Talla M y 1 Jean Slim Fit Talla 32. Pago con Yape. Envío a Miraflores.",
"total_amount": 139.7
}{
"type": "<string>",
"detail": "<string>"
}{
"type": "<string>",
"detail": "<string>"
}{
"type": "<string>",
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"type": "<string>",
"detail": "<string>"
}Autorizaciones
Merchant API key for authentication
Parámetros de ruta
Unique order identifier
Respuesta
Successful Response
Unique order identifier
Date and time when the order was placed (merchant's local timezone)
Payment method used
"credit_card"
Currency code (ISO 4217)
MXN, PEN, COP, CLP, ARS, BRL, VES, BOB, USD, PYG, UYU, CRC, EUR, GTQ "PEN"
Total order amount including delivery fee
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$139.7
Customer information
Show child attributes
Show child attributes
Delivery address (null when the goods were handed over in person, as in a store or phone sale)
Show child attributes
Show child attributes
Line items in the order. Empty while the order was recorded only from a payment receipt or a merchant's mark; it gains lines later under the same id.
Show child attributes
Show child attributes
Current order status
pending, confirmed, preparing, ready_for_dispatch, dispatched, delivered, completed, rejected, cancelled "pending"
Payment terms for the order
pending, partial, paid, paid_pending_review, cash_on_delivery "paid"
Amount still pending payment (null if fully paid)
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$0
Delivery fee charged to the customer
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$10
URLs of payment receipt images uploaded by the customer (e.g. Yape, Plin vouchers)
AI-generated summary of the sales conversation with product details and customer preferences

