Terraswitch
  • Terraswitch - Get Started
  • Test & Live Environments
  • Onboarding as a Business
  • GUIDES
    • 🎾Authentication
    • 🧀Webhooks
    • 🫓Status & Responses
    • 🏉API Rate Limits
    • 🚀Transactions & Destinations
    • 🍊Testing Credentials
    • 🚐Crafting Metadata
  • API ENDPOINTS
    • Account
      • Get Account Details
      • Get Banks
      • Get Beneficiaries
      • Add Bank
      • Change Settlement Bank
    • Wallet
      • Get Wallet Details
      • Get Wallet Transactions
    • Collections
      • Checkout
        • Initialize Transaction
      • Transfer
        • Generate Account
      • Charge
        • Create Charge
        • Authorize Charge
        • Charge Authorization
      • Bank
        • Pay with Opay
    • Payout
      • Bank Transfer
      • Withdraw Money
    • Products
      • List Products
      • Search Products
      • Filter Products
      • Fetch Product
      • Create Product
      • Update Product
    • Subaccounts
      • List Subaccounts
      • Search Subaccounts
      • Filter Subaccounts
      • Fetch Subaccount
      • Create Subaccount
      • Update Subaccount
    • Payment Links
      • List Payment Links
      • List Payment Link Transactions
      • Search Payment Links
      • Filter Payment Links
      • Fetch Payment Link
      • Create Payment Link
      • Update Payment Link
      • Attach Payment Resource
      • Remove Subaccount
      • Enable Payment Link
      • Disable Payment Link
    • Invoices
      • List Invoices
      • Search Invoices
      • Filter Invoices
      • Fetch Invoice
      • Create Invoice
      • Update Invoice
      • Remove Invoice Item
    • Transactions
      • List Transactions
      • Search Transactions
      • Filter Transactions
      • Verify Transaction
    • Refunds
      • List Refunds
      • Fetch Refund
      • Create Refund
    • Bills Payment
      • List Mobile Networks
      • List Bill Categories
      • List Bill Sub-Categories
      • List Mobile Data Plans
      • Validate Biller
      • Validate Bill Status
      • Validate Top-Up Status
      • Buy Airtime
      • Buy Data
      • Pay Bill
    • Resources
      • List Banks
      • List Countries
      • Resolve Bank Account
Powered by GitBook
On this page
  1. API ENDPOINTS
  2. Products

Filter Products

Get a list of your products on Terraswitch.

POST {{ BASE_URL }}/v1/corporate/filter-products

Optional Query Parameters

Property
Data Type
Description
Example

limit

string

Number of records per page

50

page

string

Page number to view

1

order

string

Arrangement of records in descending or ascending order

"asc" or "desc"

Body Parameters

Property
Data Type
Description
Example
Required

isEnabled

boolean

Specify filter value for the enabled status of the product

true

Yes, if no other property is specified

import Axios from 'axios';

// set the api url
const API_URL = `${BASE_URL}/v1/corporate/filter-products`;

// define request body
const data = {
    isEnabled: true
}

// make request using axios
Axios({
    method: "POST",
    url: `${API_URL}`,
    headers: {
        lg: 'en',
        ch: 'web'
        Authorization: `Bearer ${API_KEY}`,
        'Content-Type': 'application/json',
    },
    data: data
}).then((resp) => {
    console.log(resp)
}).catch((err) => {
    console.log(err)
})
{
    "error": false,
    "errors": [],
    "count": 3,
    "total": 3,
    "pagination": {},
    "data": [
        {
            "avatar": "",
            "code": "VPDMYPRODUCTXD",
            "description": "This split is for sending money to my settlement accounts",
            "isEnabled": true,
            "name": "Black Shirt",
            "price": 3500.99,
            "slug": "black-shirt",
            "inflow": {
                "value": 0,
                "count": 0
            },
            "createdAt": "2023-12-31T21:23:27.440Z",
            "updatedAt": "2023-12-31T21:26:12.328Z"
        },
        {
            "avatar": "https://storage.googleapis.com/concreap-buckets/product-vpdextq1knp-avatar",
            "code": "VPDexTq1knp",
            "description": "Homemade soup for families",
            "isEnabled": true,
            "name": "Homemade Soup",
            "price": 5000.99,
            "slug": "homemade-soup",
            "inflow": {
                "value": 10001.98,
                "count": 2
            },
            "createdAt": "2023-12-30T07:46:26.915Z",
            "updatedAt": "2023-12-30T14:26:14.628Z"
        },
        {
            "avatar": "https://storage.googleapis.com/concreap-buckets/product-vpdd&gfr54bva1-avatar",
            "code": "VPDD&GfR54BVA1",
            "description": "This is a D&G Brown Bag to sell",
            "isEnabled": true,
            "name": "D&G Brown Bag",
            "price": 4500.99,
            "slug": "dandg-brown-bag",
            "inflow": {
                "value": 0,
                "count": 0
            },
            "createdAt": "2023-12-30T05:47:44.160Z",
            "updatedAt": "2023-12-30T06:01:31.138Z"
        }
    ],
    "message": "successful",
    "status": 200
}
PreviousSearch ProductsNextFetch Product

Last updated 5 months ago