Kartra Documentation TECHNICAL DOCUMENTATION

Success and error confirmation messages

After receiving your API call, Kartra should ping-back a confirmation message upon request: either a success or an error message.

All error or success messages are sent with HTTP response status code 200.

Most of these confirmation messages are usually composed of 3 pieces of information:

  1. Status of your API call: success or error.
  2. Short description text message.
  3. The message type (message ID number) for easy identification.

 

Below is the full list of errors if your API call fails to establish the connection with our API server:

{
  "status": "Error",
  "message": "Connection not secure",
  "type": "201"
}

{
  "status": "Error",
  "message": "API key cannot be empty. Please get an API key first",
  "type": "202"
}

{
  "status": "Error",
  "message": "API key not valid. Please get an API key first",
  "type": "203"
}

{
  "status": "Error",
  "message": "API password not valid. Please get an API password first",
  "type": "233"
}

{
  "status": "Error",
  "message": "API Account inactive",
  "type": "204"
}

{
  "status": "Error",
  "message": "API Account banned",
  "type": "205"
}

{
  "status": "Error",
  "message": "'cmd' is required",
  "type": "254"
}

{
  "status": "Error",
  "message": "email or lead id is required. Nothing done",
  "type": "206"
}

{
  "status": "Error",
  "message": "'lead' not an array",
  "type": "223"
}

{
  "status": "Error",
  "message": "'get_lead' not an array",
  "type": "236"
}

{
  "status": "Error",
  "message": "'actions' not an array",
  "type": "224"
}

 

Here are the error messages related to the App itself:

{
  "status": "Error",
  "message": "App Id cannot be empty. Please get an App Id first",
  "type": "238"
}

{
  "status": "Error",
  "message": "App Id is not valid. The app does not exists or is inactive",
  "type": "239"
}

{
  "status": "Error",
  "message": "App Account inactive",
  "type": "240"
}

{
  "status": "Error",
  "message": "App Account banned",
  "type": "241"
}

{
  "status": "Error",
  "message": "This API call was sent from an unauthorized IP",
  "type": "242"
}

{
  "status": "Error",
  "message": "App does not have permission to execute this CMD",
  "type": "262"
}

The specific actions success and error messages are detailed inside each of the action page itself.

Here are the confirmation messages related to action get_transactions_from_lead:

{
  "status": "Error",
  "message": "No lead found",
  "type": 234
}

{
  "status": "Success",
  "actions": [
    {
      "get_transactions_from_lead": {
        "transaction_list": [
          {
            "transaction_id": "123456",
            "buyer_first_name": "Test",
            "buyer_last_name": "Test",
            "buyer_email": "test@test.com",
            "buyer_username": "test123",
            "buyer_id": "1234",
            "product_name": "Test Product",
            "product_id": "1234",
            "product_price_point": "1",
            "transaction_amount": "20.99",
            "transaction_full_amount": "20.99",
            "transaction_base_amount": "20.99",
            "transaction_affiliate": "N/A",
            "transaction_jv": "N/A",
            "transaction_date": "2018-07-06 00:00:00",
            "transaction_type": "sale",
            "transaction_parent_id": "0",
            "transaction_subscription_id": "7608",
            "transaction_internal_subscription_id": "7608",
            "transaction_subscription_pay_number": "1",
            "original_id": "123456",
            "buyer_billing_country": "United States",
            "buyer_billing_country_code_2": "US",
            "buyer_billing_country_code_3": "USA",
            "buyer_billing_state": "New York",
            "buyer_billing_phone_country_code": "55",
            "buyer_billing_phone_number": "555555",
            "buyer_billing_address": "test",
            "buyer_billing_city": "test",
            "buyer_billing_zip": "test",
            "transaction_discount": "N/A",
            "transaction_tax": "N/A",
            "vendor_tracking_id_1": "N/A",
            "vendor_tracking_id_2": "N/A",
            "price": "20.99",
            "rebill_circle": "1",
            "payments_left": "9999",
            "shipping_first_name": "test",
            "shipping_last_name": "test",
            "shipping_address": "test",
            "shipping_city": "test",
            "shipping_zip": "test",
            "shipping_country": "United States",
            "shipping_state": "New York",
            "transaction_shipping": "0.00",
            "payment_processor_type": "Stripe"
          }
        ]
      }
    }
  ]
}

 

Here are the confirmation messages related to action get_subscriptions_from_lead:

{
  "status": "Error",
  "message": "No lead found",
  "type": 234
}

{
  "status": "Success",
  "actions": [
    {
      "get_subscriptions_from_lead": {
        "status": "Success",
        "subscription_list": [
          {
            "transaction_subscription_id": "31351",
            "transaction_internal_subscription_id": "31351",
            "transaction_subscription_status": "Active",
            "buyer_id": "123456",
            "buyer_email": "test@test.com"
          }
        ]
      }
    }
  ]
}

 

© 2021 Kartra All Rights Reserved