{"id":3784,"date":"2021-01-14T19:52:53","date_gmt":"2021-01-14T17:52:53","guid":{"rendered":"https:\/\/modulus.help\/kb\/docs\/documentation\/bookkeeping-module-apis\/delete-journal\/"},"modified":"2021-02-17T13:45:13","modified_gmt":"2021-02-17T11:45:13","slug":"api-delete-journal","status":"publish","type":"docs","link":"https:\/\/modulus.help\/kb\/docs\/documentation\/bookkeeping-apis-v1\/api-delete-journal\/","title":{"rendered":"API: Delete Journal"},"content":{"rendered":"<p>The purpose of this API is to delete an existing journal.<\/p>\n<h4>Request<\/h4>\n<table style=\"width: auto\">\n<tbody>\n<tr>\n<th style=\"text-align:left;\">API Name<\/th>\n<td>\n                DeleteJournal\n            <\/td>\n<\/tr>\n<tr>\n<th style=\"text-align:left;\">URL<\/th>\n<td>https:\/\/your_account.modulus.biz\/api\/bk\/v1\/DeleteJournal?token=YOUR_TOKEN&#038;journal_id=YOU_JOURNAL_ID<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align:left;\">Method<\/th>\n<td>DELETE<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align:left;\">Source<\/th>\n<td>Third Party Server<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align:left;\">Recipient<\/th>\n<td>modulus&reg; Server<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align:left;\">Content Type<\/th>\n<td>application\/json<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>URL Parameters<\/h4>\n<table style=\"width: auto\">\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th style=\"text-align:left;\">token<\/th>\n<td>Yes<\/td>\n<td>Text<\/td>\n<td>Your authentication token.<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align:left;\">journal_id<\/th>\n<td>Yes<\/td>\n<td>Number<\/td>\n<td>Has to be initially created by the same integration app, and status is either pending or review.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Responses<\/h4>\n<table style=\"width: auto;\">\n<thead>\n<tr>\n<th>HTTP Status<\/th>\n<th>result<\/th>\n<th>title<\/th>\n<th>message<\/th>\n<th>object<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th colspan=\"5\">Success Responses<\/th>\n<\/tr>\n<tr>\n<td>200 OK<\/td>\n<td>true<\/td>\n<td>Success<\/td>\n<td>Journal deleted successfully.<\/td>\n<td>\n<pre><code class=\"json\">{\r\n    \"deleted_journal_id\": xxx,\r\n    \"deleted_date_time\": \"yyy-mm-dd hh:MM:ss\"\r\n}<\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<th colspan=\"5\">Failure Responses<\/th>\n<\/tr>\n<tr>\n<td>400 Bad Request<\/td>\n<td>false<\/td>\n<td>Bad Request<\/td>\n<td>Error message as elaborated <a href=\"https:\/\/modulus.help\/kb\/docs\/documentation\/bookkeeping-apis-v1\/error-codes\/\" target=\"_blank\">here<\/a>.<\/td>\n<td>\n<pre><code class=\"json\">{\r\n    \"error_code\": xxx\r\n}<\/code><\/pre>\n<p>Error code as elaborated <a href=\"https:\/\/modulus.help\/kb\/docs\/documentation\/bookkeeping-apis-v1\/error-codes\/\" target=\"_blank\">here<\/a>.<\/td>\n<\/tr>\n<tr>\n<td>500 Internal Server Error<\/td>\n<td>false<\/td>\n<td>Internal Server Error<\/td>\n<td>Error message as elaborated <a href=\"https:\/\/modulus.help\/kb\/docs\/documentation\/bookkeeping-apis-v1\/error-codes\/\" target=\"_blank\">here<\/a>.<\/td>\n<td>\n<pre><code class=\"json\">{\r\n    \"error_code\": xxx\r\n}<\/code><\/pre>\n<p>Error code as elaborated <a href=\"https:\/\/modulus.help\/kb\/docs\/documentation\/bookkeeping-apis-v1\/error-codes\/\" target=\"_blank\">here<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Example 1<\/h4>\n<table style=\"width: auto\">\n<tbody>\n<tr>\n<th>Request<\/th>\n<td>\n<pre><code class=\"json\">curl <span style=\"white-space:nowrap\">--request DELETE 'https:\/\/your_account.modulus.biz\/api\/bk\/v1\/DeleteJournal?token=6eeed540c8cf01b8f68b38f5b9e0289b&journal_id=3400'<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<th>200 OK<\/th>\n<td>\n<pre><code class=\"json\">{\r\n    \"result\": true,\r\n    \"title\": \"Success\",\r\n    \"message\": \"Journal deleted successfully.\",\r\n    \"object\": {\r\n        \"deleted_journal_id\": 3400,\r\n        \"deleted_date_time\": \"2021-01-14 20:39:57\"\r\n    }\r\n}<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Example 2<\/h4>\n<table style=\"width: auto\">\n<tbody>\n<tr>\n<th>Request<\/th>\n<td>\n<pre><code class=\"json\">curl <span style=\"white-space:nowrap\">--request DELETE 'https:\/\/your_account.modulus.biz\/api\/bk\/v1\/DeleteJournal?token=ddd871b104153e1da4c10713ec691d77&journal_id=3434453456'<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<tr>\n<th>400 Bad Request<\/th>\n<td>\n<pre><code class=\"json\">{\r\n    \"result\": false,\r\n    \"title\": \"Bad Request\",\r\n    \"message\": \"Invalid journal ID parameter.\",\r\n    \"object\": {\r\n        \"error_code\": 1237\r\n    }\r\n}<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"featured_media":0,"parent":3778,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"comment_count":0,"_links":{"self":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3784"}],"collection":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/comments?post=3784"}],"version-history":[{"count":15,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3784\/revisions"}],"predecessor-version":[{"id":3962,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3784\/revisions\/3962"}],"up":[{"embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3778"}],"prev":[{"title":"API: Update Journal","link":"https:\/\/modulus.help\/kb\/docs\/documentation\/bookkeeping-apis-v1\/api-update-journal\/","href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/docs\/3783"}],"wp:attachment":[{"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/media?parent=3784"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/modulus.help\/kb\/wp-json\/wp\/v2\/doc_tag?post=3784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}