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

# Editar item do pedido

Quando um pedido está **aberto**, você pode editar os itens dele.

# 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": {
    "/orders/{order_id}/items/{order_item_id}": {
      "put": {
        "summary": "Editar item do pedido",
        "description": "Quando um pedido está **aberto**, você pode editar os itens dele.",
        "operationId": "editar-item-do-pedido",
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "description": "Código do carrinho",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "order_item_id",
            "in": "path",
            "description": "Código do item do pedido",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "amount",
                  "description",
                  "quantity"
                ],
                "properties": {
                  "amount": {
                    "type": "integer",
                    "description": "Valor do item.",
                    "format": "int32"
                  },
                  "description": {
                    "type": "string",
                    "description": "Descrição do item. Max: 256 caracteres."
                  },
                  "quantity": {
                    "type": "integer",
                    "description": "Quantidade de itens.",
                    "format": "int32"
                  },
                  "category": {
                    "type": "string",
                    "description": "Categoria do item. Max: 64 caracteres."
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "amount": 1090,
                    "description": "Água com gás",
                    "quantity": 2
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"id\": \"oi_AQKqAnGhQGsYd1b6\",\n  \"description\": \"Água com gás\",\n  \"amount\": 1090,\n  \"quantity\": 2,\n  \"status\": \"active\",\n  \"created_at\": \"2017-04-05T03:55:48\",\n  \"updated_at\": \"2017-04-05T05:05:14\",\n  \"order\": {\n    \"id\": \"or_5OKyl9fNwIKDzjWJ\",\n    \"code\": \"7P03S0FOQN\",\n    \"amount\": 6260,\n    \"currency\": \"BRL\",\n    \"closed\": false,\n    \"status\": \"pending\",\n    \"created_at\": \"2017-04-05T03:54:42\",\n    \"updated_at\": \"2017-04-05T03:54:42\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "oi_AQKqAnGhQGsYd1b6"
                    },
                    "description": {
                      "type": "string",
                      "example": "Água com gás"
                    },
                    "amount": {
                      "type": "integer",
                      "example": 1090,
                      "default": 0
                    },
                    "quantity": {
                      "type": "integer",
                      "example": 2,
                      "default": 0
                    },
                    "status": {
                      "type": "string",
                      "example": "active"
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2017-04-05T03:55:48"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2017-04-05T05:05:14"
                    },
                    "order": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "or_5OKyl9fNwIKDzjWJ"
                        },
                        "code": {
                          "type": "string",
                          "example": "7P03S0FOQN"
                        },
                        "amount": {
                          "type": "integer",
                          "example": 6260,
                          "default": 0
                        },
                        "currency": {
                          "type": "string",
                          "example": "BRL"
                        },
                        "closed": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "status": {
                          "type": "string",
                          "example": "pending"
                        },
                        "created_at": {
                          "type": "string",
                          "example": "2017-04-05T03:54:42"
                        },
                        "updated_at": {
                          "type": "string",
                          "example": "2017-04-05T03:54:42"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "csharp",
              "code": "// Neste exemplo estamos utilizando A sdk C# MundiAPI.PCL\n// Secret key fornecida pela Mundipagg\nstring basicAuthUserName = \"SUA_CHAVE_SECRETA;\n// Senha em branco. Passando apenas a secret key\nstring basicAuthPassword = \"\";\nvar client = new MundiAPIClient(basicAuthUserName, basicAuthPassword);\n\nvar item = new UpdateOrderItemRequest {\n    Amount = 10,\n    Category = \"Mark 1 Gloves\",\n    Description = \"Glove\",\n    Quantity = 1,\n};\nvar request = client.Orders.UpdateOrderItem(\"or_JQ35ED8izte8BN9k\",\"oi_XAYlREWTbT2ngZLy\",item);",
              "name": "SDK C#"
            }
          ],
          "samples-languages": [
            "csharp"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true,
  "_id": "5aba89f6b169810058a71e9a:5aba89f6b169810058a71ee7"
}
```