|
Sending email messages
|
check_message_status | Check detailed status of a message. (administrative) |
check_messages_status | Check status of a messages. (administrative) |
send_simple_by_template | Send multiple messages using a template. (administrative) |
send_simple_message | Send an email message. (administrative) |
send_simple_messages | Call send_simple_message multiple times in one call. (administrative) |
system_status | Get information on the status of the module. |
services/mailing/check_message_status ¶
Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.
|
||||||
https://api.usos.tu.kielce.pl/services/mailing/check_message_status | ||||||
Check for the detailed status of a previously sent message. When you've used a method like send_simple_message, you have not - strictly speaking - "sent" the message. You have enqueued it to be sent. USOS API will try to send this message as fast as possible. You may check for the status of this operation here. | ||||||
message_id | required |
ID of the message. You will need to sign your request with the same Consumer Key as the one you signed the original sending request with. Please note, that currently messages are kept for a period of 7 days. After this time, you won't be able to reference your message. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional | Required only if you've chosen jsonp as a return format. | ||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Token is not required. | ||||||
Returned value: The method returns a dictionary of the following structure:
|
services/mailing/check_messages_status ¶
Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.
|
||||||
https://api.usos.tu.kielce.pl/services/mailing/check_messages_status | ||||||
Check for the status of a previously sent messages. When you've used a method like send_simple_message, you have not - strictly speaking - "sent" the message. You have enqueued it to be sent. USOS API will try to send this message as fast as possible. You may check for the status of this operation here. | ||||||
message_ids | required |
Pipe-separated list of email addresses - recipients of the message IDs. You will need to sign your request with the same Consumer Key as the one you signed the original sending request with. Please note, that currently messages are kept for a period of 7 days. After this time, you won't be able to reference your message. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional | Required only if you've chosen jsonp as a return format. | ||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Token is not required. | ||||||
Returned value: Returns a dictionary where your message_ids will be mapped to a dictionary of the following structure
|
services/mailing/send_simple_by_template ¶
Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.
|
||||||
https://api.usos.tu.kielce.pl/services/mailing/send_simple_by_template | ||||||
Send multiple messages using a template. This method calls send_simple_message multiple times, each time with different contents, derived from a given simple template. All messages will be from the "USOS Notifier" address. | ||||||
subject_template | required | Subject of the message, might include template placeholders (see below). The length of each subject (after template substitution) might not exceed 200 characters. | ||||
content_template | required |
Content of the message, might include template placeholders. The length of each message content (after template substitution) might not exceed 15000 characters. Template placeholders are substrings in a form of {var_name}. Such strings will be replaced with the content of the var_name variable, which you will provide below (recipients argument). Keep in mind, that in order to use curly braces signs in your templates, you will need to escape them with one more curly brace ("{{" and "}}"). See here for more info on Python format strings. |
||||
recipients | required |
JSON-formatted, UTF-8 encoded list of dictionaries. Each dictionary represents one recipient and has the following structure:
|
||||
from_name | optional |
Default value: USOS Name to be inserted into the From header (no more than 100 characters). |
||||
from_email | optional | Email to be inserted into the From header (no more than 100 characters). Valid only is passed along the from_name argument. If not given, this will be a default no-reply address. | ||||
send_summary_to | optional | Email address. If given, USOS API will send a summary report to this address. This report will contain any errors USOS API encountered while sending the message. Original message content and recipients might be included. These reports might be split in several parts. | ||||
lang | optional |
Default value: pl Either pl or en - the language, in which USOS API will generate headers and signatures that might be added to your message prior to the sending. This will also be the language in which the optional summary report will be generated. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional | Required only if you've chosen jsonp as a return format. | ||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Token is not required. | ||||||
Returned value: A list of message IDs generated for your messages (one for each of the recipients). |
services/mailing/send_simple_message ¶
Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.
|
||||||
https://api.usos.tu.kielce.pl/services/mailing/send_simple_message | ||||||
Send an email message, to any given email address(es).
USOS API will automatically set all headers, apply word-wrap and append
USOS signature and/or comments.
| ||||||
subject | required | Subject of the message (no more than 200 characters). | ||||
content | required | Content of the message (no more than 15000 characters). | ||||
recipients | required | Pipe-separated list of email addresses - recipients of the message. | ||||
from_name | optional |
Default value: USOS Name to be inserted into the From header (no more than 100 characters). |
||||
content_format | optional |
Default value: plain Type of content argument. Valid ones:
|
||||
from_email | optional | Email to be inserted into the From header (no more than 100 characters). Valid only is passed along the from_name argument. If not given, this will be a default no-reply address. | ||||
send_summary_to | optional | Email address. If given, USOS API will send a summary report to this address. This report will contain any errors USOS API encountered while sending the message. Original message content and recipients might be included. These reports might be split in several parts. | ||||
lang | optional |
Default value: pl Either pl or en - the language, in which USOS API will generate headers and signatures that might be added to your message prior to the sending. This will also be the language in which the optional summary report will be generated. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional | Required only if you've chosen jsonp as a return format. | ||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Token is not required. | ||||||
Returned value: The method returns a dictionary of the following structure:
|
services/mailing/send_simple_messages ¶
Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.
|
||||||
https://api.usos.tu.kielce.pl/services/mailing/send_simple_messages | ||||||
Call send_simple_message multiple times in one call. This is useful when you
want to send bulk messages with different content.
| ||||||
param_sets | required |
JSON-formatted, UTF-8 encoded list of dictionaries. Each dictionary is the set of parameters with which the send_simple_message method is to be invoked with. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional | Required only if you've chosen jsonp as a return format. | ||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Token is not required. | ||||||
Returned value: This method never fails (always returns HTTP 200). All of your calls are executed sequentially. If one fails, others still will be executed. Method will return a list of Message IDs. n-th element on this list corresponds to the n-th dictionary in the param_sets list. If n-th call fails (invalid arguments will be passed), then the n-th element will contain a single boolean false. No additional explanation (as to the cause of the error) will be returned. If you need error message, use the send_simple_message method (call it multiple times). |
services/mailing/system_status ¶
|
||||||
https://api.usos.tu.kielce.pl/services/mailing/system_status | ||||||
Get information on the status of the mailing module.
| ||||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional | Required only if you've chosen jsonp as a return format. | ||||
Plus optional standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Token is not required. | ||||||
Returned value: A dictionary of the following structure:
Please note, that each recipient of one message is counted separately (i.e. if you send one message to 3 recipients, then the number of total unsent messages will increase by 3). |