JSON API: Manage Sub-Journals

Refer to the journal schema for a formal definition of the request and the journal response schema for a definition of the response.

Route: journal/add

Sample request:

{
  "code": "SALES",
  "names": [
    {
      "name": "Sales Journal",
      "language": "en"
    }
  ]
}

Sample response:

{
  "journal": {
    "uuid":"6716dd69-63ae-4faa-be97-6bbb323516ff",
    "code":"SALES",
    "names":[
      {
        "name": "Sales Journal",
        "language": "en",
        "createdAt": "2021-12-22T05:28:27.776353Z",
        "updatedAt": "2021-12-22T05:28:27.776353Z"
      }
    ],
    "revision":"f6194567926a8de4ca1c2cb517bbaf73364394363a78ff080eb131dcdc5716e9",
    "createdAt": "2021-12-22T05:28:27.774975Z",
    "updatedAt": "2021-12-22T05:28:27.774975Z"
  },
  "time":"2021-12-22T05:28:27.782361Z"
}

Route: journal/delete

Sample request:

{
  "code": "SALES",
  "revision":"f6194567926a8de4ca1c2cb517bbaf73364394363a78ff080eb131dcdc5716e9"
}

Sample response:

{
  "success":true,
  "time":"2022-01-07T21:27:26.623821Z"
}

Route: journal/get

Sample request:

{
  "code": "SALES"
}

Sample response:

{
  "journal": {
    "uuid":"6716dd69-63ae-4faa-be97-6bbb323516ff",
    "code":"SALES",
    "names":[
      {
        "name": "Sales Journal",
        "language": "en",
        "createdAt": "2021-12-22T05:28:27.776353Z",
        "updatedAt": "2021-12-22T05:28:27.776353Z"
      }
    ],
    "revision":"f6194567926a8de4ca1c2cb517bbaf73364394363a78ff080eb131dcdc5716e9",
    "createdAt": "2021-12-22T05:28:27.774975Z",
    "updatedAt": "2021-12-22T05:28:27.774975Z"
  },
  "time":"2021-12-22T05:28:27.782361Z"
}

Route: journal/update

Sample request:

{
  "code":"SALES",
  "revision":"777e9609905291576812e30416b747d98c2061ffdc0f31e5afbc9b4690d3812f",
  "toCode":"SJE",
  "names": [
    {
      "name": "Sales (Europe)",
      "language": "en"
    }
  ]
}

Sample response:

{
  "journal": {
    "uuid":"6716dd69-63ae-4faa-be97-6bbb323516ff",
    "code":"SJE",
    "names":[
      {
        "name": "Sales (Europe)",
        "language": "en",
        "createdAt": "2021-12-22T05:28:27.776353Z",
        "updatedAt": "2021-12-22T05:28:27.776353Z"
      }
    ],
    "revision":"f6194567926a8de4ca1c2cb517bbaf73364394363a78ff080eb131dcdc5716e9",
    "createdAt": "2021-12-22T05:28:27.774975Z",
    "updatedAt": "2021-12-22T05:28:27.774975Z"
  },
  "time":"2021-12-22T05:28:27.782361Z"
}