{
  "opencollection": "1.0.0",
  "info": {
    "name": "OpenCart REST Affiliates API",
    "version": "4.0"
  },
  "request": {
    "auth": {
      "type": "apikey",
      "key": "api_token",
      "value": "{{api_token}}",
      "placement": "query"
    }
  },
  "items": [
    {
      "info": {
        "name": "Affiliates",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Set affiliate for the current session",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://yourstore.com/index.php?route=api/affiliate",
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "api_token",
                  "value": ""
                },
                {
                  "name": "affiliate_id",
                  "value": ""
                }
              ]
            }
          },
          "docs": "Associates an affiliate with the current API session. Validates that the affiliate exists and that the order subtotal is valid.\n"
        }
      ]
    }
  ],
  "bundled": true
}