Sell Orders
curl --request GET \
--url http://localhost:3050/api/v1/business/open/gift-card-sell/ordersimport requests
url = "http://localhost:3050/api/v1/business/open/gift-card-sell/orders"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3050/api/v1/business/open/gift-card-sell/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3050",
CURLOPT_URL => "http://localhost:3050/api/v1/business/open/gift-card-sell/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "http://localhost:3050/api/v1/business/open/gift-card-sell/orders"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3050/api/v1/business/open/gift-card-sell/orders")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3050/api/v1/business/open/gift-card-sell/orders")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"message": "Orders retrieved successfully",
"data": [
{
"uuid": "uuid-123",
"amount": 100,
"payoutAmount": 120000,
"sellCurrency": "NAIRA",
"sellValue": 120000,
"payoutCurrency": "NGN",
"status": "SUCCESS",
"reference": "ref-123",
"providerRate": 1200,
"platformFeeAmount": 500,
"platformRate": 1200,
"commissionAmount": 0,
"totalAmount": 120500,
"totalPayout": 120500,
"createdAt": "2024-04-24T10:00:00.000Z",
"updatedAt": "2024-04-24T10:00:00.000Z",
"imageUrls": [
"https://example.com/image.png"
]
}
],
"pagination": {
"total": 100,
"page": 1,
"limit": 10,
"totalPages": 10
}
}Sell Gift Card
Sell Orders
Gets the business’s gift card sell order history.
GET
/
api
/
v1
/
business
/
open
/
gift-card-sell
/
orders
Sell Orders
curl --request GET \
--url http://localhost:3050/api/v1/business/open/gift-card-sell/ordersimport requests
url = "http://localhost:3050/api/v1/business/open/gift-card-sell/orders"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3050/api/v1/business/open/gift-card-sell/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3050",
CURLOPT_URL => "http://localhost:3050/api/v1/business/open/gift-card-sell/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "http://localhost:3050/api/v1/business/open/gift-card-sell/orders"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3050/api/v1/business/open/gift-card-sell/orders")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3050/api/v1/business/open/gift-card-sell/orders")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"message": "Orders retrieved successfully",
"data": [
{
"uuid": "uuid-123",
"amount": 100,
"payoutAmount": 120000,
"sellCurrency": "NAIRA",
"sellValue": 120000,
"payoutCurrency": "NGN",
"status": "SUCCESS",
"reference": "ref-123",
"providerRate": 1200,
"platformFeeAmount": 500,
"platformRate": 1200,
"commissionAmount": 0,
"totalAmount": 120500,
"totalPayout": 120500,
"createdAt": "2024-04-24T10:00:00.000Z",
"updatedAt": "2024-04-24T10:00:00.000Z",
"imageUrls": [
"https://example.com/image.png"
]
}
],
"pagination": {
"total": 100,
"page": 1,
"limit": 10,
"totalPages": 10
}
}Query Parameters
Page number
Required range:
x >= 1Example:
1
Number of items per page
Required range:
1 <= x <= 100Example:
10

