API

API

We have provided API's to so you can add Red Ink Texts from third party software

Text API

The Text API has a get and a post function

[GET] https://<BC Base URL>/api/redandbundle/redink/v2.0/companies(<Company Id>)/texts(<Red Ink System Id>)

This is the get result body

{
    "@odata.context": "",
    "@odata.etag": "",
    "systemId": "5e442294-4de1-ee11-b41d-ac8b915ccfc7",
    "entryNo": 1,
    "sourceTableNo": 36,
    "sourceSystemId": "419bf552-44bc-ee11-907d-6045bde98bba",
    "type": "HEADER",
    "description": "",
    "flowToTransaction": false,
    "textOrder": 0,
    "documentDate": "2024-01-01",
    "htmlText": "<span style=\"font-family: Calibri, Helvetica, sans-serif\">this is some more text</span>",
    "result": ""
}
[POST] https://<BC Base URL>/api/redandbundle/redink/v2.0/companies(<Company Id>)/texts

This is the post request body. The mandatory fields are sourceTableNo, sourceSystemId, and type. The source table number is the table that contains the record that you want to link the text to. The source system id is the id of the record that you want to link the text to. The type specifies the Red Ink Text Type. In this example the text is linked to the sales order with id 419bf552-44bc-ee11-907d-6045bde98bba

{
    "sourceTableNo": 36,
    "sourceSystemId": "419bf552-44bc-ee11-907d-6045bde98bba",
    "type": "HEADER",
    "description": "",
    "flowToTransaction": false,
    "textOrder": 0,
    "documentDate": "2024-01-01",
    "htmlText": "<span style=\"font-family: Calibri, Helvetica, sans-serif\">this is some more text</span>"
}

Text Type API

The Text Type API has a get function

[GET] https://<BC Base URL>/api/redandbundle/redink/v2.0/companies(<Company Id>)/texttypes
[GET] https://<BC Base URL>/api/redandbundle/redink/v2.0/companies(<Company Id>)/texttypes(<Red Ink System Id>)

This is the get result body

{
    "@odata.context": "",
    "value": [
        {
            "@odata.etag": "W/\"JzIwOzE3NjMxMTcwMjM2NzY2NzI2NjU4MTswMDsn\"",
            "code": "EMAIL",
            "description": "EMail",
            "emailTemplate": true,
            "systemId": "e542eb61-4de1-ee11-b41d-ac8b915ccfc7"
        },
        {
            "@odata.etag": "W/\"JzE5OzgyNjI0NDAyNjAyMzQ2MDI5MTMxOzAwOyc=\"",
            "code": "FOOTER",
            "description": "Footer",
            "emailTemplate": false,
            "systemId": "e442eb61-4de1-ee11-b41d-ac8b915ccfc7"
        },
        {
            "@odata.etag": "W/\"JzIwOzE0OTY1NTkxNjA4MDk1MzQ4OTA0MTswMDsn\"",
            "code": "HEADER",
            "description": "Header",
            "emailTemplate": false,
            "systemId": "b95acb5a-4de1-ee11-b41d-ac8b915ccfc7"
        },
        {
            "@odata.etag": "W/\"JzIwOzE0ODM3NjcyMzcwOTYzODk4NTQzMTswMDsn\"",
            "code": "NOTE",
            "description": "Note",
            "emailTemplate": false,
            "systemId": "e642eb61-4de1-ee11-b41d-ac8b915ccfc7"
        }
    ]
}