Constants
Error constants
General
OK = 0
- Request successful, no error occurred.
GENERIC_ERROR = 1
- Generic error (error should not occur while using API).
UNKNOWN_CURRENCY = 2
- Unknown currency.
UNKNOWN_LANGUAGE = 3
- Unknown language.
UNKNOWN_SERVICE = 4
- Unknown service. Service does not exists, or user is not allowed to use such service, or request is not valid for such service.
Constants for billing operations
BA_NOT_TARIFF = 10
- Invalid tariff.
BA_NOT_IN_ACCOUNT = 11
- Invalid income account.
BA_NOT_PRODUCT = 12
- Product does not exists.
BA_CURRENCY_DIFF = 13
- Accounts do not have corresponding currency.
BA_NOT_BPRODUCT = 14
- Product does not exists in tariff.
BA_NOT_PEER = 15
- Invalid account for billing.
BA_NOT_ACCOUNT = 16
- Account does not exist.
BA_NOT_BATPRODUCT = 17
- Tariff product does not exist.
BA_NOT_BATARIFF = 18
- Billing tariff does not exist.
BA_NOT_PRICE = 19
- Price not defined.
BA_LOW_CREDIT = 20
- Low credit.
BA_NOT_FROM_ACCOUNT = 21
- Invalid account for outcome.
User related constants
USER_MISSING = 50
- Invalid user or user not inserted.
USER_NOT_ADDRESS_TYPE = 51
- Invalid user address type.
USER_NOT_CONTACT_TYPE = 52
- Invalid user contact type.
USER_UNKNOWN_TYPE = 53
- Invalid user type.
USER_PASSWORD = 55
- Error while saving/changing password.
USER_UNKNOWN_VALUE = 56
- Error while saving user's value (value does not exists or is uneditable).
USER_CANNOT_CREATE = 57
- Logged user cannot create new users. Logged user cannot assign new user to another.
USER_LOGIN = 58
- New user is missing login name or passed login name is already in use.
API related constants
API_SIGNATURE_ERROR = 100
- Missing API identifier or identifier already used, or invalid user's login/password.
API_INCORRECT_SERVICE = 101
- Requested action (API call) does not belong to requested service.
WapPayments related API
WP_NOT_PARENT = 150
- WapPayment service or merchant is invalid.
WP_NOT_MERCHANT = 151
- Merchant identification is invalid.
SMS related constants
SMSOUTSMS_UNKNOWN_TYPE = 200
- Invalid SMS type.
SMSOUTSMS_UNKNOWN_STATE = 201
- Invalid SMS state.
SMSOUTSMS_MISSING_MSISDN = 202
- Invalid recipient.
SMSOUT_UNKNOWN_STATE = 203
- Invalid SMS part state.
SMSOUT_UNKNOWN_ENCODING = 204
- Invalid SMS encoding.
SMSOUTSMSE_UNKNOWN_SPLIT = 205
- Invalid SMS split type.
SMSOUTSMS_CANNOTSAVEANDSEND = 206
- SMS already saved and sent.
SMSOUTSMS_UNKNOWN_DSTATE = 207
- Invalid SMS delivery type.
SMSOUT_UNKNOWN_DSTATE = 208
- Invalid SMS part delivery type.
INVALID_SMS_SOURCE = 209
- Invalid SMS sender (source MSISDN/identifier).
Misc errors
PHONE_CANNOT_FIX = 100000
- Text cannot be converted to international phone number.
Type constants
Currency
Currency::CZK = 'CZK'
- Czech crown.
Currency::EUR = 'EUR'
- Euro.
Currency::KRD = 'KRD'
- Credit (virtual currency).
Language
Language::CS = 'cs'
- Czech language.
Language::EN = 'en'
- English language.
Language::SK = 'sk'
- Slovak language.
SMS part
Some SMS, as messages according to system (and API), cannot be sent as one message (e.g. if message has 250 characters). SMS is divided to several parts, that can be sent as one message in such a case. SMS part (as an object) exists always, regardless of whether whole SMS message must be divided (there is one message part for such SMS).
SMS part sending state
Smsout::STATE_NONE = 'none'
- SMS part sending state is undefined, such a state should not occur.
Smsout::STATE_WAITING = 'waiting'
- SMS part has been inserted and is waiting to be sent.
Smsout::STATE_SENDING = 'sending'
- System is sending SMS part.
Smsout::STATE_SENT = 'sent'
- SMS part has been sent.
Smsout::STATE_ERROR = 'error'
- SMS part cannot be sent.
SMS part delivery states
Smsout::DELIVERY_NOSTATE = 'nostate'
- There are no informations about delivery.
Smsout::DELIVERY_DELIVERED = 'delivered'
- SMS part has been delivered.
Smsout::DELIVERY_EXPIRED = 'expired'
- SMS part was not delivered. SMS part expired.
Smsout::DELIVERY_DELETED = 'deleted'
- SMS part was not delivered. SMS part was deleted.
Smsout::DELIVERY_UNDELIVERABLE = 'undeliverable'
-
SMS part was not delivered. SMS part is undeliverable.
SMS part was probably successfully passed for destination mobile operator but operator refuse such message (destination address probably does not exist).
Smsout::DELIVERY_ACCEPTED = 'accepted'
- SMS part was not delivered but SMS part was accepted by mobile operator.
Smsout::DELIVERY_UNKNOWN = 'unknown'
- SMS part was not delivered. Error is unknown.
Smsout::DELIVERY_REJECTED = 'rejected'
- SMS part was not delivered. SMS part was rejected.
Smsout::DELIVERY_DESTERROR = 'destaddrerror'
- SMS part was not delivered. Destination address is invalid.
Smsout::DELIVERY_SRCERROR = 'sourceaddrerror'
- SMS part was not delivered. Source address is invalid.
SMS part encoding
Smsout::ENCODING_7BITS = 7
- 7bit encoding. SMS contains only ASCII7 characters.
Smsout::ENCODING_8BITS = 8
- 8bit encoding. SMS is not text message (e.g. wappush).
Smsout::ENCODING_16BITS = 16
- 16bit encoding. SMS contains characters other than ASCII7 (e.g. Czech diacritic).
SMS
Whole SMS, as messages according to system (and API). SMS can be divided to several SMS parts before sending.
SMS type
SmsoutSms::TYPE_TEXT = 'text'
- Text message.
SmsoutSms::TYPE_WAPPUSH = 'wappush'
- Wappush message.
SmsoutSms::TYPE_PDU = 'pdu'
- Message defined by PDU (UDH + PDU).
SMS sending states
SmsoutSms::STATE_INSERTED = 'inserted'
- SMS inserted. SMS in such a state is delayed SMS. There are not SMS parts for such a message.
SmsoutSms::STATE_QUEUED = 'queued'
- SMS is waiting to be sent. SMS parts already created and waiting to be sent.
SmsoutSms::STATE_SENT = 'sent'
- All parts already sent.
SmsoutSms::STATE_SENDING = 'sending'
- Some parts are sending.
SmsoutSms::STATE_NOCREDIT = 'nocredit'
- This state can only appear if SMS is delayed and at the time of sending user has no credit (money) on account. SMS is not sent.
SmsoutSms::STATE_UNKNOWN = 'unknown'
- System is inserting SMS to database.
SMS delivery states
SmsoutSms::DELIVERY_NOSTATE = 'nostate'
- There are no informations about delivery.
SmsoutSms::DELIVERY_DELIVERED = 'delivered'
- All SMS parts has been delivered.
SmsoutSms::DELIVERY_EXPIRED = 'expired'
- At least one SMS part is in state
Smsout::DELIVERY_EXPIRED
. SmsoutSms::DELIVERY_DELETED = 'deleted'
- At least one SMS part is in state
Smsout::DELIVERY_DELETED
. SmsoutSms::DELIVERY_UNDELIVERABLE = 'undeliverable'
- At least one SMS part is in state
Smsout::DELIVERY_UNDELIVERABLE
. SmsoutSms::DELIVERY_ACCEPTED = 'accepted'
- At least one SMS part is in state
Smsout::DELIVERY_ACCEPTED
. SmsoutSms::DELIVERY_UNKNOWN = 'unknown'
- At least one SMS part is in state
Smsout::DELIVERY_UNKNOWN
. SmsoutSms::DELIVERY_REJECTED = 'rejected'
- At least one SMS part is in state
Smsout::DELIVERY_REJECTED
. SmsoutSms::DELIVERY_DESTERROR = 'destaddrerror'
- At least one SMS part is in state
Smsout::DELIVERY_DESTERROR
. SmsoutSms::DELIVERY_SRCERROR = 'sourceaddrerror'
- At least one SMS part is in state
Smsout::DELIVERY_SRCERROR
.
SMS is in state SmsoutSms::DELIVERY_NOSTATE in case there are delivery informations for all SMS parts.
SMS parts can have different delivery states in case SMS is divided to several parts. The list above is ordered according to precedance, SmsoutSms::DELIVERY_NOSTATE has the lowest precedence and SmsoutSms::DELIVERY_SRCERROR has the highest one. Whole SMS is in the highest state one of its part is having.
Additional SMS settings
SMS split type
Split type defines how text SMS is to be be divided if cannot be sent at once (and SMS parts will be created).
SmsoutSmsExtra::SPLIT_PLATFORM = 'platform'
- SMS will be divided according to spaces (so no word will be separated into 2 SMS parts). Each SMS part will begin with part number and all parts count (e.g. 2/5).
SmsoutSmsExtra::SPLIT_WORD = 'word'
- SMS will be divided according to spaces (so no word will be separated into 2 SMS parts).
SmsoutSmsExtra::SPLIT_WORD = 'char'
- Each SMS part will contain as many characters as possible (words can be divided to 2 parts).
SmsoutSmsExtra::SPLIT_CONCAT = 'concat'
- SMS will be sent as "long SMS" ("concatenated SMS"). This is specific type of how SMS is sent (SMS parts are sent), cell phone is able to join such parts and display them as one. Regular cell phones are able to join such messages.
User
User type
User::TYPE_USER = 'user'
- Regular user.
User::TYPE_CUSTOMER = 'customer'
- Customer. Such user is having its own system which uses ProfiSMS and can have its own users managed by ProfiSMS.
User::TYPE_ADMIN = 'admin'
- System administrator.
User::TYPE_SYSTEM = 'system'
- System (internal) user.
User address type
UserAddress::TYPE_INVOICE = 'invoice'
- Invoice address.
UserAddress::TYPE_POSTAL = 'postal'
- Postal address.
User contact type
UserContact::TYPE_EMAIL = 'email'
- Email address.
UserContact::TYPE_CELL = 'cell'
- Cell phone number.