GET

Description

Retrieve a list of all trusted and rejected senders.

URL structure

https://api.fortnox.se/3/emailsenders/

Method

GET

Version

3

Response

Retrieves all trusted and rejected emails with id.

<?xml version="1.0" encoding="UTF-8"?>
<EmailSenders>
    <TrustedSenders>
        <TrustedSender>
            <Id>80</Id>
            <Email>a@a.se</Email>
        </TrustedSender>
        <TrustedSender>
            <Id>81</Id>
            <Email>b@b.se</Email>
        </TrustedSender>
    </TrustedSenders>
    <RejectedSenders>
        <RejectedSender>
            <Id>5</Id>
            <Email>c@c.se</Email>
        </RejectedSender>
        <RejectedSender>
            <Id>4</Id>
            <Email>d@d.se</Email>
        </RejectedSender>
    </RejectedSenders>
</EmailSenders>
{
    "EmailSenders": {
        "TrustedSenders": [
            {
                "Id": 80,
                "Email": "1.lindberg@fortnox.se"
            },
            {
                "Id": 81,
                "Email": "2.lindberg@fortnox.se"
            }
        ],
        "RejectedSenders": [
            {
                "Id": 5,
                "Email": "449.lindberg@fortnox.se"
            },
            {
                "Id": 4,
                "Email": "59.lindberg@fortnox.se"
            }
        ]
    }
}

POST – Save new trusted sender

Description

Add a new email address as trusted.

URL structure

https://api.fortnox.se/3/emailsenders/trusted/

Method

POST

Version

3

Request

The request body should contain a structure of an email, either in JSON or XML.

<?xml version="1.0" encoding="utf-8"?>
<TrustedSender>
    <Email>noreply@domain.se</Email>
</TrustedSender>
{
    "TrustedSender": { 
        "Email": "patrik.lindberg@fortnox.se" 
    }
}

Response

The same data, including an id, is returned if all went well, otherwise an error message is returned.

<?xml version="1.0" encoding="UTF-8"?>
<TrustedSender>
    <Id>56</Id>
    <Email>noreply@domain.se</Email>
</TrustedSender>
{
    "TrustedSender": {
        "Id": 56,
        "Email": "patrik.lindberg@fortnox.se"
    }
}

DELETE

Description

Delete an email address from the trusted senders list. Provide an id matching an email to delete.

URL structure

https://api.fortnox.se/3/emailsenders/trusted/{id}

Method

DELETE

Version

3

Request

The request body should be empty.

Response

No content (204 No Content) is returned on success.

Fields

Trusted/Rejcted senders

Field Description Limits Type Searchable Sortable Required R/W
Id Id of the record Integer R
Email Email address of trusted/rejected sender String R/W