{
  "opencollection": "1.0.0",
  "info": {
    "name": "FirstPromoter Commissions API",
    "version": "2.0.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Commissions",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get all commissions",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.firstpromoter.com/api/v2/company/commissions",
            "headers": [
              {
                "name": "Account-ID",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "q",
                "value": "",
                "type": "query",
                "description": "Search params. Searches by event_id, referral.email, referral.uid"
              },
              {
                "name": "ids[]",
                "value": "",
                "type": "query",
                "description": "Array of commission ids to get"
              },
              {
                "name": "filters",
                "value": "",
                "type": "query"
              },
              {
                "name": "sorting",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "With this endpoint you can list all rewards and commissions assigned to a promotion, promoter, campaign or entire account using the API. \n <Tip>**HTTP Request** <br/>`GET https://api.firstpromoter.com/api/v2/company/commissions`</Tip>"
        },
        {
          "info": {
            "name": "Create a commission",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.firstpromoter.com/api/v2/company/commissions",
            "headers": [
              {
                "name": "Account-ID",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "With this endpoint you can create a commission. \n <Tip>**HTTP Request** <br/>`POST https://api.firstpromoter.com/api/v2/company/commissions`</Tip>"
        },
        {
          "info": {
            "name": "Update a commission",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.firstpromoter.com/api/v2/company/commissions/:id",
            "headers": [
              {
                "name": "Account-ID",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "Id of the commission"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "With this endpoint you can update a commission. \n <Tip>**HTTP Request** <br/>`PUT https://api.firstpromoter.com/api/v2/company/commissions/{id}`</Tip>"
        },
        {
          "info": {
            "name": "Approve commissions",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.firstpromoter.com/api/v2/company/commissions/approve",
            "headers": [
              {
                "name": "Account-ID",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "With this endpoint you can approve commissions. \n <Note>If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`</Note> \n <Tip>**HTTP Request** <br/>`POST https://api.firstpromoter.com/api/v2/company/commissions/approve`</Tip>"
        },
        {
          "info": {
            "name": "Deny commissions",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.firstpromoter.com/api/v2/company/commissions/deny",
            "headers": [
              {
                "name": "Account-ID",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "With this endpoint you can deny commissions. \n <Note>If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`</Note> \n  <Tip>**HTTP Request** <br/>`POST https://api.firstpromoter.com/api/v2/company/commissions/deny`</Tip>"
        },
        {
          "info": {
            "name": "Mark nonmonetary commissions as fulfilled",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.firstpromoter.com/api/v2/company/commissions/mark_fulfilled",
            "headers": [
              {
                "name": "Account-ID",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "With this endpoint you can mark nonmonetary commissions as fulfilled. \n <Tip>**HTTP Request** <br/>`POST https://api.firstpromoter.com/api/v2/company/commissions/mark_fulfilled`</Tip>"
        },
        {
          "info": {
            "name": "Mark nonmonetary commissions as unfulfilled",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.firstpromoter.com/api/v2/company/commissions/mark_unfulfilled",
            "headers": [
              {
                "name": "Account-ID",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "With this endpoint you can mark nonmonetary commissions as unfulfilled. \n <Tip>**HTTP Request** <br/>`POST https://api.firstpromoter.com/api/v2/company/commissions/mark_unfulfilled`</Tip>"
        },
        {
          "info": {
            "name": "Delete commissions",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.firstpromoter.com/api/v2/company/commissions/destroy",
            "headers": [
              {
                "name": "Account-ID",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "With this endpoint you can delete commissions. \n <Tip>**HTTP Request** <br/>`DELETE https://api.firstpromoter.com/api/v2/company/commissions/destroy`</Tip>"
        },
        {
          "info": {
            "name": "Generate payouts for commissions",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.firstpromoter.com/api/v2/company/commissions/generate_payouts",
            "headers": [
              {
                "name": "Account-ID",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "With this endpoint you can generate payouts for commissions. \n <Note>If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`</Note> \n <Tip>**HTTP Request** <br/>`POST https://api.firstpromoter.com/api/v2/company/commissions/generate_payouts`</Tip>"
        }
      ]
    }
  ],
  "bundled": true
}