Orders
Get Orders
GET /residential/orders
Query Parameters
Name
Type
Description
page
Integer
Number of page
per_page
Integer
Number of orders to get per page
Example request:
curl -X GET "https://resi-api.iproyal.com/v1/residential/orders?page=1&per_page=10" \
-H "Authorization: Bearer <your_api_token>"<?php
$api_token = '<your_api_token>';
$url = 'https://resi-api.iproyal.com/v1/residential/orders?page=1&per_page=10';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPGET, true);
$headers = [
"Authorization: Bearer $api_token"
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>Example response:
{
"data": [
{
"id": 4,
"note": null,
"product_name": "Residential",
"status": "confirmed",
"amount": 50,
"quantity": 10,
"order_billing_type": "subscription",
"created_at": "2025-06-26 10:01:50"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 1
}
}Create Order
POST /residential/orders
Body Parameters:
Name
Type
Description
quantity
Integer
GB quantity
coupon_code
String
A discount code to apply to the order, if available.
card_id
Integer
If supplied - card will be billed for this order, if not - we will try to deduct the amount from balance
order_billing_type
String
subscription or regular default - subscription
Example request:
Response:
Calculate Pricing
GET /residential/orders/calculate-pricing
Query Parameters:
Name
Type
Description
quantity
Integer
Required. The amount of the product to order.
coupon_code
String
Optional. Discount code for the order.
order_billing_type
String
subscription or regular default - subscription
Example request:
Example response:
Last updated
Was this helpful?