< / >

Insert

Insert records in Collections and their obligations

URL:

https://{{crm_server}}/server/API/v2/collections/massiveCollections.php

 

Description:

This API allows the bulk insertion of records into the Collections module of wolkvox CRM, including case files and their respective obligations. A case file represents a customer’s information, while obligations are the payment commitments associated with that customer.

This API is designed to facilitate the structured and efficient loading and updating of large volumes of data.

 

How it works?

  • This API is consumed using the POST method.
  • In the request header, the “Wolkvox-Token” is required, containing the token generated for the operation.
  • The API URL includes a placeholder {{crm_server}}, which must be replaced with the specific server where the customer’s operation is hosted. Currently, the available servers are:
    • “sv0001.crmvox.com”
    • “crm.wolkvox.com”
  • The request body must be formatted as “raw”.

 

How to Use the URL?

The API URL includes a placeholder {{crm_server}}, which must be replaced with the specific server where the customer’s operation is hosted.

 

Available servers

  • sv0001.crmvox.com
  • crm.wolkvox.com

 

How to determine your CRM servers?

  • Access the CRM homepage using the link: https://crm.wolkvox.com/.
  • Log in using your CRM credentials.
  • Once logged in and on the homepage of your CRM platform, check the address bar in your web browser. The URL in this bar indicates the server where your operation is hosted.
  • Replace {{crm_server}} in the original API URL with the specific URL of your CRM server to ensure the API correctly points to your CRM instance.

 

Important notice: URL path update

Starting September 1, 2024, new URLs will be implemented to access the wolkvox CRM platform. The current URLs will coexist with the new ones until November 30, 2024, when they will be deactivated.

 

Nuevas URLs:

From “https://sv0001.crmvox.com” to “https://crm0001.wolkvox.com

From “https://sv0000.crmvox.com” to “https://crm0000.wolkvox.com

Please ensure you update your integrations and automations before November 30, 2024, to avoid service disruptions.

REQUEST

KEY
DESCRIPTION
EXAMPLE
Wolkvox-Token
Token configured for the client on the CRM page.
A8K3J7F2
operation
Name of the CRM operation.
“operation”: “moduletest03”
collections
List of client records (debts) to insert with their respective obligations.
Identification
Unique identification of the client. This field is mandatory.
“Identification”: “12345”
Name
Client’s name. This field is mandatory.
“Name”: “John Doe”
Email
Client’s email address. This field is mandatory.
“Email”: “john.doe@wolkvox.com”
Telephone
Client’s phone number. This field is mandatory.
“Telephone”: “31949”
Address
Client’s address.
“Address”:”John Doe, 1234 Elm Street, Apt. 5B, Los Angeles, CA 90001, United States”
custom_field
Custom fields can be included in the Collections module.
“custom_field”:”value”
id
Unique identification of the obligation. This field is mandatory.
“id”: “02”
name
Name of the obligation. This field is mandatory.
“name”: “oblg2”
total_balance
Total balance of the obligation.
“total_balance”: “1000”
expiring_date
Expiration date (YYYY-MM-DD).
“expiring_date”: “2025-02-03”
days_delay
Days overdue.
“days_delay”: “33”
portfolio_type
Type of portfolio to which the obligation belongs.
“portfolio_type”:”TestPortfolio”
last_pay
Last payment made.
“last_pay”:”500″
last_pay_date
Date of the last payment (YYYY-MM-DD).
“last_pay_date”:”2025-01-09″
balance_payment
Outstanding balance of the payment.
“balance_payment”:”500″
obligation_custom_field
Custom fields can be included in the Obligations module.
“obligation_custom_field”:”value”

REQUEST

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{{crm_server}}/server/API/v2/collections/massiveCollections.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "operation": "",
    "collections": [
        {
            "Identification": "",
            "Name": "",
            "Email": "",
            "Telephone": "",
            "Address": "",
            "Obligations": [
                {
                    "id": "",
                    "name": "",
                    "total_balance": "",
                    "expiring_date": "",
                    "days_delay": "",
                    "portfolio_type": "",
                    "last_pay": "",
                    "last_pay_date": "",
                    "balance_payment": ""
                }
            ]
        },
        {
            "Identification": "",
            "Name": "",
            "Email": "",
            "Telephone": "",
            "Address": "",
            "Obligations": [
                {
                    "id": "",
                    "name": "",
                    "total_balance": "",
                    "expiring_date": "",
                    "days_delay": "",
                    "portfolio_type": "",
                    "last_pay": "",
                    "last_pay_date": "",
                    "balance_payment": ""
                }
            ]
        }
    ]
}',
  CURLOPT_HTTPHEADER => array(
    'Wolkvox-Token: {{Wolkvox-Token}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

RESPONSE

KEY
DESCRIPTION
TYPE
code
Indicates the response status code.
String
success
true if the operation was successful, false if there were errors.
Boolean
total_records_received
Total number of records received in the request.
Integer
successful_inserts
Number of records successfully inserted.
Integer
failed_count
Identification of the case prefix.
Integer
total_processed
Total number of processed records.
Integer
failed_Sumary
Details of the failed records, in case of errors.
Array
{
    "code": "200",
    "success": true,
    "summary": {
        "total_records_received": ,
        "successful_inserts": ,
        "failed_count": ,
        "total_processed": ,
        "failed_Sumary": []
    }
}
Possible error codes