Get recipients transmission result

Home » DOCOON APIs » REST API » Basic functionnalities » Get recipients transmission result

After sending messages, you might want to see simply in your software the transmission result of each recipient.

We created a workflow “Get transmission reports (Pull way)” that allows you to simply get those transmission results in 3 steps, get the transmission reports listget transmission report file and delete transmission report file. This basic functionnality illustrate the third step.

You can also replace the second step by this one. Instead of downloading the transmission report file, it is possible to directly get the transmission data of each recipient.

Avoid to call this webservice less than every 5 minutes.

Request Informations

Name: /JobItems
Type: GET

Headers:

Name Value
Authorization Value : Authorization token check : Connect to REST API
Content-Type Value : application/json

 

Parameters list:

Parameter Type Description
filterJob int

(Mandatory) Filter returning a specific job if you specify a jobId. Can be replace by filterTID

Value : The job ID

filterTid String (Optional) Filter returning a list of jobs with the specified TrackingID. Can be used as a replacement to filterJob.

Value : The trackingID

customerNumber int (Optional) Customer number of the jobs.
pageIndex int (Optional) Page of the result you want to get (default = 1).
pageSize int (Optional) Number of jobs per page (default = 10).
filterFailed boolean

(Optional) filter returning the list of failed items.

Values :
true => only sent items.
false => only failed items.

filterOutcome String (Optional) Filter returning a list of items depending of the final outcome.
Values : S, A, B, C, D, E, F, G, H, Z, check here for more information
filterAddress String (Optional) Filter returning a list of items depending of the address or phoneNumber.
filterStartDate DateTime (Optional) Filter returning a list of items started after the specified date.
Format : “2017-07-08T12:54:40.460Z”
filterEndDate DateTime (Optional) Filter returning a list of items started before the specified date.
Format : “2017-07-08T12:54:40.460Z”
sortField int (Optional) Sort the data by the field returned.
Values : 0 = Job, 1 = Job item, 2 = Tracking id, 3 = Address, 4 = Recipient, 5 = Pages, 6 = Sent pages, 7 = Attempts, 8 = start date, 9 = end date, 10 = Bytes, 11 = Answer back, 12 = Baud rate, 13 = Outcome, 14 = Outcomes list, 15 = Status, 16 = Calltime
sortDirection int

(Optional) Type of sorting.

Values : 1 = Ascending, 2 = Descending

Get transmission result
GET /api/V1/JobItems?filterJob=48034262
Host: api.odyssey-services.fr
Content-Type: application/json
Authorization: Basic NjAzMDAuYXxxxxxxxx
Filter by PageSize and Index
GET /api/V1/JobItems?filterJob=48034262=2&pageIndex=2&pageSize=5
Host: api.odyssey-services.fr
Content-Type: application/json
Authorization: Basic NjAzMDAuYxxxxx
Filter by TrackingID and NotSent
GET /api/V1/JobItems?filterJob=48034260&filterFailed=false&filterOutcome='F'&sortField=7&sortDirection=1
Host: api.odyssey-services.fr
Content-Type: application/json
Authorization: Basic NjAzMDAuYxxxxx
Filter by Media and Sort
GET /api/V1/JobItems?filterJob=48034260&filterStartDate=2017-07-01T12:54:40.460Z&filterEndDate=2017-07-08T12:54:40.460Z
Host: api.odyssey-services.fr
Content-Type: application/json
Authorization: Basic NjAzMDAuYxxxxx

Successful Response

Status : 200

Parameter Type Description
PageIndex Int Page number currently returned
PageSize Int Number of item per page
TotalCount Int Total Number of jobs that can be returned
TotalPageCount Int Total of page that can be returned
Ressources JobItem Object List of JobItem Object, returning the job Data, See below for structure the details.
HasPreviousPage boolean True: This is the first page you can display.
False: you can display the previous page.
HasNextPage Boolean True: you can display the next page
False: This is the last page you can display

Response is a list of JobItem Object.

JobItem object

Parameter Type Description
JobItemNumber String Position of the current item in your job List.
JobNumber Int System reference number of the job.
TrackingId String User reference name of the job.
Address String Address/Phone number of the recipient.
Recipient String Name or other information of the recipient.
Pages Int Number of pages.
SentPages Int Number of sent pages.
Attempts Int Total of retry for the sending.
FirstDate DateTime Date of the job creation.
FinishDate DateTime Date of the end of the job.
Bytes Int Size in byte of the message sent.
AnswerBack String Either a phone number, reference or ip for AnswerBack.
BaudRate Int (Fax only) Velocity of the connection between our system and the recipient fax Engine.
Outcome String Last outcome (check the outcome in the FAQ).
Outcomes String All outcome of the various retry for email and Fax.
Status Int System internal status (0 = sent).
CallTime Int (Fax only) Duration of the job item.
CallAnalysis String
UD1 String Specific data about this recipient (user defined 1, by default column 3 of the original list).
UD2 String Specific data about this recipient (user defined 2, by default column 4 of the original list).
UD3 String Specific data about this recipient (user defined 3, by default column 5 of the original list).
UD4 String Specific data about this recipient (user defined 4, by default column 6 of the original list).
UD5 String Specific data about this recipient (user defined 5, by default column 7 of the original list).
IsSent Boolean True : The item was Sent
False : The item is not sent
Successful Response
{
    "PageIndex": 1,
    "PageSize": 10,
    "TotalCount": 1,
    "TotalPageCount": 1,
    "Resources": [
        {
            "JobItemNumber": 1,
            "JobNumber": 48034262,
            "TrackingId": "Mail Sending",
            "Address": "abcd@gmail.com",
            "Recipient": "Recipient1",
            "Pages": 0,
            "SentPages": 1,
            "Attempts": 1,
            "FirstDate": "2017-07-11T06:54:01",
            "FinishDate": "2017-07-11T06:54:01",
            "Bytes": 2030,
            "AnswerBack": "gmail-smtp-in.l.google.com",
            "BaudRate": 0,
            "Outcome": "S",
            "Outcomes": "S",
            "Status": 0,
            "CallTime": 0,
            "CallAnalysis": "",
            "UD1": null,
            "UD2": null,
            "UD3": null,
            "UD4": null,
            "UD5": null,
            "IsSent": true
        }
    ],
    "HasPreviousPage": false,
    "HasNextPage": false
}