Inxmail Commerce API for SAP
Inxmail Commerce API for SAP allows you to trigger transaction event workflows and retrieve information about the outcomes of these transactions.
The OpenAPI 3 specification for Inxmail Commerce API for SAP is available at the following URL:
Authentication
Inxmail Commerce API requires REST clients to authenticate themselves with an API key using HTTP Basic Authentication.
The key consists of a keyid and a secret, which can be supplied to the client software as username and password:
curl -u 'keyid:secret' -H 'Accept: application/json' 'https://space.api.inxmail-commerce.com/api-service/v1/bounces'
Media Types
Inxmail Commerce API uses JSON as data format for requests and responses application/json.
Large responses are paginated, in this case the standard next and previous link relations are used to provide navigation.
Error States
The common HTTP Response Status Codes are used.
General Information ¶
All Requests ¶
All RequestsGET/
All requests are scoped to a single Inxmail Commerce space. The space ID is specified as first part of the domain name.
Example URI
- spaceid
string(required) Example: a-spaceID of the Inxmail Commerce space. You can find the spaceid in your credential document and the first part of the url which is used for gui access.
404Space with specified ID does not exist
Body
{
"timestamp": "2015-08-21T06:05:30.257+0000",
"status": 404,
"error": "Not Found",
"message": "Unknown tenant.",
"path": "/v1/state"
}Generic E-Mail-Adapter for SAP ¶
Send an email ¶
Send an emailPOST/custom/sap/v1/send
Allows submitting an email message as an HTTP call instead of sending it by SMTP.
curl -X POST -u 'keyid:secret' -H 'Content-Type: application/json' -d '{ "type": "email", "sourceSystem": "0MB871I", "campaignId": "cMB871df", "sender": "info@example.invalid", "senderName": "Name of the sender", "replyTo": "reply@example.invalid", "replyToName": "Name for reply to", "recipient": "max.mustermann@example.invalid", "recipientName": "Max Mustermann", "listUnsubscribe": "<https://www.example.invalid/unsubscribe>, <mailto:unsub@example.invalid>", "subjectContentPlainText": "Test subject", "bodyContentHTML": "<html><body><b>This is a test\nbody.</b></body></html>", "bodyContentPlainText": "This is a test text for the text part." }' 'https://{spaceid}.api.inxmail-commerce.com/api-service/custom/sap/v1/send'
Example URI
ExampleBody
{
"type": "email",
"sourceSystem": "0MB871I",
"campaignId": "cMB871df",
"sender": "info@example.invalid",
"senderName": "Name of the sender",
"replyTo": "reply@example.invalid",
"replyToName": "Name for reply to",
"recipient": "max.mustermann@example.invalid",
"recipientName": "Max Mustermann",
"listUnsubscribe": "<https://www.example.invalid/unsubscribe>, <mailto:unsub@example.invalid>",
"subjectContentPlainText": "Test subject",
"bodyContentHTML": "<html><body><b>This is a test\nbody.</b></body></html>",
"bodyContentPlainText": "This is a test text for the text part."
}Example with bccBody
{
"type": "email",
"sourceSystem": "0MB871I",
"campaignId": "cMB871df",
"sender": "info@example.invalid",
"senderName": "Name of the sender",
"replyTo": "reply@example.invalid",
"replyToName": "Name for reply to",
"recipient": "max.mustermann@example.invalid",
"recipientName": "Max Mustermann",
"bccRecipient": "bcc@example.invalid",
"listUnsubscribe": "<https://www.example.invalid/unsubscribe>, <mailto:unsub@example.invalid>",
"subjectContentPlainText": "Test subject",
"bodyContentHTML": "<html><body><b>This is a test\nbody.</b></body></html>",
"bodyContentPlainText": "This is a test text for the text part."
}200Request has been transmitted successfully. Returned id is the transaction id for this request.
Body
{
"messageId":"5534f2f3fcb24820d52f3413",
"date":"2015-04-20T12:37:07.299+0000",
}Bounce Data ¶
Bounces ¶
BouncesGET/custom/sap/v1/bounces{?sourceSystem,campaignId,startTimeUTC,endTimeUTC,page,pageSize}
curl -u 'keyid:secret' 'https://{spaceid}.api.inxmail-commerce.com/api-service/custom/sap/v1/bounces'
curl -u 'keyid:secret' 'https://{spaceid}.api.inxmail-commerce.com/api-service/custom/sap/v1/bounces?sourceSystem=Production'
curl -u 'keyid:secret' 'https://{spaceid}.api.inxmail-commerce.com/api-service/custom/sap/v1/bounces?startTimeUTC=20151021000000&endTimeUTC=2015102220000&page=0'
Get information about bounced emails.
The filtering parameters are all optional. If not specified, all bounces are returned. Filters can be combined, only bounces that match all criteria are returned.
The pagination parameters page and pageSize should be used together, and apply within filtered results.
Example URI
- sourceSystem
string(optional) Example: Productionfilters by the sourceSystem that was specified in the event data
- campaignId
string(optional) Example: 4587filters by the campaignId that was specified in the event data
- startTimeUTC
string(optional) Example: 20151021110033filters bounces starting from this timestamp
- endTimeUTC
string(optional) Example: 20151021110033filters bounces until this timestamp
- pageSize
number(optional) Default: 100 Example: 20number of elements returned in a single response page (max. 2000)
- page
number(optional) Default: 0 Example: 0result page number, if the request returns more results than the page size
200type is one of:
-
Soft- Softbounce. For further information see Softbounce -
Hard- Hardbounce. For further information see Hardbounce -
no value - Unknown.
Headers
Content-Type: application/jsonBody
{
"page": 0,
"lastPage": true
"bounces": [
{
"sourceSystem": "sys1",
"campaignId": "c1456",
"messageId": "5451f3b1e1c2485a5b71ca88",
"recipient": "recipient1@fullbounce.invalid",
"errorCode": "5.1.1.",
"errorText": "Address does not exist",
"type": "Hard",
"timestamp": "20151021072610",
},
{
"sourceSystem": "sys2",
"campaignId": "c4587",
"messageId": "5451f3b1e1c2485a5b71ca31",
"recipient": "recipient3@fullbounce.invalid",
"errorCode": "5.1.1.",
"errorText": "Address does not exist",
"type": "Hard",
"timestamp": "20151021073425",
}
]
}400invalid filter parameters, like invalid begin and end dates
Body
{
"error": "Bad Request",
"exception": "com.inxmail.xcom.api.rest.InvalidDateParameter",
"message": "Start date 2015-10-24T11:20:14.887+0000 is in future",
"path": "/v1/bounces?begin=2015-10-24T11:20:14.887%2B0000",
"status": 400,
"timestamp": "2015-10-23T11:22:01.827+0000"
}Complaints ¶
ComplaintsGET/custom/sap/v1/complaints{?sourceSystem,campaignId,startTimeUTC,endTimeUTC,page,pageSize}
curl -u 'keyid:secret' 'https://{spaceid}.api.inxmail-commerce.com/api-service/custom/sap/v1/complaints'
curl -u 'keyid:secret' 'https://{spaceid}.api.inxmail-commerce.com/api-service/custom/sap/v1/complaints?sourceSystem=Production'
curl -u 'keyid:secret' 'https://{spaceid}.api.inxmail-commerce.com/api-service/custom/sap/v1/complaints?startTimeUTC=20151021000000&endTimeUTC=2015102220000&page=0'
Get information about complaints.
The filtering parameters are all optional. If not specified, all complaints are returned. Only one of sourceSystem or campaignId may be used. Other than that, filters can be combined, only complaints that match all criteria are returned.
The pagination parameters page and pageSize should be used together, and apply within filtered results.
Example URI
- sourceSystem
string(optional) Example: Productionfilters by the sourceSystem that was specified in the event data
- campaignId
string(optional) Example: 4587filters by the campaignId that was specified in the event data
- startTimeUTC
string(optional) Example: 20151021110033filters bounces starting from this timestamp
- endTimeUTC
string(optional) Example: 20151021110033filters bounces until this timestamp
- pageSize
number(optional) Default: 100 Example: 20number of elements returned in a single response page (max. 2000)
- page
number(optional) Default: 0 Example: 0result page number, if the request returns more results than the page size
200Headers
Content-Type: application/jsonBody
{
"page": 0,
"lastPage": true
"complaints": [
{
"sourceSystem": "sys1",
"campaignId": "c1456",
"messageId": "5451f3b1e1c2485a5b71ca88",
"recipient": "recipient1@fullbounce.invalid",
"type": "abuse",
"timestamp": "20151021072610",
},
{
"sourceSystem": "sys2",
"campaignId": "c4587",
"messageId": "5451f3b1e1c2485a5b71ca31",
"recipient": "recipient3@fullbounce.invalid",
"type": "abuse",
"timestamp": "20151021073425",
}
]
}400invalid filter parameters, like invalid begin and end dates
Body
{
"error": "Bad Request",
"exception": "com.inxmail.xcom.api.rest.InvalidDateParameter",
"message": "Start date 2015-10-24T11:20:14.887+0000 is in future",
"path": "/custom/sap/v1/complaints?begin=2015-10-24T11:20:14.887%2B0000",
"status": 400,
"timestamp": "2015-10-23T11:22:01.827+0000"
}Senderdomains ¶
Senderdomains ¶
SenderdomainsGET/custom/sap/v1/verifiedSenders
curl -u 'keyid:secret' 'https://{spaceid}.api.inxmail-commerce.com/api-service/custom/sap/v1/verifiedSenders'
Get all valid sender domains for the current space.
Example URI
200Headers
Content-Type: application/jsonBody
{
"senderDomains": [
"domain1.tld"
"domain2.tld"
]
}