YAP Commands
|
Options With Examples
|
Login command:
login_op
|
Initiated by the SMS client to login.
- username: Login username from ViaNett.
- password: Password from ViaNett.
- encoding: If "UTF-8" specified, UTF-8 encoding used, otherwise ISO-8859-1.
- refno: Reference ID (usually increases by 1 for each login attempt). Values should be between 1 and 2147483647.
- version: Client version.
Example: login_op: refno=6 username=xxxx password=xxxx
|
Login acknowledge:
login_op_ack
|
Initiated by the SMS server to acknowledge the login command.
- If ack_code =200 means OK.
- if ack_code=500 means not OK.
Example:
login_op_ack: ack_code=200 refno=6
|
Logout command:
logout_op
|
Initiated by the SMS client to log out.
- refno: Reference ID (usually increases by 1 for each attempt). Values should be between 1 and 2147483647.
Example: logout_op: refno=1
|
Logout acknowledge:
logout_op_ack
|
Initiated by the SMS server to acknowledge the logout command.
- refno: Reference ID (same as the one provided in logout_op).
Example:
logout_op_ack: refno=1
|
Sending SMS:
sms_to_op
|
Initiated by the SMS client to send message .
- refno: Unique reference for the message.
- sno: Numeric sender address.
- message: Message content.
- header: Message header such as binary messages.
- msn: Destination address.
- fromalpha: Non-numeric sender address such as James or James123.
- operator: Is 0 for default routing, otherwise gateway ID.
- pricegroup: Check the billing page.
- nrq: Notification request (delivery report).
- referenceid: Provide the value from the incoming message, where applicable.
- priority: Should normally be 0, a value > 0 will be a priority message, a value < 0 will be a non-priority message.
- campaignid: The campaign ID.
- activatereplypath: Set to 0 for non-replypath messages, or for the number of seconds the replypath should be valid for this message.
- replypathid: The ID that will be returned for the incoming replypath message reply.
- senddate: Optional, schedule the message at a later date in ViaNett's systems.
- smscscheduledate: Optional, schedule the message at a later date at the SMSC (usually not supported).
- mms: Optional, base64-encoded MMS ZIP file.
Example: sms_to_op: refno=7 sno=1963 msn=4791748750 pricegroup=0 msg=test srcoperator=0.
Please be aware that to encode a space, you should use %20, as + is not decoded as a space.
|
Sending SMS and acknowledge:
sms_to_op_ack
|
Initiated by the SMS server.
- ack_code: 200 OK, 500 error, 400 syntax error
- refno: To reference the message.
Example: sms_to_op_ack: ack_code=200 refno=7
|
Receiving SMS:
sms_from_op
|
Initiated by the SMS server.
- msn: Source address.
- msg: Message content.
- Replypath: True/false, depending on whether replypath is active.
- replypathid: The ID of the outgoing message to which this incoming message is a response, if replypath is activated.
- accessnumber: The short code to which the message has been sent.
- destnr: Destination address (usually the same as accessnumber, with some exceptions, e.g. replypath in Norway).
- srcoperator: The teleop from which the incoming message originates.
- campaignid: The campaignid of the incoming message.
- referenceid: Reference value (needs to be specified on outgoing response messages in some cases).
Example: sms_from_op: msn=4791748750 msg=Test srcoperator=1 refno=230974
|
Receiving delivery reports:
delivery_from_op
|
Initiated by the SMS server.
- msgid: Every message has an ID.
- msn:Destination address of message.
- srcoperator: The operator via which the message was sent.
- mcc: Mobile Country Code.
- mnc: Mobile Network Code.
- smscid: ViaNett's internal message ID.
- campaignid: The ID of the campaign the message was sent on.
- ok: True/false, depending on whether the message was successfully submitted.
- sentdate: The date the message was sent.
- deliverydate: The date the delivery report was received by us (for deliverytype 2 and 3).
- sno: The numeric sender address.
- fromalpha: The alphanumeric sender address.
- errorcode: The errorcode of the message.
- pricegroup: The pricegroup value the message was sent with.
- consumerprice: The end-user price of the message incl VAT.
- netprice: The operator payout excl VAT.
- cparevenue: The ViaNett customer revenue excl VAT.
- cut: Customer percentage of the revenue/cost (value 0-100).
- deliverystatus: Status of the message.
- deliverystatuscode: Status code of the message.
- deliverystatusdescription: Description of the meaning of the status code.
Example: delivery_from_op: msgid=7 ok=True srcoperator=1 sentdate=16.03.2004%2020%3A38%3A50 errorcode=200 refno=1234
|
Receiving delivery reports and acknowledge:
Delivery_from_op_ack
|
Initiated by the SMS client.
Example: Delivery_from_op_ack: refno=1234 |
Receiving SMS and acknowledge:
sms_from_op_ack
|
Initiated by the SMS client.
Example: sms_from_op_ack: refno=230974
|
Is alive:
is_alive
|
Initiated by the SMS client. Should be sent by the client once every 30 second in order to ensure that the connection remains active.
- seqno: A sequence number, incremented by 1 for each is_alive request. Values should be between 1 and 2147483647.
Example: is_alive: seqno=12345 |
Is alive acknowledgement:
is_alive_ack
|
Initiated by the SMS server.
- ack_code: 200 = OK, 0 = user is not logged in.
- seqno: The same as the seqno in the is_alive request.
Example: is_alive_ack: ack_code=200 seqno=12345
|