ApiResourcesAffiliates

Update affiliate status

Approve, disable, re-enable, or reject a store affiliate.

The transition must be valid for the current state. A pending invitation cannot become active until the invitee submits an application.

PATCH
/v2/affiliates/{affiliate}/status

Authorization

bearerAuth storeAuth
AuthorizationBearer <token>

Provide your SellApp API key as a bearer token.

In: header

X-STORE<token>

Select the SellApp store for this API request.

In: header

Path Parameters

affiliate*integer

The affiliate path parameter.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://sell.app/api/v2/affiliates/0/status" \  -H "Content-Type: application/json" \  -d '{    "status": "active"  }'
{
  "data": {
    "id": 0,
    "email": "user@example.com",
    "status": "pending",
    "reason": "string",
    "payout_method": "string",
    "profile": {
      "id": 0,
      "identifier": "string",
      "bio": "string",
      "sites": [
        "http://example.com"
      ],
      "socials": [
        "http://example.com"
      ],
      "status": "pending",
      "email_subscribers": "string",
      "web_visitors": "string"
    },
    "balances": {
      "available_usd_cents": 0,
      "pending_usd_cents": 0,
      "paid_usd_cents": 0
    },
    "referrals_count": 0,
    "payouts_count": 0,
    "invited_at": "2019-08-24T14:15:22Z",
    "application_submitted_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "message": "Unauthenticated."
}
{
  "message": "This action is unauthorized."
}
{
  "message": "Rule not found."
}
{
  "message": "The given data was invalid.",
  "errors": {
    "data": [
      "The data field is required."
    ]
  }
}