---
title: "Incluir item"
url: "https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5/operations/incluir-item-2"
---

> Full API specification: https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5.md

# Incluir item

`POST` `/plans/{plan_id}/items`

Operation ID: `incluir-item-2`

Através do identificador do plano (`plan_id`) é possível incluir itens ao plano associado.

## Path parameters

- `plan_id` (string, required) - Código do plano.<br>Formato: `plan_XXXXXXXXXXXXXXXX`

## Request body

Content types: `application/json`

## Responses

- `200` - 200
- `404` - 404
- `412` - 412

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Pagar.me v5 API (Legado)
  version: 5.0.0
servers:
  - url: https://api.stone.com.br/core/v5
paths:
  /plans/{plan_id}/items:
    post:
      summary: Incluir item
      description: Através do identificador do plano (`plan_id`) é possível incluir
        itens ao plano associado.
      operationId: incluir-item-2
      parameters:
        - name: plan_id
          in: path
          description: "Código do plano.<br>Formato: `plan_XXXXXXXXXXXXXXXX`"
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - pricing_scheme
              properties:
                name:
                  type: string
                  description: "Nome do item. <br>Max.: 64 caracteres."
                description:
                  type: string
                  description: "Descrição do item. <br>Max.: 256 caracteres."
                quantity:
                  type: integer
                  description: Quantidade de itens. <br>**Obrigatório**, caso o
                    pricing_scheme.type for igual a **unit**.
                  format: int32
                cycles:
                  type: integer
                  description: "Número de ciclos durante o qual o item será cobrado. Ex: Um item
                    com `cycles` = 1 representa que um item será cobrado apenas
                    uma vez.<br>Caso não seja informado, o item será cobrado até
                    que seja desativado."
                  format: int32
                pricing_scheme:
                  type: object
                  description: Esquema de precificação. <br>[Saiba mais sobre
                    precificação](https://docs.pagar.me/reference/precifica%C3%A7%C3%A3o).
                  required:
                    - scheme_type
                  properties:
                    scheme_type:
                      type: string
                      description: "Esquema de precificação do item. Valores possíveis: **unit**,
                        **package**, **volume** e **tier**. Valor default: unit"
                      default: Unit
                    price:
                      type: integer
                      description: "Valor do item. Este atributo está disponível para o scheme_type :
                        **Unit**"
                      format: int32
                    mininum_price:
                      type: integer
                      description: Valor mínimo a ser cobrado.
                      format: int32
                    price_brackets:
                      type: array
                      description: "Intervalo de preços. Este atributo está disponível para os
                        scheme_type : **package**, **volume** e **tier**."
                      items:
                        properties:
                          start_quantity:
                            type: integer
                            description: Valor que define a quantidade inicial de unidades do intervalo.
                            format: int32
                          end_quantity:
                            type: integer
                            description: Valor que define a quantidade final de unidades do intervalo.
                            format: int32
                          overage_price:
                            type: integer
                            description: Valor para cálculo do preço por unidade que exceder o intervalo.
                            format: int32
                          price:
                            type: integer
                            description: "Valor para cálculo do preço dentro do intervalo. OBS: o preço a
                              ser cobrado do cliente será calculado de acordo
                              com a quantidade e o scheme_type"
                            format: int32
                        type: object
            examples:
              Request Example:
                value:
                  name: Avaliação física
                  cycles: 1
                  quantity: 1
                  pricing_scheme:
                    price: 9990
                    scheme_type: unit
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "id": "pi_eBTaVnXD8Zhb8glr",
                      "name": "Avaliação física",
                      "cycles": 1,
                      "status": "active",
                      "created_at": "2016-07-12T18:25:40Z",
                      "updated_at": "2016-07-12T18:25:40Z",
                      "pricing_scheme": {
                        "price": 9990,
                        "scheme_type": "unit"
                      },
                      "plan": {
                        "id": "plan_21r4CTG0ux77Qv13",
                        "name": "Plano Gold",
                        "url": "/plan_21r4CTG0ux77Qv13/academia/plano-gold",
                        "currency": "BRL",
                        "interval": "month",
                        "interval_count": 3,
                        "billing_type": "prepaid",
                        "installments": 3,
                        "status": "active",
                        "created_at": "2016-07-12T17:25:40Z",
                        "updated_at": "2016-07-12T17:25:40Z",
                        "metadata": {
                          "id": "my_plan_id"
                        }
                      }
                    }
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: pi_eBTaVnXD8Zhb8glr
                  name:
                    type: string
                    example: Avaliação física
                  cycles:
                    type: integer
                    example: 1
                    default: 0
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: 2016-07-12T18:25:40Z
                  updated_at:
                    type: string
                    example: 2016-07-12T18:25:40Z
                  pricing_scheme:
                    type: object
                    properties:
                      price:
                        type: integer
                        example: 9990
                        default: 0
                      scheme_type:
                        type: string
                        example: unit
                  plan:
                    type: object
                    properties:
                      id:
                        type: string
                        example: plan_21r4CTG0ux77Qv13
                      name:
                        type: string
                        example: Plano Gold
                      url:
                        type: string
                        example: /plan_21r4CTG0ux77Qv13/academia/plano-gold
                      currency:
                        type: string
                        example: BRL
                      interval:
                        type: string
                        example: month
                      interval_count:
                        type: integer
                        example: 3
                        default: 0
                      billing_type:
                        type: string
                        example: prepaid
                      installments:
                        type: integer
                        example: 3
                        default: 0
                      status:
                        type: string
                        example: active
                      created_at:
                        type: string
                        example: 2016-07-12T17:25:40Z
                      updated_at:
                        type: string
                        example: 2016-07-12T17:25:40Z
                      metadata:
                        type: object
                        properties:
                          id:
                            type: string
                            example: my_plan_id
        "404":
          description: "404"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "message": "Plan not found."
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Plan not found.
        "412":
          description: "412"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "message": "The request is invalid.",
                        "errors": {
                            "item.name": [
                                "The name field is required."
                            ]
                        },
                        "request": {
                            "quantity": 1,
                            "cycles": 1,
                            "pricing_scheme": {
                                "price": 99,
                                "scheme_type": "unit"
                            }
                        }
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The request is invalid.
                  errors:
                    type: object
                    properties:
                      item.name:
                        type: array
                        items:
                          type: string
                          example: The name field is required.
                  request:
                    type: object
                    properties:
                      quantity:
                        type: integer
                        example: 1
                        default: 0
                      cycles:
                        type: integer
                        example: 1
                        default: 0
                      pricing_scheme:
                        type: object
                        properties:
                          price:
                            type: integer
                            example: 99
                            default: 0
                          scheme_type:
                            type: string
                            example: unit
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
