php

Authentication

For the use of all the functions and resources of our API, each request must be authenticated with the use of APIKEY to identify your account.

Products

Send Product

Example:

$params = array(
    'apikey' => 'xxxxxxxxx',
    'id_product' => '*id_product*',
    'destination' => '+13055555555',
    'key' => '*key*',
    'note' => '*note*',
);
try {
    $session = curl_init("https://www.innoverit.com/api/v2/product/send");
    if (FALSE === $session)
       throw new Exception("Initialization Failed");
    curl_setopt($session, CURLOPT_POST, true);
    curl_setopt($session, CURLOPT_POSTFIELDS, http_build_query($params));
    curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($session, CURLOPT_HEADER, false);
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($session);
    if (FALSE === $response)
        throw new Exception(curl_error($ch), curl_errno($ch));
    curl_close($session);
    // ...process $response now
    return $response;
}
catch(Exception $e){
    trigger_error(
        sprintf(
        'Curl Failed Error #%d: %s',$e->getCode(),
        $e->getMessage()),
        E_USER_ERROR
    );
}

The above endpoint returns JSON structured like this:

{
    "error_code": 0,
    "status": "success",
    "message": "Product sent successfully.",
    "recharge_id": 1111111,
    "destination": "+13055555555"
    "reference_code": "11111111",
    "balance": 11.11,
}

This endpoint sends the specified product to the API through the id_product parameter.

HTTP Request

POST https://www.innoverit.com/api/v2/product/send

Query Parameters

Parameter Required Description
apikey true Key provided by our system to be able to identify with your account in the API.
id_product true ID that identifies the product to be sent, this ID is obtained in the list of products that is exported from our user panel.
destination true Destination where the product will be sent.
key false External ID provided by the client to register with the transaction.
note false Note that the customer wants to register with the transaction (It should not be more than 200 characters).

These parameters must be submitted together with the request parameters when purchasing this type of product.

Parameter Required Description
name true Customer Name.
first_lastname true Customer First Last Name
second_lastname true Customer Second Last Name
email true Customer Email.
cellphone_number true Customer Cell Phone Number.
street true Address: Customer Street
exterior_number true Address: Exterior Number
interior_number false Address: Interior Number
zipcode true Address: Zipcode
colony true Address: Colony
municipality true Address: Municipality
state true Address: State

To send food combos the following information is required: First Name, Last Name, Address, City, Phone Number.

This information must be sent in the destination field, in this way: First_name___Last_Name___Address___City___phone_number

To separate each field, 3 underlines (___) must be used and the spaces are replaced by 1 underline (_).

Get Transaction Details

Example:

$params = array(
    'apikey' => 'xxxxxxxxx',
    'key' => '*key*',
);
try {
    $session = curl_init("https://www.innoverit.com/api/v2/product/get/details");
    if (FALSE === $session)
       throw new Exception("Initialization Failed");
    curl_setopt($session, CURLOPT_POST, true);
    curl_setopt($session, CURLOPT_POSTFIELDS, http_build_query($params));
    curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($session, CURLOPT_HEADER, false);
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($session);
    if (FALSE === $response)
        throw new Exception(curl_error($ch), curl_errno($ch));
    curl_close($session);
    // ...process $response now
    return $response;
}
catch(Exception $e){
    trigger_error(
        sprintf(
        'Curl Failed Error #%d: %s',$e->getCode(),
        $e->getMessage()),
        E_USER_ERROR
    );
}

The above endpoint returns JSON structured like this:

{
    "status": "success",
    "recharge": {
        "country": "Country Name",
        "operator": "Operator Name",
        "local_amount": "25 USD",
        "date": "2021-01-13 00:00:00"
        "topup_status": "Released",
        "number": "+13055555555",
        "reference_code": "11111111",
        "note": "note here",
        "key": "xxxxxxxxxxx",
        "recharge_id": 11111111,
    }
}

This endpoint returns the details of a transaction through the key value that you register with your product.

HTTP Request

POST https://www.innoverit.com/api/v2/product/get/details

Query Parameters

Parameter Required Description
apikey true Key provided by our system to be able to identify with your account in the API.
key true External ID provided by the client registered with the transaction.

Get Operator

Example:

$params = array(
    'apikey' => 'xxxxxxxxx',
    'destination' => '*number*',
);
try {
    $session = curl_init("https://www.innoverit.com/api/v2/product/get/operator");
    if (FALSE === $session)
       throw new Exception("Initialization Failed");
    curl_setopt($session, CURLOPT_POST, true);
    curl_setopt($session, CURLOPT_POSTFIELDS, http_build_query($params));
    curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($session, CURLOPT_HEADER, false);
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($session);
    if (FALSE === $response)
        throw new Exception(curl_error($ch), curl_errno($ch));
    curl_close($session);
    // ...process $response now
    return $response;
}
catch(Exception $e){
    trigger_error(
        sprintf(
        'Curl Failed Error #%d: %s',$e->getCode(),
        $e->getMessage()),
        E_USER_ERROR
    );
}

The above endpoint returns JSON structured like this:

{
    "status": "success",
    "message": "Successful Request",
    "destination": "+525555555555",
    "Operator": "Mi Movil",
}

This endpoint returns the name of the operator to which the number sent with the request belongs.
This endpoint is only valid for Mexico.

HTTP Request

POST https://www.innoverit.com/api/v2/product/get/operator

Query Parameters

Parameter Required Description
apikey true Key provided by our system to be able to identify with your account in the API.
destination true The number the Operator wants to know about.

Get History

Example:

$params = array(
    'apikey' => 'xxxxxxxxx',
    'start' => 0,
    'number' => '+13055555555',
);
try {
    $session = curl_init("https://www.innoverit.com/api/v2/product/get/history");
    if (FALSE === $session)
       throw new Exception("Initialization Failed");
    curl_setopt($session, CURLOPT_POST, true);
    curl_setopt($session, CURLOPT_POSTFIELDS, http_build_query($params));
    curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($session, CURLOPT_HEADER, false);
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($session);
    if (FALSE === $response)
        throw new Exception(curl_error($ch), curl_errno($ch));
    curl_close($session);
    // ...process $response now
    return $response;
}
catch(Exception $e){
    trigger_error(
        sprintf(
        'Curl Failed Error #%d: %s',$e->getCode(),
        $e->getMessage()),
        E_USER_ERROR
    );
}

The above endpoint returns JSON structured like this:

{
    "status": "success",
    "total_rows": 55,
    "start": 0,
    "recharges": [
        {
            "country": "Country Name",
            "operator": "Operator Name",
            "local_amount": "25 USD",
            "date": "2021-01-13 00:00:00"
            "topup_status": "Released",
            "number": "+13055555555",
            "reference_code": "11111111",
            "note": "note here",
        }
        ...
    ]
}

This endpoint returns the products history.

HTTP Request

POST https://www.innoverit.com/api/v2/product/get/history

Query Parameters

Parameter Required Description
apikey true Key provided by our system to be able to identify with your account in the API.
start false Specify where to start when obtaining the history, this parameter can be 0, 10, 20, 30, 40, etc...
destination false Destination to search within history.

Get Balance

Example:

$params = array(
    'apikey' => 'xxxxxxxxx',
);
try {
    $session = curl_init("https://www.innoverit.com/api/v2/product/get/balance");
    if (FALSE === $session)
       throw new Exception("Initialization Failed");
    curl_setopt($session, CURLOPT_POST, true);
    curl_setopt($session, CURLOPT_POSTFIELDS, http_build_query($params));
    curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($session, CURLOPT_HEADER, false);
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($session);
    if (FALSE === $response)
        throw new Exception(curl_error($ch), curl_errno($ch));
    curl_close($session);
    // ...process $response now
    return $response;
}
catch(Exception $e){
    trigger_error(
        sprintf(
        'Curl Failed Error #%d: %s',$e->getCode(),
        $e->getMessage()),
        E_USER_ERROR
    );
}

The above endpoint returns JSON structured like this:

{
  "status": "success",
  "balance" : "55.55"
}

This end point returns the remaining balance of your account.

HTTP Request

POST https://www.innoverit.com/api/v2/product/get/balance

Query Parameters

Parameter Required Description
apikey true Key provided by our system to be able to identify with your account in the API.

SMS

Send SMS

Example:

$params = array(
    'apikey' => 'xxxxxxxxx',
    'content' => '*content*',
    'number' => '+13055555555',
);
try {
    $session = curl_init("https://www.innoverit.com/api/v2/sms/send");
    if (FALSE === $session)
       throw new Exception("Initialization Failed");
    curl_setopt($session, CURLOPT_POST, true);
    curl_setopt($session, CURLOPT_POSTFIELDS, http_build_query($params));
    curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($session, CURLOPT_HEADER, false);
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($session);
    if (FALSE === $response)
        throw new Exception(curl_error($ch), curl_errno($ch));
    curl_close($session);
    // ...process $response now
    return $response;
}
catch(Exception $e){
    trigger_error(
        sprintf(
        'Curl Failed Error #%d: %s',$e->getCode(),
        $e->getMessage()),
        E_USER_ERROR
    );
}

The above endpoint returns JSON structured like this:

{
    "error_code": 0,
    "status": "success",
    "message": "SMS sent successfully.",
    "destination": '+13055555555',
    "content": "content"
    "idsms": 1111111,
    "cost": 0.01,
    "iso": "US",
    "balance": 11.11,
}

This endpoint sends the specified SMS to the API.

HTTP Request

POST https://www.innoverit.com/api/v2/sms/send

Query Parameters

Parameter Required Description
apikey true Key provided by our system to be able to identify with your account in the API.
content true Text that will be received at the destination number (It must not be more than 160 characters - For USA and Canada the limit of SMS is 148 characters)).
number true Destination number where the sms will be sent

Get Balance

Example:

$params = array(
    'apikey' => 'xxxxxxxxx',
);
try {
    $session = curl_init("https://www.innoverit.com/api/v2/sms/get/balance");
    if (FALSE === $session)
       throw new Exception("Initialization Failed");
    curl_setopt($session, CURLOPT_POST, true);
    curl_setopt($session, CURLOPT_POSTFIELDS, http_build_query($params));
    curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($session, CURLOPT_HEADER, false);
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($session);
    if (FALSE === $response)
        throw new Exception(curl_error($ch), curl_errno($ch));
    curl_close($session);
    // ...process $response now
    return $response;
}
catch(Exception $e){
    trigger_error(
        sprintf(
        'Curl Failed Error #%d: %s',$e->getCode(),
        $e->getMessage()),
        E_USER_ERROR
    );
}

The above endpoint returns JSON structured like this:

{
  "status": "success",
  "balance" : "55.55"
}

This end point returns the remaining balance of your account.

HTTP Request

POST https://www.innoverit.com/api/v2/sms/get/balance

Query Parameters

Parameter Required Description
apikey true Key provided by our system to be able to identify with your account in the API.

Physical Locations

Example:

$params = array(
    'apikey' => 'xxxxxxxxx',
    'country' => '*country*',
    'state' => '*state*',
    'address' => '*address*',
    'business' => '*business*',
    'store' => '*store*',
    'start' => 0,
    'per_page' => 10,
);
try {
    $session = curl_init("https://www.innoverit.com/api/v2/locations");
    if (FALSE === $session)
       throw new Exception("Initialization Failed");
    curl_setopt($session, CURLOPT_POST, true);
    curl_setopt($session, CURLOPT_POSTFIELDS, http_build_query($params));
    curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($session, CURLOPT_HEADER, false);
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($session);
    if (FALSE === $response)
        throw new Exception(curl_error($ch), curl_errno($ch));
    curl_close($session);
    // ...process $response now
    return $response;
}
catch(Exception $e){
    trigger_error(
        sprintf(
        'Curl Failed Error #%d: %s',$e->getCode(),
        $e->getMessage()),
        E_USER_ERROR
    );
}

The above endpoint returns JSON structured like this:

{
    "error_code": 0,
    "status": "success",
    "start": 0,
    "per_page": 10,
    "total_rows": 31,
    "business": 
    [
        {
            "country": "United States",
            "iso": "US",
            "state": "Idaho",
            "address": "608 N Orchard St Boise ID 83706 US",
            "store": "Shankaron Market",
            "business": "Boss Revolution",
            "longitude": "",
            "latitude": "",
        },
        ...
    ],
}

HTTP Request

POST https://www.innoverit.com/api/v2/locations

Query Parameters

Parameter Required Description
apikey true API Key provided by our system to authenticate your account.
start false Numeric field that defines the initial item for pagination, default value: 0
per_page false Numeric field that defines the number of items to display per page, default value: 10.
country false Filter to obtain the physical store locations in a specific country.
state false Filter to obtain the State of a physical address in a country already selected.
address false Filter to obtain the physical address of the country and state already selected.
business false Get the business company name of the physical location.
store false Get the physical address of a specific store.

Errors Codes

Error Codes - Products

error_code status message description
0 success Product sent successfully. All the parameters have been received without problems and the product has been sent successfully.
101 error Your api key is required. The api key has not been received.
102 error Your api key is invalid. The api key received does not exist.
103 error Your account is deactivated. The account is deactivated in our system. You should contact our support team to verify your account.
104 error You have reached the credit limit in your account. Please pay the generated invoice. You have reached the limit of your credit and can not continue using our services until you pay the invoice that has been generated.
105 error Destination is required. The destination to which you want to send the product has not been received.
106 error id_product must be a whole number. The id_product parameter is mandatory, and it has to be a whole number.
107 error Destination is not valid. The destination received was processed by our system and it is determined that the destination is not valid.
108 error Product is not available. The id_product that we have received does not exist.
109 error Your funds are insufficient to send this product. Your funds are insufficient to send this product.
110 error id_product is required. The id_product you want to send was not received, this parameter is necessary.
112 error One or more required field is missing. This error is returned when a required parameter is missing when purchasing SIM or SIM + Cell phone
113 error Unknown error. An unknown error has occurred sending the product, please contact us for more details or try sending it again.
114 error Error verifying destination. The verification of the destination has failed.
116 error Duplicate Recharge This product cannot be sent at the moment, please wait 5 minutes to retry.
117 error You do not have access to obtain a balance. The subaccount does not have access to obtain a balance.
118 error Number of characters in the note exceeded 200 maximum. If the parameter Note is received it cannot exceed 200 characters.
119 error The destination is blaklisted. The destination cannot be used, the destination is blacklisted.
121 error Your account does not have access to this API. Subaccount does not have access to this API.
122 error Your weekly fund limit has been exceeded. This product cannot be sent. Subaccount exceeded the weekly funds limit.
123 pending This transaction is under review. This transaction is under review, please contact our support team right away.
124 error Key already used The key you are trying to register is already in use
125 error Key does not exist. There is no transaction with this key.
126 error Key is required. The key parameter was not received
127 error The number does not belong to the operator. The number received does not belong to the operator of the product.
128 error No operator found for this number. We did not find the operator of the number received with the request.
129 error You are not allowed to use this api. The source IP address from where you make the requests is not added to the Whitelist of your account.

Error Codes - SMS

error_code status message description
0 success SMS sent successfully. All the parameters have been received without problems and the SMS has been sent successfully.
101 error SMS could not be sent. SMS failed to be sent, please contact us for more details and to solve this error.
102 error Your api key is required or is invalid. The apikey has not been received or is incorrect.
103 error You have reached the credit limit in your account. Please pay the generated invoice. You have reached the limit of your credit and can not continue using our services until you pay the invoice that has been generated.
104 error Content and number are required. The content or number fields have not been received, both fields are necessary to send the SMS.
105 error Number cannot be reached. The number you have received has gone through a recognition process and could not be verified.
106 error Your funds are insufficient to send this SMS. Your funds are insufficient to send this SMS.
107 error Mobile number in Cuba has 8 digits. Mobile number in Cuba has 8 digits.
108 error Mobile number on Cuba start with 5. Mobile number on Cuba start with 5.
109 error Your account is deactivated. The account is deactivated in our system. You should contact our support team to verify your account.
110 error Limit of characters was exceeded. Number of characters in the content exceeded 160 maximum (For USA and Canada the limit of SMS is 148 characters).
111 error Blocked Message Content has prohibited words or phrases.
112 error The destination number is blacklisted. The destination number is blacklisted.
121 error Your account does not have access to this API. Subaccount does not have access to this API.
121 error Your weekly fund limit has been exceeded. This sms cannot be sent. Subaccount exceeded the weekly funds limit.
129 error You are not allowed to use this api. The source IP address from where you make the requests is not added to the Whitelist of your account.

Error Codes - Physical Locations

error_code status message description
0 success Physical locations obtained successfully. All the parameters have been received without problems and the business addresses obtained successfully.
101 error Your api key is required. The api key has not been received.
102 error Your api key is invalid. The api key received does not exist.
103 error Your account is deactivated. The account is deactivated in our system. You should contact our support team to verify your account.
108 error No business or addresses found. With the parameters received, no physical locations or address was found that matches.
129 error You are not allowed to use this api. The source IP address from where you make the requests is not added to the Whitelist of your account.
php