JSON API: Manage References

References are links to external systems and repositories for any data needed to manage those connections.

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

Route: reference/add

Sample request:

{
  "code":"Customer 25",
  "extra": "{\"customerId\":25,\"name\":\"Testco Inc.\"}"
}

Sample response:

{
  "reference": {
    "uuid": "c4f95889-7798-4147-8f39-5d5488d9e1c3",
    "code": "Customer 25",
    "extra": "{\"customerId\":25,\"name\":\"Testco Inc.\"}",
    "revision":"81aeffc45d66bbce05d14538e72174601d548ecb1b391437c16c47bceeb615a1",
    "createdAt":"2022-01-07T21:37:24.547957Z",
    "updatedAt":"2022-01-07T21:37:24.547957Z"
  },
  "time":"2022-01-07T21:37:24.550429Z"
}

Route: reference/delete

Sample request:

{
  "code":"Customer 25",
  "revision":"81aeffc45d66bbce05d14538e72174601d548ecb1b391437c16c47bceeb615a1"
}

Sample response:

{
  "success": true,
  "time": "2022-01-07T21:42:44.563487Z"
}

Route: reference/get

Sample request:

{
  "code":"Customer 25"
}

Sample response:

{
  "reference": {
    "uuid": "c4f95889-7798-4147-8f39-5d5488d9e1c3",
    "code": "Customer 25",
    "extra": "{\"customerId\":25,\"name\":\"Testco Inc.\"}",
    "revision":"81aeffc45d66bbce05d14538e72174601d548ecb1b391437c16c47bceeb615a1",
    "createdAt":"2022-01-07T21:37:24.547957Z",
    "updatedAt":"2022-01-07T21:37:24.547957Z"
  },
  "time":"2022-01-07T21:37:24.550429Z"
}

Route: reference/update

Sample request:

{
  "code":"Customer 25",
  "extra": "{\"customerId\":25,\"name\":\"Testco Inc.\",\"terms\":\"Net 30\"}",
  "revision":"81aeffc45d66bbce05d14538e72174601d548ecb1b391437c16c47bceeb615a1"
}

Sample response:

{
  "reference": {
    "uuid": "c4f95889-7798-4147-8f39-5d5488d9e1c3",
    "code": "Customer 25",
    "extra": "{\"customerId\":25,\"name\":\"Testco Inc.\",\"terms\":\"Net 30\"}",
    "revision":"56bc4039b845fddf131987110f9b4e265b04c536acf6c526a0b4c7669371765f",
    "createdAt":"2022-01-07T21:37:24.547957Z",
    "updatedAt":"2022-01-07T21:37:24.547957Z"
  },
  "time":"2022-01-07T21:37:24.550429Z"
}