DIGIT Exchange

Overview

The DIGIT Exchange Service is a robust data interchange platform designed to facilitate the seamless and secure exchange of digital information between two endpoints. Built with a fixed schema for headers and dynamic messaging capabilities, this service ensures reliable communication while prioritizing data integrity and confidentiality.

Dependencies

DIGIT-exchange can implement any service if it has the same request structure as the program.

API Specifications

Base Path: /digit-exchange/

API spec YAML is here. Click below to view it in Swagger Editor.

APIs

/digit-exchange/v1/exchange/{EXCHANGE_TYPE}

post

Enables exchange of program, on-program, sanction, on-sanction etc

Body
signaturestringRequired

Signature of {header}+{message} body verified using sender's signing public key

Example: TgE1hcA2E+YPMdPGz4vveKQpR0x+pgzRTlet52qh63Kekr71vWWScXqaRFtQW64uRFZGBUhHYYZQ2y6LffwnNOOQhhssaThhqVBhXNEwX9i75SNYXi5XSJVDYzSyHrhF20HW6RE9mAVWdc80i7d+FXlh+b/U+fnj+SrZ2s6Xd0WUZvU29LgqeUpyznlWLu1mDdJxNZavsDLWmxjTnknqBjDvwSc35WhFDhXDA2lWmm8YpZ1Y6TBmvvtVS7mAOTnhFy9sdCbrLcfXk5QWIsdzlvPqlkvdwEf30OZ6ewb680Aj3hO2OT5LCv7iLyz7C7srnB9lJT5gXiw+eSnktPXlDA==
headerall ofRequired
and
messagestringRequiredExample: {"location_code":"pg.citya","name":"Test 1","start_date":0,"end_date":0,"client_host_url":"https://unified-dev.digit.org","function_code":"string","administration_code":"string","recipient_segment_code":"string","economic_segment_code":"string","source_of_fund_code":"string","target_segment_code":"string","currency_code":"string","locale_code":"string","status":{"status_code":"RECEIVED","status_message":"string"}}
Responses
401
HTTP layer error details
application/json
post
POST /digit-exchange/v1/exchange/EXCHANGE_TYPE HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 1107

{
  "signature": "TgE1hcA2E+YPMdPGz4vveKQpR0x+pgzRTlet52qh63Kekr71vWWScXqaRFtQW64uRFZGBUhHYYZQ2y6LffwnNOOQhhssaThhqVBhXNEwX9i75SNYXi5XSJVDYzSyHrhF20HW6RE9mAVWdc80i7d+FXlh+b/U+fnj+SrZ2s6Xd0WUZvU29LgqeUpyznlWLu1mDdJxNZavsDLWmxjTnknqBjDvwSc35WhFDhXDA2lWmm8YpZ1Y6TBmvvtVS7mAOTnhFy9sdCbrLcfXk5QWIsdzlvPqlkvdwEf30OZ6ewb680Aj3hO2OT5LCv7iLyz7C7srnB9lJT5gXiw+eSnktPXlDA==",
  "header": {
    "message_id": "123",
    "message_ts": "text",
    "action": "create",
    "sender_id": "program@https://spp.example.org",
    "sender_uri": "https://spp.example.org/{namespace}/callback/on-create",
    "receiver_id": "program@https://pymts.example.org",
    "is_msg_encrypted": false
  },
  "message": "{\"location_code\":\"pg.citya\",\"name\":\"Test 1\",\"start_date\":0,\"end_date\":0,\"client_host_url\":\"https://unified-dev.digit.org\",\"function_code\":\"string\",\"administration_code\":\"string\",\"recipient_segment_code\":\"string\",\"economic_segment_code\":\"string\",\"source_of_fund_code\":\"string\",\"target_segment_code\":\"string\",\"currency_code\":\"string\",\"locale_code\":\"string\",\"status\":{\"status_code\":\"RECEIVED\",\"status_message\":\"string\"}}"
}
{
  "errors": [
    {
      "code": "text",
      "message": "text"
    }
  ]
}

Exchange Flow

Data Model

DB Schema Diagram

Web Sequence Diagrams

Sequence of exchange between two environments

Exchange Service example of an exchange

Last updated

Was this helpful?