{
  "info": {
    "name": "RL Sell Partner API v2",
    "description": "Server-side Partner API v2. Use only an approved environment and an issued v2 key linked to your Telegram profile. This package alone does not prove deployment. Run read-only folders first; DO NOT Run all because purchase, quote, confirmation, webhook-change, test-event and replay requests are deliberate mutations. Save keys and exact bodies before sending; never invent a new key after a timeout. Public IDs and fields come from your catalog. Amounts are decimal strings. The example max_total is a ceiling placeholder, not a quoted price. Import privately and do not sync/export a populated api_key.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-API-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{api_key}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.example.invalid/b2b/v2",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "",
      "type": "string"
    },
    {
      "key": "search",
      "value": "",
      "type": "string"
    },
    {
      "key": "catalog_since",
      "value": "0"
    },
    {
      "key": "product_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "offer_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "price_version",
      "value": "",
      "type": "string"
    },
    {
      "key": "order_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "quote_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "max_total",
      "value": "10.00",
      "type": "string"
    },
    {
      "key": "fields",
      "value": "{}",
      "type": "string"
    },
    {
      "key": "order_idempotency_key",
      "value": "",
      "type": "string"
    },
    {
      "key": "quote_idempotency_key",
      "value": "",
      "type": "string"
    },
    {
      "key": "confirm_idempotency_key",
      "value": "",
      "type": "string"
    },
    {
      "key": "webhook_url",
      "value": "https://partner.example/hook",
      "type": "string"
    },
    {
      "key": "variable_offer_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "delivery_id",
      "value": ""
    },
    {
      "key": "app_id",
      "value": "252490"
    },
    {
      "key": "gift_edition_id",
      "value": "sub:244390"
    },
    {
      "key": "gift_region",
      "value": "RU"
    },
    {
      "key": "gift_app_ids",
      "value": "252490,1245620"
    },
    {
      "key": "recipient_url",
      "value": "https://s.team/p/abcd-efgh/ABCDEFGH"
    },
    {
      "key": "marketplace",
      "value": "ggsel"
    },
    {
      "key": "external_order_id",
      "value": ""
    },
    {
      "key": "max_unit_price",
      "value": ""
    },
    {
      "key": "session_id",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "1. Verify key and balance",
      "item": [
        {
          "name": "Profile and Telegram loyalty",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/me",
            "description": "Read-only. Fill public IDs from your catalog. Never derive IDs from names or recipient data."
          }
        },
        {
          "name": "Available and reserved balance",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/balance",
            "description": "Read-only. Fill public IDs from your catalog. Never derive IDs from names or recipient data."
          }
        }
      ]
    },
    {
      "name": "2. Read catalog",
      "item": [
        {
          "name": "Search products",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/catalog/products?search={{search}}&limit=20",
            "description": "Read-only. Fill public IDs from your catalog. Never derive IDs from names or recipient data."
          }
        },
        {
          "name": "Filter values (facets)",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/catalog/facets",
            "description": "Read-only. Categories, regions and platforms with product counts; use the values as filters."
          }
        },
        {
          "name": "Product and offers",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/catalog/products/{{product_id}}",
            "description": "Read-only. Fill public IDs from your catalog. Never derive IDs from names or recipient data."
          }
        },
        {
          "name": "Offers of a product",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/catalog/products/{{product_id}}/offers",
            "description": "Read-only. Fill public IDs from your catalog. Never derive IDs from names or recipient data."
          }
        },
        {
          "name": "Price, stock and input fields",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/catalog/offers/{{offer_id}}",
            "description": "Read-only. Fill public IDs from your catalog. Never derive IDs from names or recipient data."
          }
        },
        {
          "name": "Look up known offers",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{base_url}}/catalog/offers/lookup",
            "description": "Read-only. Fill public IDs from your catalog. Never derive IDs from names or recipient data. This POST does not buy or reserve anything.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"offer_ids\": [\"{{offer_id}}\"]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Catalog changes since a revision",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/catalog/changes?since={{catalog_since}}&limit=200",
            "description": "Read-only. Start with since=0, follow next_cursor, then store next_since for the next poll."
          }
        }
      ]
    },
    {
      "name": "3. Fixed order — send deliberately",
      "item": [
        {
          "name": "Accept one fixed order",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{order_idempotency_key}}"
              }
            ],
            "url": "{{base_url}}/orders",
            "description": "Deliberate operation. Do not use Run all. Fill a unique key for this operation, save the exact body and key before Send, and reuse both after an uncertain response. Never change the key merely to retry. Choose kind=fixed and availability=available. fields must match input_schema.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"offer_id\": \"{{offer_id}}\",\n  \"price_version\": \"{{price_version}}\",\n  \"max_total\": \"{{max_total}}\",\n  \"fields\": {{fields}},\n  \"quantity\": 1\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Reconcile by saved purchase key",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/orders?reference_id={{order_idempotency_key}}",
            "description": "Read-only. Fill public IDs from your catalog. Never derive IDs from names or recipient data."
          }
        },
        {
          "name": "Read order status",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/orders/{{order_id}}",
            "description": "Read-only. Fill public IDs from your catalog. Never derive IDs from names or recipient data."
          }
        },
        {
          "name": "Read verified issued codes",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/orders/{{order_id}}/codes",
            "description": "Read-only. Fill public IDs from your catalog. Never derive IDs from names or recipient data. Requires codes:read and a completed, settled, fully delivered order. Treat codes as secrets."
          }
        }
      ]
    },
    {
      "name": "4. Quote — create, then confirm deliberately",
      "item": [
        {
          "name": "Prepare an unpaid quote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{quote_idempotency_key}}"
              }
            ],
            "url": "{{base_url}}/quotes",
            "description": "Deliberate operation. Do not use Run all. Fill a unique key for this operation, save the exact body and key before Send, and reuse both after an uncertain response. Never change the key merely to retry. Choose kind=variable. In live this may create an unpaid reservation.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"offer_id\": \"{{variable_offer_id}}\",\n  \"fields\": {{fields}}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Read the saved quote",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/quotes/{{quote_id}}",
            "description": "Read the existing quote; live may reconcile its existing unpaid reservation. Wait for ready and check expires_at and amount. No new purchase is accepted here."
          }
        },
        {
          "name": "Confirm the exact quote",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{confirm_idempotency_key}}"
              }
            ],
            "url": "{{base_url}}/quotes/{{quote_id}}/confirm",
            "description": "Deliberate operation. Do not use Run all. Fill a unique key for this operation, save the exact body and key before Send, and reuse both after an uncertain response. Never change the key merely to retry. Confirm only ready and unexpired quotes, with an agreed maximum. This confirmation has its own key; retries keep that confirmation key.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"max_total\": \"{{max_total}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "5. Webhook configuration — operator provisions signing secret",
      "item": [
        {
          "name": "Read webhook status",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/webhooks/config",
            "description": "Read-only. Fill public IDs from your catalog. Never derive IDs from names or recipient data."
          }
        },
        {
          "name": "Set public HTTPS URL",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{base_url}}/webhooks/config",
            "description": "Deliberate configuration change. Operator must provision the signing secret first. Does not send a test event.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"{{webhook_url}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Disable webhook",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{base_url}}/webhooks/config",
            "description": "Deliberate configuration change. Disables delivery and preserves the signing secret.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": null\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Delivery history",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/webhooks/deliveries?limit=50",
            "description": "Newest first, without event bodies. Pass next_cursor as cursor for older rows."
          }
        },
        {
          "name": "Queue a signed test event",
          "request": {
            "method": "POST",
            "header": [],
            "url": "{{base_url}}/webhooks/test",
            "description": "Queues one webhook.test event signed like order events. Read the delivery history for the result."
          }
        },
        {
          "name": "Replay one delivery",
          "request": {
            "method": "POST",
            "header": [],
            "url": "{{base_url}}/webhooks/deliveries/{{delivery_id}}/replay",
            "description": "Sends the stored body again with a fresh signature; event_id is unchanged."
          }
        }
      ]
    },
    {
      "name": "6. Steam gifts — quote, then confirm deliberately",
      "item": [
        {
          "name": "Search games to gift",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/steam-gifts/games?search={{search}}",
            "description": "Without search: the showcase of popular games. With search: every game whose name matches, whatever the scope. total counts every matching game. Prices are yours."
          }
        },
        {
          "name": "Editions, regions and prices",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/steam-gifts/games/{{app_id}}",
            "description": "Prices per Steam price zone and per recipient link type (invite or profile); null means not sold."
          }
        },
        {
          "name": "Every game on sale, page by page",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/steam-gifts/games?scope=all&limit=200&cursor=0",
            "description": "scope=all lists every game on sale in ascending app_id order, so the pages stay stable while you read them. Follow next_cursor until it is null; total counts every game."
          }
        },
        {
          "name": "Prices of several games",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/steam-gifts/prices?app_ids={{gift_app_ids}}",
            "description": "Editions, regions and prices of up to 50 games in one request (comma-separated app_ids), each region with updated_at. not_found lists the app_ids that are not in the gift catalogue. Use it to keep your prices current instead of reading the games one by one."
          }
        },
        {
          "name": "Steam price zones and countries",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/steam-gifts/regions",
            "description": "Every region a gift quote accepts, with the ISO countries it covers. A quote may send the recipient's country instead of the region."
          }
        },
        {
          "name": "Price one gift",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{quote_idempotency_key}}"
              }
            ],
            "url": "{{base_url}}/steam-gifts/quotes",
            "description": "Deliberate operation. Do not use Run all. Fill a unique key for this operation, save the exact body and key before Send, and reuse both after an uncertain response. Never change the key merely to retry. Nothing is charged; the quote is valid for 15 minutes. The region must match the recipient's Steam account. Instead of region you may send country, the recipient's ISO 3166-1 country (e.g. BY); GET /steam-gifts/regions lists the countries of each region.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"app_id\": {{app_id}},\n  \"edition_id\": \"{{gift_edition_id}}\",\n  \"region\": \"{{gift_region}}\",\n  \"recipient_url\": \"{{recipient_url}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Read the gift quote",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/steam-gifts/quotes/{{quote_id}}",
            "description": "ready, expired, or consumed with its order_id."
          }
        },
        {
          "name": "Buy the quoted gift",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{confirm_idempotency_key}}"
              }
            ],
            "url": "{{base_url}}/steam-gifts/quotes/{{quote_id}}/confirm",
            "description": "Deliberate operation. Do not use Run all. Fill a unique key for this operation, save the exact body and key before Send, and reuse both after an uncertain response. Never change the key merely to retry. Debits the current price, never above the quote or max_total. Then read GET /orders/{order_id}; delivery waits for the recipient to accept a Steam friend request.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"max_total\": \"{{max_total}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Buy a gift in one request",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{order_idempotency_key}}"
              }
            ],
            "url": "{{base_url}}/steam-gifts/orders",
            "description": "Deliberate operation. Do not use Run all. Needs orders:write. Fill a unique key for this operation, save the exact body and key before Send, and reuse both after an uncertain response. Never change the key merely to retry. Prices the gift now and accepts the order, never above max_total; give region or country. A 202 is not delivery: read the order, whose steam_gift.delivery says what it waits for.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"app_id\": {{app_id}},\n  \"edition_id\": \"{{gift_edition_id}}\",\n  \"region\": \"{{gift_region}}\",\n  \"recipient_url\": \"{{recipient_url}}\",\n  \"max_total\": \"{{max_total}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "7. Delivery page for a marketplace order — create deliberately",
      "item": [
        {
          "name": "Check before the buyer pays",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{base_url}}/delivery-sessions/check",
            "description": "Read-only. Availability, price and problems with the buyer's values for a marketplace pre-payment check. Nothing is reserved.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"offer_id\": \"{{offer_id}}\",\n  \"quantity\": 1,\n  \"buyer_fields\": {{fields}}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Create the delivery page",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": "{{base_url}}/delivery-sessions",
            "description": "Deliberate operation. Check the marketplace order on your side first. Idempotent by marketplace and external_order_id: repeating the same body answers the same session. Nothing is charged until the buyer orders on the page, and never above max_unit_price.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"marketplace\": \"{{marketplace}}\",\n  \"external_order_id\": \"{{external_order_id}}\",\n  \"offer_id\": \"{{offer_id}}\",\n  \"quantity\": 1,\n  \"max_unit_price\": \"{{max_unit_price}}\",\n  \"buyer_fields\": {{fields}}\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Find the page of a marketplace order",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/delivery-sessions?marketplace={{marketplace}}&external_order_id={{external_order_id}}",
            "description": "Read-only. The newest session of this marketplace order; use it when a webhook was lost."
          }
        },
        {
          "name": "Read the delivery page",
          "request": {
            "method": "GET",
            "header": [],
            "url": "{{base_url}}/delivery-sessions/{{session_id}}",
            "description": "Read-only. result carries the codes only for a key with codes:read."
          }
        },
        {
          "name": "Cancel before the buyer orders",
          "request": {
            "method": "POST",
            "header": [],
            "url": "{{base_url}}/delivery-sessions/{{session_id}}/cancel",
            "description": "Deliberate operation. Works until the buyer places the order; afterwards 409 DELIVERY_SESSION_NOT_CANCELLABLE."
          }
        }
      ]
    }
  ]
}
