---
title: "Updates the enrollment journey session."
method: PATCH
path: "/baas/v1/open/itp/enrollments/journeys-sessions/{id}"
tags: ["Enrollment Journey Sessions"]
---

# Updates the enrollment journey session.

`PATCH /baas/v1/open/itp/enrollments/journeys-sessions/{id}`

Method to update the enrollment journey session. At this point it is possible to update only the status, being used for the cancellation of the session.

## Path parameters

- `id` string, required

## Request body

- UpdateEnrollmentsV2JourneySession
  - `status` 'CANCELLED', required — Status da sessão da jornada.

## Response `200`

Return in case of successful update.

- EnrollmentsV2JourneySession
  - `id` string, required — ID is the unique identifier of journey
  - `createdAt` string, required — Record creation date and time
  - `updatedAt` string, required — Record last update date and time
  - `deletedAt` string, required — Record deletion date and time (soft delete)
  - `journeyId` string, required — ID is the unique identifier of journey
  - `redirectUrl` string, uri — The redirect address for the journey after the flow of the journey.It needs to be one of the registered in the application.
  - `brandId` string — ID is the unique identifier of brand
  - `externalId` string — ID is the unique identifier of journey
  - `expirationDateTime` string — Data e hora em que a jornada deve deixar de ser válido. Uma string com data e hora conforme especificação RFC-3339, sempre com a utilização de timezone UTC(UTC time format).
  - `tags` string — Tags que podem ser usadas para classificar a sessão da jornada.
  - `webhookHeaders` string — Headers que podem ser usadas para classificar a sessão da jornada.
  - `settings` EnrollmentsV2JourneySessionSettings[] — Lista de configurações da sessão da jornada
    - `key` 'PRIORITIES_BRANDS' | 'JOURNEY_RULES', required — Tipos de chaves usadas para a customização da sessão da jornada. - PRIORITIES_BRANDS - Lista de ids dos brands prioritátios - JOURNEY_RULES - Regras para execução da jornada.
    - `value` string, required — Configuration value.
  - `applicationClientId` string, required — The application clientId.
  - `applicationId` string, required — The application ID. It is an exclusive number that identifies the application.
  - `tokenId` string, required — The token id.It is an exclusive number that identifies the token.
  - `token` EnrollmentsV2JourneySessionToken
    - `id` string, required — ID is the unique identifier of journey
    - `createdAt` string, required — Record creation date and time
    - `updatedAt` string, required — Record last update date and time
    - `deletedAt` string, required — Record deletion date and time (soft delete)
    - `token` string, required — Access token to the journey session
  - `journeySessionUrl` string, uri, required — The URL of the Journey Session that must be opened to the user.
  - `status` 'PENDING' | 'CANCELLED' | 'EXPIRED' | 'AWAITING_AUTHORISATION' | 'AWAITING_AUTHORISATION_ACTION' | 'AUTHORISED' | 'CONSUMED' | 'REJECTED' | 'FINISHED', required — Status of the Journey Session.
  - `statusHistory` EnrollmentsV2JourneySessionStatusHistory[] — List with the status of the journey session status.
    - `updatedAt` string, required — Record last update date and time
    - `status` 'PENDING' | 'CANCELLED' | 'EXPIRED' | 'AWAITING_AUTHORISATION' | 'AWAITING_AUTHORISATION_ACTION' | 'AUTHORISED' | 'CONSUMED' | 'REJECTED' | 'FINISHED', required — Status of the Journey Session.
  - `journeySessionStageId` string — ID is the unique identifier of the stage of the Journey Session
  - `journeySessionStage` EnrollmentsV2JourneySessionJourneySessionStage
    - `id` string, required — ID is the unique identifier of journey
    - `persistedState` string — Represents the internal state of the actor. It is a JSON object with the dump of the machine state, restrained in case of recharging.
    - `logs` EnrollmentsV2JourneySessionJourneySessionStageLogs[] — List of events and states that the user passed on the journey.
      - `createdAt` string, required — Record creation date and time
      - `event` object, required — Event issued on the journey.
      - `stateName` string, required — State name. A state describes the machine status or mode.
  - `paymentInitiationId` string — ID is the unique identifier of ITP
  - `paymentInitiationApi` 'ENROLLMENTS_V2' | 'PAYMENTS_V4', required — Payment initiation API used in the journey session. ENROLLMENTS_V2 for simple enrollments, PAYMENTS_V4 for PIX payments through enrollment.
  - `paymentInitiationData` PaymentsV4PaymentInitiationData
    - `loggedUser` PaymentsV4PaymentInitiationDataLoggedUser, required
      - `document` UserDocument, required
        - `identification` string, required — CPF number of the natural person, composed of 11 numeric digits without dots, dashes or spaces. Must be a valid CPF according to the Brazilian Federal Revenue validation algorithm.
        - `rel` string, required — Type of identification document. For Brazilian natural persons, always 'CPF' (Individual Taxpayer Registry). Identifies the type of document presented in the identification field.
    - `businessEntity` PaymentsV4PaymentInitiationDataBusinessEntity
      - `document` BusinessDocument, required
        - `identification` string, required — CNPJ number of the legal entity, composed of 14 numeric digits without dots, slashes or spaces. Must be a valid CNPJ according to the Brazilian Federal Revenue validation algorithm.
        - `rel` string, required — Type of identification document. For Brazilian legal entities, always 'CNPJ' (National Registry of Legal Entities). Identifies the type of document presented in the identification field.
    - `permissions` string[] — List of permissions assigned to the account link for payment initiation operations according to Open Finance Brasil specification. Must include 'PAYMENTS_INITIATE' to allow payment initiation.
    - `creditor` PaymentsV4PaymentInitiationDataCreditor
      - `cpfCnpj` string, required — Identification document (CPF or CNPJ) of the account holder. CPF: 11 numeric digits. CNPJ: 14 numeric digits. Both without formatting (dots, dashes or slashes). Must be valid according to Brazilian Federal Revenue algorithms.
      - `personType` 'PESSOA_NATURAL' | 'PESSOA_JURIDICA', required — Type of creditor account holder. PESSOA_NATURAL: Brazilian natural person identified by CPF. PESSOA_JURIDICA: Brazilian legal entity identified by CNPJ. This field determines the type of document expected in the cpfCnpj field and applicable validation rules.
      - `name` string, required — Name of the creditor account holder. For PESSOA_NATURAL: full name of the natural person as per official identity document. For PESSOA_JURIDICA: corporate name or trade name registered with Federal Revenue. Maximum 120 characters, accepts letters, numbers, accents and allowed special symbols.
    - `payment` PaymentsV4PaymentInitiationDataPayment, required
      - `type` 'PIX', required — Type of payment to be executed. Currently supports only PIX according to Central Bank of Brazil specification and Open Finance Brasil regulation.
      - `schedule` PaymentsV4PaymentInitiationDataPaymentSchedule
        - `single` PaymentsV4PaymentInitiationDataPaymentScheduleSingle
          - `date` string, required — Target settlement date for the payment. Uses Brasília time zone. Must be at least D+1 from consent date and at most D+730 from consent date, considering Brasília time zone.
        - `daily` PaymentsV4PaymentInitiationDataPaymentScheduleDaily
          - `startDate` string, required — Defines the start date of the recurring payment validity period.
          - `quantity` integer, required — Defines the quantity of payments that will be sent for settlement.
        - `weekly` PaymentsV4PaymentInitiationDataPaymentScheduleWeekly
          - `dayOfWeek` 'SEGUNDA_FEIRA' | 'TERCA_FEIRA' | 'QUARTA_FEIRA' | 'QUINTA_FEIRA' | 'SEXTA_FEIRA' | 'SABADO' | 'DOMINGO', required — Defines the planned day of the week for settlement occurrences.
          - `startDate` string, required — Defines the start date of the recurring payment validity period.
          - `quantity` integer, required — Defines the quantity of payments that will be sent for settlement.
        - `monthly` PaymentsV4PaymentInitiationDataPaymentScheduleMonthly
          - `dayOfMonth` integer, required — Defines the planned day of the month for settlement occurrences.
          - `startDate` string, required — Defines the start date of the recurring payment validity period.
          - `quantity` integer, required — Defines the quantity of payments that will be sent for settlement.
        - `custom` PaymentsV4PaymentInitiationDataPaymentScheduleCustom
          - `dates` string[], required — Defines the specific dates when settlement occurrences are planned.
          - `additionalInformation` string, required
      - `date` string — Date for payment execution in ISO 8601 format (YYYY-MM-DD). Required for single payments. Mutually exclusive with schedule object. Cannot be a past date or exceed maximum scheduling limits defined by Central Bank regulations. For immediate payments, use current date.
      - `currency` string, required — National currency code according to ISO-4217 standard. For Brazil, always 'BRL' (Brazilian Real). All monetary values are represented in the country's current currency.
      - `amount` string, required — PIX transaction monetary value with exactly 2 decimal places, formatted as string. Must exactly match the value authorized in the consent. For QR Codes with fixed value, must match the value encoded in the QR Code, otherwise will result in HTTP 422 error.
      - `ibgeTownCode` string — IBGE code of the payer's municipality (7 numeric digits). Optional field used by PIX arrangement to identify municipal and state holidays. When not informed, the receiving PSP assumes there are no local holidays. Corresponds to the 'codMun' field specified in the Central Bank's PIX Manual.
      - `details` PaymentsV4PaymentInitiationDataPaymentDetails, required
        - `localInstrument` 'MANU' | 'DICT' | 'QRDN' | 'QRES' | 'INIC', required — Specifies the local instrument used for PIX payment initiation as defined by the Central Bank of Brazil: MANU (manual account data entry), DICT (PIX key), QRDN (dynamic QR Code), QRES (static QR Code), INIC (initiation with pre-known beneficiary).
        - `qrCode` string — EMV string (PIX QR Code) for payment. Contains encoded data of the receiver, amount, PIX key and other information necessary for processing. Works with 'PIX Copy and Paste'. UTF-8 format, maximum 512 bytes. Required when localInstrument is QRDN or QRES.
        - `proxy` string — PIX key registered in DICT belonging to the recipient. Key types can be: phone, email, CPF/CNPJ or random key. Phone format E.164, email max 77 chars, CPF 11 digits, CNPJ 14 digits, random key as UUID RFC4122. Required for DICT, QRDN, QRES, INIC. Not allowed for MANU.
        - `creditorAccount` PaymentsV4PaymentInitiationDataPaymentDetailsCreditorAccount
          - `accountType` 'CACC' | 'TRAN' | 'SVGS', required — Account types used for payments. Traditional modalities provided by Resolution 4.753, not including linked accounts, foreign domiciled accounts, foreign currency accounts and electronic currency correspondent accounts. CACC - Current Account, SVGS - Savings Account, TRAN - Prepaid Payment Account.
          - `ispb` string, required — Must be filled with the ISPB (Brazilian Payment System Identifier) of the SPI (Instant Payment System) participant, numbers only.
          - `issuer` string — Bank branch code without digit. Branch is the facility intended for customer service, general public and credit union members in conducting institution activities, and cannot be mobile or transitory. [Restriction] Mandatory for account types: CACC (CONTA_DEPOSITO_A_VISTA) and SVGS (CONTA_POUPANCA).
          - `number` string, required — Account number of the receiving user, with check digit (if it exists). Any alphanumeric value should be converted to 0.
    - `debtorAccount` PaymentsV4PaymentInitiationDataDebtorAccount
      - `accountType` 'CACC' | 'TRAN' | 'SVGS', required — Account types used for payments. Traditional modalities provided by Resolution 4.753, not including linked accounts, foreign domiciled accounts, foreign currency accounts and electronic currency correspondent accounts. CACC - Current Account, SVGS - Savings Account, TRAN - Prepaid Payment Account.
      - `ispb` string, required — Must be filled with the ISPB (Brazilian Payment System Identifier) of the SPI (Instant Payment System) participant, numbers only.
      - `issuer` string — Bank branch code without digit. Branch is the facility intended for customer service, general public and credit union members in conducting institution activities, and cannot be mobile or transitory. [Restriction] Mandatory for account types: CACC (CONTA_DEPOSITO_A_VISTA) and SVGS (CONTA_POUPANCA).
      - `number` string, required — Account number of the receiving user, with check digit (if it exists). Any alphanumeric value should be converted to 0.
    - `remittanceInformation` string — Additional remittance information provided by the payer to be sent to the beneficiary along with the PIX payment. Maximum 140 characters. May contain payment description, invoice number, commercial reference, etc.
  - `paymentInitiation` EnrollmentsV2JourneySessionPaymentInitiation

## Other responses

- `401` — Authentication is required to access this resource. The client must provide valid credentials.
- `403` — The server understood the request but refuses to authorize it. Access is permanently forbidden and tied to the application logic.
- `409` — The request conflicts with the current state of the resource on the server.
- `422` — The request contains invalid or malformed data that cannot be processed.
- `500` — An unexpected error occurred on the server while processing the request.
- `default` — Unexpected error.

---

[API](https://skmtc.net/celcoin/apis/api-para-transa-es.md) · [All operations](https://skmtc.net/celcoin/apis/api-para-transa-es/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/celcoin/api-para-transa-es/revisions/85dd6188a37b/schema)
