---
updatedAt: 2025-09-25T19:46:37.000Z
---

Fetch the complete documentation index at: https://www.refersion.dev/llms.txt. Use this file to discover all available pages before exploring further.

# Change Affiliates Status

Set a new status value for a list of affiliate IDs. Limit of 50 IDs per call.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "REST API Documentation",
    "version": "2.0",
    "description": "The Refersion APIs are organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer), which is easily accessible using most modern programming languages. Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. In addition, valid JSON will be returned in all responses from the API, including errors.\nThe API keys used in examples in this documentation are not registered to your account and are inactive.",
    "contact": {
      "email": "helpme@refersion.com",
      "url": "https://www.refersion.com",
      "name": "Refersion Inc"
    },
    "license": {
      "name": ""
    },
    "termsOfService": "https://www.refersion.com/terms",
    "x-readme": {
      "explorer-enabled": false
    }
  },
  "paths": {
    "/affiliate/status_change": {
      "post": {
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ids_changed": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "example": [
                        1,
                        3
                      ]
                    },
                    "ids_not_changed": {
                      "type": "array",
                      "items": {
                        "type": "integer"
                      },
                      "example": [
                        2,
                        4
                      ]
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "ids_changed": [
                        1,
                        3
                      ],
                      "ids_not_changed": [
                        2,
                        4
                      ]
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "Theres an invalid field in the request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "error": "Invalid field X"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "There's a missing required field in your request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "error": "Missing required field X"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401_Error"
          },
          "404": {
            "description": "An empty request body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "error": "Bad request, no body"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity: the data that you’re sending has errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "Change Affiliates Status",
        "description": "Set a new status value for a list of affiliate IDs. Limit of 50 IDs per call.",
        "operationId": "affiliate_status_change",
        "tags": [
          "Affiliates"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Refersion-Public-Key"
          },
          {
            "$ref": "#/components/parameters/Refersion-Secret-Key"
          },
          {
            "$ref": "#/components/parameters/Content-Type"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    },
                    "description": "One or more Affiliate IDs to change.",
                    "example": [
                      1,
                      2,
                      3,
                      4
                    ]
                  },
                  "status": {
                    "type": "string",
                    "description": "A valid status value. Accepted values are: ACTIVE, DENIED, DISABLED",
                    "enum": [
                      "ACTIVE",
                      "DENIED",
                      "DISABLED"
                    ]
                  }
                },
                "required": [
                  "ids",
                  "status"
                ]
              }
            }
          },
          "x-examples": {
            "application/json": {
              "ids": [
                1,
                2,
                3,
                4
              ],
              "status": "ACTIVE"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Affiliates"
    }
  ],
  "servers": [
    {
      "url": "https://api.refersion.com/v2"
    }
  ],
  "components": {
    "parameters": {
      "Refersion-Public-Key": {
        "in": "header",
        "name": "Refersion-Public-Key",
        "schema": {
          "type": "string",
          "example": "pub_abc12300000000000000"
        }
      },
      "Refersion-Secret-Key": {
        "in": "header",
        "name": "Refersion-Secret-Key",
        "schema": {
          "type": "string",
          "example": "sec_abc12300000000000000"
        }
      },
      "Content-Type": {
        "in": "header",
        "name": "Content-Type",
        "schema": {
          "type": "string",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      }
    },
    "responses": {
      "401_Error": {
        "description": "Unauthorized – Your API keys are incorrect.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "response": {
                "value": {
                  "error": "Invalid API credentials (error 2)."
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```