---
title: "Editar code de recebedor"
url: "https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5/operations/atualizar-code-de-recebedor"
---

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

# Editar code de recebedor

`PATCH` `/recipients/{recipient_id}/code`

Operation ID: `atualizar-code-de-recebedor`

## Path parameters

- `recipient_id` (string, required) - Identificador do recebedor

## Request body

Content types: `application/json`

## Responses

- `200` - 200
- `400` - 400

## 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:
  /recipients/{recipient_id}/code:
    patch:
      summary: Editar code de recebedor
      description: ""
      operationId: atualizar-code-de-recebedor
      parameters:
        - name: recipient_id
          in: path
          description: Identificador do recebedor
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - Code
              properties:
                Code:
                  type: string
                  description: Referencia externa única por recebedor
            examples:
              Request Example:
                value:
                  code: "123"
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "id": "rp_23452cBK6lP",
                        "name": "Tony Stark",
                        "email": "tstark@avengers.com",
                        "document": "223451990",
                        "description": "Recebedor Tony Stark",
                        "type": "individual",
                        "status": "active",
                        "created_at": "2018-05-23T16:17:39Z",
                        "updated_at": "2018-05-23T16:17:39Z",
                        "code": "123",
                        "transfer_settings": {
                            "transfer_enabled": false,
                            "transfer_interval": "Daily",
                            "transfer_day": 0
                        },
                        "default_bank_account": {
                            "id": "ba_2LYnR234Og",
                            "holder_name": "Tony Stark",
                            "holder_type": "individual",
                            "holder_document": "26224451990",
                            "bank": "341",
                            "branch_number": "12345",
                            "branch_check_digit": "6",
                            "account_number": "12345",
                            "account_check_digit": "6",
                            "type": "checking",
                            "status": "active",
                            "created_at": "2018-05-23T16:17:40Z",
                            "updated_at": "2018-05-23T16:17:40Z",
                            "metadata": {
                                "key": "value"
                            }
                        },
                          "automatic_anticipation_settings": {
                            "enabled": true,
                            "type": "full",
                            "volume_percentage": 50,
                            "delay": 365,
                            "days": [
                                1,
                                3,
                                5
                            ]
                        },
                        "gateway_recipients": [
                            {
                                "gateway": "pagarme",
                                "status": "active",
                                "pgid": "re_cjhjb34244o9jw6dyx5aizxn",
                                "createdAt": "2018-05-23T16:17:45Z",
                                "updatedAt": "2018-05-23T16:17:45Z"
                            }
                        ],
                        "metadata": {
                            "key": "value"
                        }
                    }
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: rp_23452cBK6lP
                  name:
                    type: string
                    example: Tony Stark
                  email:
                    type: string
                    example: tstark@avengers.com
                  document:
                    type: string
                    example: "223451990"
                  description:
                    type: string
                    example: Recebedor Tony Stark
                  type:
                    type: string
                    example: individual
                  status:
                    type: string
                    example: active
                  created_at:
                    type: string
                    example: 2018-05-23T16:17:39Z
                  updated_at:
                    type: string
                    example: 2018-05-23T16:17:39Z
                  code:
                    type: string
                    example: "123"
                  transfer_settings:
                    type: object
                    properties:
                      transfer_enabled:
                        type: boolean
                        example: false
                        default: true
                      transfer_interval:
                        type: string
                        example: Daily
                      transfer_day:
                        type: integer
                        example: 0
                        default: 0
                  default_bank_account:
                    type: object
                    properties:
                      id:
                        type: string
                        example: ba_2LYnR234Og
                      holder_name:
                        type: string
                        example: Tony Stark
                      holder_type:
                        type: string
                        example: individual
                      holder_document:
                        type: string
                        example: "26224451990"
                      bank:
                        type: string
                        example: "341"
                      branch_number:
                        type: string
                        example: "12345"
                      branch_check_digit:
                        type: string
                        example: "6"
                      account_number:
                        type: string
                        example: "12345"
                      account_check_digit:
                        type: string
                        example: "6"
                      type:
                        type: string
                        example: checking
                      status:
                        type: string
                        example: active
                      created_at:
                        type: string
                        example: 2018-05-23T16:17:40Z
                      updated_at:
                        type: string
                        example: 2018-05-23T16:17:40Z
                      metadata:
                        type: object
                        properties:
                          key:
                            type: string
                            example: value
                  automatic_anticipation_settings:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                        example: true
                        default: true
                      type:
                        type: string
                        example: full
                      volume_percentage:
                        type: integer
                        example: 50
                        default: 0
                      delay:
                        type: integer
                        example: 365
                        default: 0
                      days:
                        type: array
                        items:
                          type: integer
                          example: 1
                          default: 0
                  gateway_recipients:
                    type: array
                    items:
                      type: object
                      properties:
                        gateway:
                          type: string
                          example: pagarme
                        status:
                          type: string
                          example: active
                        pgid:
                          type: string
                          example: re_cjhjb34244o9jw6dyx5aizxn
                        createdAt:
                          type: string
                          example: 2018-05-23T16:17:45Z
                        updatedAt:
                          type: string
                          example: 2018-05-23T16:17:45Z
                  metadata:
                    type: object
                    properties:
                      key:
                        type: string
                        example: value
        "400":
          description: "400"
          content:
            application/json:
              examples:
                Result:
                  value: "{}"
              schema:
                type: object
                properties: {}
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
