Listagem de assinaturas
curl --request GET \
--url https://api.malga.io/v1/subscriptions \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'import requests
url = "https://api.malga.io/v1/subscriptions"
headers = {
"X-Client-Id": "<api-key>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/subscriptions', 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.malga.io/v1/subscriptions",
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>",
"X-Client-Id: <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.malga.io/v1/subscriptions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
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.malga.io/v1/subscriptions")
.header("X-Client-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.malga.io/v1/subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Client-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "01985cf8-96df-7d37-b17c-a9985a1e78bb",
"name": "Test Without Request",
"clientId": "e234eeb3-483d-4df2-87eb-1e2be5cdaccd",
"merchantId": "225d39bc-1fbb-480a-90bd-f0caad05d2d0",
"customerId": "2a8b64ce-904c-4256-b79a-49525808609c",
"referenceKey": "SUB-PREMIUM-001",
"currency": "BRL",
"trial": {
"endAt": "2025-08-15"
},
"status": "paused",
"amount": 29900,
"liveMode": true,
"interval": "monthly",
"createdAt": "2025-07-30T20:14:12.191866Z",
"updatedAt": "2025-07-31T16:57:23.751952Z"
}
],
"meta": {
"totalItems": 123,
"totalPages": 123,
"currentPage": 123,
"itemsPerPage": 123,
"itemCount": 123
}
}Subscriptions
Listagem de assinaturas
GET
/
v1
/
subscriptions
Listagem de assinaturas
curl --request GET \
--url https://api.malga.io/v1/subscriptions \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'import requests
url = "https://api.malga.io/v1/subscriptions"
headers = {
"X-Client-Id": "<api-key>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/subscriptions', 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.malga.io/v1/subscriptions",
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>",
"X-Client-Id: <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.malga.io/v1/subscriptions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
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.malga.io/v1/subscriptions")
.header("X-Client-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.malga.io/v1/subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Client-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "01985cf8-96df-7d37-b17c-a9985a1e78bb",
"name": "Test Without Request",
"clientId": "e234eeb3-483d-4df2-87eb-1e2be5cdaccd",
"merchantId": "225d39bc-1fbb-480a-90bd-f0caad05d2d0",
"customerId": "2a8b64ce-904c-4256-b79a-49525808609c",
"referenceKey": "SUB-PREMIUM-001",
"currency": "BRL",
"trial": {
"endAt": "2025-08-15"
},
"status": "paused",
"amount": 29900,
"liveMode": true,
"interval": "monthly",
"createdAt": "2025-07-30T20:14:12.191866Z",
"updatedAt": "2025-07-31T16:57:23.751952Z"
}
],
"meta": {
"totalItems": 123,
"totalPages": 123,
"currentPage": 123,
"itemsPerPage": 123,
"itemCount": 123
}
}Was this page helpful?
⌘I