---
agentTools:
  projectIndex: https://docs.mundipagg.com/llms.txt
---

# Editar item

Com o verbo _HTTP PUT_, através dos identificadores do item (`subscription_item_id`) e da assinatura (`subscription_id`) associada é possível atualizar os dados do item da assinatura.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Mundipagg API",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.mundipagg.com/core/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/subscriptions/{subscription_id}/items/{subscription_item_id}": {
      "put": {
        "summary": "Editar item",
        "description": "Com o verbo _HTTP PUT_, através dos identificadores do item (`subscription_item_id`) e da assinatura (`subscription_id`) associada é possível atualizar os dados do item da assinatura.",
        "operationId": "editar-item-da-assinatura",
        "parameters": [
          {
            "name": "subscription_id",
            "in": "path",
            "description": "Código da assinatura.<br>Formato: `sub_XXXXXXXXXXXXXXXX`.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "subscription_item_id",
            "in": "path",
            "description": "Código do item da assinatura.<br>Formato: `si_XXXXXXXXXXXXXXXX`.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "description",
            "in": "query",
            "description": "Descrição do item da assinatura.<br>Max: 256 caracteres.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Status do item da assinatura.<br>Valores possíveis: **active** ou **inactive**.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cycles",
            "in": "query",
            "description": "Indica quantas vezes o item será cobrado.<br>Caso não seja informado, o item será cobrado até que seja excluído o desativado.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "quantity",
            "in": "query",
            "description": "Quantidade de itens.<br>**Obrigatório** caso  **pricing_scheme.scheme_type** seja **unit**.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pricing_scheme",
            "in": "query",
            "description": "Esquema de precificação.<br>[Saiba mais sobre precificação](https://docs.mundipagg.com/v1/reference#precificacao)",
            "schema": {
              "properties": {},
              "type": "object"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Nome do item da assinatura.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"id\": \"si_mARl1OvTYcA3pG49\",\n  \"description\": \"Telefone\",\n  \"cycles\": 3,\n  \"quantity\": 1,\n  \"status\": \"active\",\n  \"created_at\": \"2017-04-04T18:56:44Z\",\n  \"updated_at\": \"2017-04-04T18:57:48Z\",\n  \"pricing_scheme\": {\n    \"price\": 99,\n    \"scheme_type\": \"unit\"\n  },\n  \"subscription\": {\n    \"id\": \"sub_o0Jw4WYCMuPNqzGr\",\n    \"code\": \"09NFPLBZY0\",\n    \"start_at\": \"2017-04-04T00:00:00Z\",\n    \"interval\": \"month\",\n    \"interval_count\": 1,\n    \"billing_type\": \"postpaid\",\n    \"next_billing_at\": \"2017-05-04T00:00:00Z\",\n    \"payment_method\": \"credit_card\",\n    \"currency\": \"BRL\",\n    \"statement_descriptor\": \"Spotify\",\n    \"installments\": 1,\n    \"status\": \"active\",\n    \"created_at\": \"2017-04-04T18:21:17\",\n    \"updated_at\": \"2017-04-04T18:21:17\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "si_mARl1OvTYcA3pG49"
                    },
                    "description": {
                      "type": "string",
                      "example": "Telefone"
                    },
                    "cycles": {
                      "type": "integer",
                      "example": 3,
                      "default": 0
                    },
                    "quantity": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "status": {
                      "type": "string",
                      "example": "active"
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2017-04-04T18:56:44Z"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2017-04-04T18:57:48Z"
                    },
                    "pricing_scheme": {
                      "type": "object",
                      "properties": {
                        "price": {
                          "type": "integer",
                          "example": 99,
                          "default": 0
                        },
                        "scheme_type": {
                          "type": "string",
                          "example": "unit"
                        }
                      }
                    },
                    "subscription": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "sub_o0Jw4WYCMuPNqzGr"
                        },
                        "code": {
                          "type": "string",
                          "example": "09NFPLBZY0"
                        },
                        "start_at": {
                          "type": "string",
                          "example": "2017-04-04T00:00:00Z"
                        },
                        "interval": {
                          "type": "string",
                          "example": "month"
                        },
                        "interval_count": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "billing_type": {
                          "type": "string",
                          "example": "postpaid"
                        },
                        "next_billing_at": {
                          "type": "string",
                          "example": "2017-05-04T00:00:00Z"
                        },
                        "payment_method": {
                          "type": "string",
                          "example": "credit_card"
                        },
                        "currency": {
                          "type": "string",
                          "example": "BRL"
                        },
                        "statement_descriptor": {
                          "type": "string",
                          "example": "Spotify"
                        },
                        "installments": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "status": {
                          "type": "string",
                          "example": "active"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2017-04-04T18:21:17"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2017-04-04T18:21:17"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"message\": \"Item not found.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Item not found."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "csharp",
              "code": "using MundiAPI.PCL;\nusing MundiAPI.PCL.Models;\nusing System.Web.Mvc;\n\nnamespace MundipaggTest.Controllers {\n\n    public class HomeController : Controller {\n\n    public ActionResult Index() {\n\n    // Secret key fornecida pela Mundipagg\n    string basicAuthUserName = \"SUA_CHAVE_SECRETA\";\n    // Senha em branco. Passando apenas a secret key\n    string basicAuthPassword = \"\";\n\n    var client = new MundiAPIClient(basicAuthUserName, basicAuthPassword);\n\n     string subscrptionId = \"sub_05jkdIfGYPfN26mI\";\n     string subscriptionItemId = \"si_mARl1OvTYcA3pG49\";\n\n    var request = new UpdateSubscriptionItemRequest {\n        Description = \"Telefone\",\n        Status = \"active\",\n        Cycles = 3,\n        Quantity = 1,\n        PricingScheme = new UpdatePricingSchemeRequest {\n            Price = 99\n        }\n    };\n\n    var response = client.Subscriptions.UpdateSubscriptionItem(subscrptionId, subscriptionItemId, request);\n\n    return View();\n    }\n}\n}",
              "name": "SDK C#"
            }
          ],
          "samples-languages": [
            "csharp"
          ]
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {},
              "examples": {
                "Request Example": {
                  "value": {
                    "name": "Nome - teste",
                    "description": "Telefone",
                    "status": "active",
                    "cycles": 3,
                    "quantity": 1,
                    "pricing_scheme": {
                      "price": 99
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true,
  "_id": "5aba89f6b169810058a71e9a:5aba89f6b169810058a71edb"
}
```