---
agentTools:
  projectIndex: https://docs.decentro.tech/llms.txt
---

# Update Journal

This API is used to update a Journal created

> 🙌 Important Note
>
> Please use only **Staging Credentials** on each API Reference page to test the APIs directly from our Documentation.

### API Endpoints

| Environment       | Endpoint                                                           |
| :---------------- | :----------------------------------------------------------------- |
| Staging / Sandbox | <https://in.staging.decentro.tech/v2/ledger/journal/{journal_urn}> |
| Production        | <https://in.decentro.tech/v2/ledger/journal/{journal_urn}>         |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Decentro Staging",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://in.staging.decentro.tech"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/v2/ledger/journal/{journal_urn}": {
      "put": {
        "summary": "Update Journal",
        "description": "This API is used to update a Journal created",
        "operationId": "update-journal",
        "parameters": [
          {
            "name": "client_id",
            "in": "header",
            "description": "Decentro assigned client_id for the company",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "client_secret",
            "in": "header",
            "description": "Decentro assigned client_secret for the company",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "module_secret",
            "in": "header",
            "description": "Decentro assigned module_secret for the company",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "journal_urn",
            "in": "path",
            "description": "Decentro Journal URN received in creation response",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reference_id",
                  "purpose",
                  "consent",
                  "status"
                ],
                "properties": {
                  "reference_id": {
                    "type": "string",
                    "description": "Your unique API reference id"
                  },
                  "purpose": {
                    "type": "string",
                    "description": "Purpose for updating the Journal"
                  },
                  "consent": {
                    "type": "boolean",
                    "description": "Consent for updating the journal"
                  },
                  "status": {
                    "type": "string",
                    "description": "Status of the journal. Acceptable values: ACTIVE, INACTIVE, HOLD"
                  }
                }
              },
              "examples": {
                "Success: Update Journal to Inactive": {
                  "value": {
                    "reference_id": "001-02",
                    "status": "INACTIVE",
                    "purpose": "this is to update the status of a journal",
                    "consent": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Success : Journal Update": {
                    "value": "{\n    \"decentroTxnId\": \"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF\",\n    \"status\": \"SUCCESS\",\n    \"responseCode\": \"S00000\",\n    \"message\": \"Transaction successful\",\n    \"data\": {\n        \"transactionStatus\": \"SUCCESS\",\n        \"transactionDescription\": \"Journal updated successfully\",\n        \"urn\": \"JOURNAL001\",\n        \"referenceId\": \"test_journal_1\",\n        \"name\": \"Test journal 1\",\n        \"purpose\": \"this is to create a journal\",\n        \"additionalParameters\": {\n            \"parameter1\": \"value1\",\n            \"parameter2\": \"value2\"\n        },\n        \"status\": \"INACTIVE\",\n        \"creationTimestamp\": \"2022-06-06 21:21:210\",\n        \"lastModificationTimestamp\": \"2022-06-06 22:22:22\"\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "decentroTxnId": {
                      "type": "string",
                      "example": "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF"
                    },
                    "status": {
                      "type": "string",
                      "example": "SUCCESS"
                    },
                    "responseCode": {
                      "type": "string",
                      "example": "S00000"
                    },
                    "message": {
                      "type": "string",
                      "example": "Transaction successful"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "transactionStatus": {
                          "type": "string",
                          "example": "SUCCESS"
                        },
                        "transactionDescription": {
                          "type": "string",
                          "example": "Journal updated successfully"
                        },
                        "urn": {
                          "type": "string",
                          "example": "JOURNAL001"
                        },
                        "referenceId": {
                          "type": "string",
                          "example": "test_journal_1"
                        },
                        "name": {
                          "type": "string",
                          "example": "Test journal 1"
                        },
                        "purpose": {
                          "type": "string",
                          "example": "this is to create a journal"
                        },
                        "additionalParameters": {
                          "type": "object",
                          "properties": {
                            "parameter1": {
                              "type": "string",
                              "example": "value1"
                            },
                            "parameter2": {
                              "type": "string",
                              "example": "value2"
                            }
                          }
                        },
                        "status": {
                          "type": "string",
                          "example": "INACTIVE"
                        },
                        "creationTimestamp": {
                          "type": "string",
                          "example": "2022-06-06 21:21:210"
                        },
                        "lastModificationTimestamp": {
                          "type": "string",
                          "example": "2022-06-06 22:22:22"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Failure - Empty Journal Name": {
                    "value": "{\n    \"decentroTxnId\": \"166DCEFDFAA842EC9B9E9C68D3C210F8\",\n    \"status\": \"FAILURE\",\n    \"responseCode\": \"E00009\",\n    \"message\": \"Name cannot be null or empty. Hint: name (string)\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "decentroTxnId": {
                      "type": "string",
                      "example": "166DCEFDFAA842EC9B9E9C68D3C210F8"
                    },
                    "status": {
                      "type": "string",
                      "example": "FAILURE"
                    },
                    "responseCode": {
                      "type": "string",
                      "example": "E00009"
                    },
                    "message": {
                      "type": "string",
                      "example": "Name cannot be null or empty. Hint: name (string)"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "627cbd56949a61004bbb9c80:630c949f2a66cb01f481d44a"
}
```