{
    "info": {
        "name": "Marketplace API",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "variable": [
        {
            "key": "base",
            "value": "https://onlineselling.org/api/v1"
        },
        {
            "key": "site",
            "value": "https://onlineselling.org"
        },
        {
            "key": "api_key",
            "value": "mk_live_..."
        }
    ],
    "item": [
        {
            "name": "Account",
            "item": [
                {
                    "name": "Check the key",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/ping",
                        "description": "Check the key"
                    }
                },
                {
                    "name": "Wallet balance and money reserved by running orders",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/balance",
                        "description": "Wallet balance and money reserved by running orders"
                    }
                },
                {
                    "name": "Wallet history, newest first",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/transactions?limit=&before=",
                        "description": "Wallet history, newest first"
                    }
                },
                {
                    "name": "Coins open for top-ups",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/coins",
                        "description": "Coins open for top-ups"
                    }
                },
                {
                    "name": "Your permanent deposit address for a coin",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/deposit-address",
                        "description": "Your permanent deposit address for a coin",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"coin\": \"usdt-tron\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Payment page for an exact amount",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/invoice",
                        "description": "Payment page for an exact amount",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": 25\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Your last 50 top-ups",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/payments",
                        "description": "Your last 50 top-ups"
                    }
                }
            ]
        },
        {
            "name": "Temp SMS",
            "item": [
                {
                    "name": "Countries with numbers on sale",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/countries",
                        "description": "Countries with numbers on sale"
                    }
                },
                {
                    "name": "Prices and stock",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/prices?country=&service=&line=&tier=",
                        "description": "Prices and stock"
                    }
                },
                {
                    "name": "Take a number for one code (price held, charged only when the code arrives). US real-SIM options (tier real_sim): carrier (at&t, verizon, t-mobile) + keep_carrier, area_codes + lock_area_code, number (10 digits), or services: [codes] for several on one number",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/orders",
                        "description": "Take a number for one code (price held, charged only when the code arrives). US real-SIM options (tier real_sim): carrier (at&t, verizon, t-mobile) + keep_carrier, area_codes + lock_area_code, number (10 digits), or services: [codes] for several on one number",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"service\": \"wa\",\n    \"country\": 16,\n    \"tier\": \"standard\",\n    \"max_price\": 1.5\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "US area codes with numbers free now, for one service",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/us/area-codes?service=",
                        "description": "US area codes with numbers free now, for one service"
                    }
                },
                {
                    "name": "Your one-time orders",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/orders?status=&limit=",
                        "description": "Your one-time orders"
                    }
                },
                {
                    "name": "One order with its codes",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/orders/:id",
                        "description": "One order with its codes"
                    }
                },
                {
                    "name": "Cancel (nothing charged); allowed from cancel_available_at",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/orders/:id/cancel",
                        "description": "Cancel (nothing charged); allowed from cancel_available_at"
                    }
                },
                {
                    "name": "Another number, same price",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/orders/:id/swap",
                        "description": "Another number, same price"
                    }
                },
                {
                    "name": "Another SMS on the same number (where the service allows)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/orders/:id/another",
                        "description": "Another SMS on the same number (where the service allows)"
                    }
                },
                {
                    "name": "Done with this number",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/orders/:id/finish",
                        "description": "Done with this number"
                    }
                },
                {
                    "name": "Rent numbers (paid when assigned). Code-link numbers: \"type\": \"link\" (valid 5-80+ days, no \"days\")",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/rentals",
                        "description": "Rent numbers (paid when assigned). Code-link numbers: \"type\": \"link\" (valid 5-80+ days, no \"days\")",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"service\": \"wa\",\n    \"country\": 16,\n    \"days\": 7,\n    \"quantity\": 1\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Renew for the same length at today's price (when the rental shows can_renew: true)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/rentals/:id/renew",
                        "description": "Renew for the same length at today's price (when the rental shows can_renew: true)"
                    }
                },
                {
                    "name": "Renew automatically before the end",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/rentals/:id/auto-renew",
                        "description": "Renew automatically before the end",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"on\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Your rentals",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/rentals?status=",
                        "description": "Your rentals"
                    }
                },
                {
                    "name": "One rental with its messages and code link",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/rentals/:id",
                        "description": "One rental with its messages and code link"
                    }
                },
                {
                    "name": "New messages only",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/rentals/:id/messages?after_id=",
                        "description": "New messages only"
                    }
                },
                {
                    "name": "Cancel and refund (only where allowed: first minutes, before any message)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/rentals/:id/cancel",
                        "description": "Cancel and refund (only where allowed: first minutes, before any message)"
                    }
                },
                {
                    "name": "New code link (the old one stops working)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/sms/rentals/:id/new-link",
                        "description": "New code link (the old one stops working)"
                    }
                }
            ]
        },
        {
            "name": "Accounts",
            "item": [
                {
                    "name": "Accounts on sale: price, min / max per order (stock numbers when the shop shows them)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/accounts/products?category=",
                        "description": "Accounts on sale: price, min / max per order (stock numbers when the shop shows them)"
                    }
                },
                {
                    "name": "Buy accounts (paid from the wallet; the logins are in the reply when delivered at once)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/accounts/orders",
                        "description": "Buy accounts (paid from the wallet; the logins are in the reply when delivered at once)",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"product_id\": 123,\n    \"quantity\": 2,\n    \"promo\": \"OPTIONAL\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Your accounts orders, newest first (without the logins)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/accounts/orders?limit=&before=",
                        "description": "Your accounts orders, newest first (without the logins)"
                    }
                },
                {
                    "name": "One order with its logins",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/accounts/orders/:ref",
                        "description": "One order with its logins"
                    }
                },
                {
                    "name": "The delivered file (tdata / session zip) of an order",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/accounts/orders/:ref/file",
                        "description": "The delivered file (tdata / session zip) of an order"
                    }
                }
            ]
        },
        {
            "name": "Gift cards & eSIM",
            "item": [
                {
                    "name": "Gift cards on sale with the price of each amount",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/giftcards?q=&country=&page=",
                        "description": "Gift cards on sale with the price of each amount"
                    }
                },
                {
                    "name": "Buy a gift card (the code is in the reply when delivered at once)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/giftcards/orders",
                        "description": "Buy a gift card (the code is in the reply when delivered at once)",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"giftcard_id\": 123,\n    \"amount\": 25,\n    \"promo\": \"OPTIONAL\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "eSIM data plans on sale",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/esim/packages?country=&data=&days=&page=",
                        "description": "eSIM data plans on sale"
                    }
                },
                {
                    "name": "Buy an eSIM plan (the LPA activation code is in the reply)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/esim/orders",
                        "description": "Buy an eSIM plan (the LPA activation code is in the reply)",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"package_id\": 123,\n    \"promo\": \"OPTIONAL\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "One gift card / eSIM order with its code",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/kc/orders/:ref",
                        "description": "One gift card / eSIM order with its code"
                    }
                }
            ]
        },
        {
            "name": "Virtual cards",
            "item": [
                {
                    "name": "Virtual card types on offer, with fees and load limits",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/cards/bins",
                        "description": "Virtual card types on offer, with fees and load limits"
                    }
                },
                {
                    "name": "Issue a virtual card with a first load (\"agree\": true = you accept the card terms)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/cards",
                        "description": "Issue a virtual card with a first load (\"agree\": true = you accept the card terms)",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"bin_id\": 1,\n    \"amount\": 50,\n    \"first_name\": \"Ann\",\n    \"last_name\": \"Lee\",\n    \"agree\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "One card; details=1 adds the live card number, CVV and transactions (limited per hour)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/cards/:ref?details=",
                        "description": "One card; details=1 adds the live card number, CVV and transactions (limited per hour)"
                    }
                },
                {
                    "name": "Load more money onto a card",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/cards/:ref/topup",
                        "description": "Load more money onto a card",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": 25\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Freeze or unfreeze a card",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/cards/:ref/freeze",
                        "description": "Freeze or unfreeze a card",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"action\": \"freeze\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "Webhooks",
            "item": [
                {
                    "name": "Your webhook settings",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/webhook",
                        "description": "Your webhook settings"
                    }
                },
                {
                    "name": "Set your webhook address and events",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/webhook",
                        "description": "Set your webhook address and events",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"url\": \"https:\\/\\/example.com\\/hook\",\n    \"events\": [\n        \"sms.received\",\n        \"order.updated\"\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Send a test event now",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "Bearer {{api_key}}"
                            }
                        ],
                        "url": "{{base}}/webhook/test",
                        "description": "Send a test event now"
                    }
                }
            ]
        },
        {
            "name": "SMS-Activate protocol",
            "item": [
                {
                    "name": "getBalance",
                    "request": {
                        "method": "GET",
                        "url": "{{site}}/stubs/handler_api.php?api_key={{api_key}}&action=getBalance"
                    }
                },
                {
                    "name": "getNumber",
                    "request": {
                        "method": "GET",
                        "url": "{{site}}/stubs/handler_api.php?api_key={{api_key}}&action=getNumber&service=wa&country=16"
                    }
                },
                {
                    "name": "getStatus",
                    "request": {
                        "method": "GET",
                        "url": "{{site}}/stubs/handler_api.php?api_key={{api_key}}&action=getStatus&id="
                    }
                },
                {
                    "name": "setStatus",
                    "request": {
                        "method": "GET",
                        "url": "{{site}}/stubs/handler_api.php?api_key={{api_key}}&action=setStatus&id=&status=8"
                    }
                },
                {
                    "name": "getRentNumber",
                    "request": {
                        "method": "GET",
                        "url": "{{site}}/stubs/handler_api.php?api_key={{api_key}}&action=getRentNumber&service=wa&country=16&rent_time=24"
                    }
                },
                {
                    "name": "getRentStatus",
                    "request": {
                        "method": "GET",
                        "url": "{{site}}/stubs/handler_api.php?api_key={{api_key}}&action=getRentStatus&id="
                    }
                }
            ]
        },
        {
            "name": "Social growth panel API (v2)",
            "item": [
                {
                    "name": "services",
                    "request": {
                        "method": "POST",
                        "description": "Every service: service, name, type, category, rate (per 1000), min, max, dripfeed, refill, cancel",
                        "url": "{{site}}/api/v2",
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "key",
                                    "value": "{{api_key}}"
                                },
                                {
                                    "key": "action",
                                    "value": "services"
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "add",
                    "request": {
                        "method": "POST",
                        "description": "New order -> {\"order\": 12345}",
                        "url": "{{site}}/api/v2",
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "key",
                                    "value": "{{api_key}}"
                                },
                                {
                                    "key": "action",
                                    "value": "add"
                                },
                                {
                                    "key": "service",
                                    "value": ""
                                },
                                {
                                    "key": "link",
                                    "value": ""
                                },
                                {
                                    "key": "quantity",
                                    "value": ""
                                },
                                {
                                    "key": "runs",
                                    "value": ""
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "status",
                    "request": {
                        "method": "POST",
                        "description": "charge, start_count, status, remains, currency (subscriptions: status, expiry, posts, orders)",
                        "url": "{{site}}/api/v2",
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "key",
                                    "value": "{{api_key}}"
                                },
                                {
                                    "key": "action",
                                    "value": "status"
                                },
                                {
                                    "key": "order",
                                    "value": ""
                                },
                                {
                                    "key": "orders",
                                    "value": ""
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "refill",
                    "request": {
                        "method": "POST",
                        "description": "Ask for a refill -> {\"refill\": id}",
                        "url": "{{site}}/api/v2",
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "key",
                                    "value": "{{api_key}}"
                                },
                                {
                                    "key": "action",
                                    "value": "refill"
                                },
                                {
                                    "key": "order",
                                    "value": ""
                                },
                                {
                                    "key": "orders",
                                    "value": ""
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "refill_status",
                    "request": {
                        "method": "POST",
                        "description": "Pending / In progress / Completed / Rejected",
                        "url": "{{site}}/api/v2",
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "key",
                                    "value": "{{api_key}}"
                                },
                                {
                                    "key": "action",
                                    "value": "refill_status"
                                },
                                {
                                    "key": "refill",
                                    "value": ""
                                },
                                {
                                    "key": "refills",
                                    "value": ""
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "cancel",
                    "request": {
                        "method": "POST",
                        "description": "Cancel where the service allows it",
                        "url": "{{site}}/api/v2",
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "key",
                                    "value": "{{api_key}}"
                                },
                                {
                                    "key": "action",
                                    "value": "cancel"
                                },
                                {
                                    "key": "orders",
                                    "value": ""
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "balance",
                    "request": {
                        "method": "POST",
                        "description": "Your wallet balance in USD",
                        "url": "{{site}}/api/v2",
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "key",
                                    "value": "{{api_key}}"
                                },
                                {
                                    "key": "action",
                                    "value": "balance"
                                }
                            ]
                        }
                    }
                }
            ]
        }
    ]
}