SelectwinDOCS
Products

Products - Update (PATCH)

Atualização parcial do produto (PATCH): nome, categoria, flags, etc., sem substituir o recurso inteiro.

PATCH
/v1/products/{productId}

Atualização parcial do produto (PATCH): nome, categoria, flags, etc., sem substituir o recurso inteiro.

Authorization

SelectKeyAuth
selectkey<token>

API key for all authenticated requests. Send your key in the selectkey header (e.g. sandbox sl_test_…, production sl_live_…).

In: header

Path Parameters

productId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Atualização parcial (PUT ou PATCH): envie pelo menos um campo no corpo além do productId na URL.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/products/prd_01hqzvabc" \  -H "Content-Type: application/json" \  -d '{    "name": "Premium Course",    "slug": "premium-course",    "description": "Example text",    "enabled": true,    "type": "digital",    "language": "pt",    "category": "courses",    "externalReference": "Example text",    "warrantyDays": 30,    "salesPage": "https://loja.com/premium"  }'
{
  "id": "prd_01hqzvabc",
  "enabled": true,
  "name": "Plano Premium",
  "type": "digital",
  "language": "pt-BR",
  "category": "saas",
  "slug": "plano-premium",
  "images": [
    "https://cdn.selectwin.io/p/img1.png"
  ],
  "warrantyDays": 30,
  "variants": [
    {
      "id": "var_01hqzvabc",
      "name": "Mensal",
      "enabled": true,
      "description": "Monthly billing",
      "sku": "SKU-M",
      "pricing": {
        "oldPrice": 14900,
        "unitPrice": 9900,
        "currency": "BRL",
        "schema": "unit",
        "type": "recurring",
        "daysTrial": 7,
        "billingType": "prepaid",
        "billingFrequency": "monthly",
        "billingFrequencyCount": 1,
        "billingExactDay": 10,
        "cycles": 12,
        "trialInterval": "day",
        "trialIntervalCount": 7
      },
      "images": [
        "https://cdn.selectwin.io/v/var.png"
      ],
      "metadata": {
        "tier": "pro"
      },
      "externalReference": "VAR-EXT-1",
      "attributes": {},
      "updatedAt": "2026-04-12T17:56:33.000Z",
      "createdAt": "2026-04-12T17:56:33.000Z"
    }
  ],
  "updatedAt": "2026-04-12T17:56:33.000Z",
  "createdAt": "2026-04-12T17:56:33.000Z"
}
{
  "error": {
    "status": "Bad Request",
    "statusCode": 400,
    "category": "validation",
    "message": "Validation errors occurred",
    "details": "One or more parameters are invalid or out of range. Please check the parameters and try again.",
    "params": [
      {
        "payment[currency]": "currency must be one of [BRL]"
      },
      {
        "amount": "amount is required"
      }
    ],
    "code": "invalidParameters",
    "resource": "client"
  }
}
{
  "error": {
    "status": "Unauthorized",
    "statusCode": 401,
    "category": "authentication",
    "message": "Unauthorized",
    "details": "Authentication failed. The provided API key is invalid or does not have permission to operate.",
    "code": "unauthorized"
  }
}
{
  "error": {
    "status": "Forbidden",
    "statusCode": 403,
    "category": "authorization",
    "message": "Forbidden",
    "details": "Access denied. This may be due to IP blocks, domain restrictions, or insufficient permissions.",
    "code": "forbidden"
  }
}
{
  "error": {
    "status": "Not Found",
    "statusCode": 404,
    "category": "client",
    "message": "Not Found",
    "details": "The requested resource was not found on the server.",
    "code": "notFound"
  }
}
{
  "error": {
    "status": "Unprocessable Entity",
    "statusCode": 422,
    "category": "validation",
    "message": "Unprocessable Entity",
    "details": "The request was understood, but contains invalid data that could not be processed.",
    "code": "unprocessableEntity"
  }
}
{
  "error": {
    "status": "Too Many Requests",
    "statusCode": 429,
    "category": "rate_limit",
    "message": "Too Many Requests",
    "details": "The number of requests exceeded the limit allowed for the IP or user.",
    "retryAfterMinutes": 60,
    "code": "tooManyRequests"
  }
}
{
  "error": {
    "status": "Internal Server Error",
    "statusCode": 500,
    "category": "server",
    "message": "Server error.",
    "details": "An internal server error occurred. Please try again later.",
    "code": "serverError",
    "resource": "server"
  }
}