### POST Advanced example Source: https://apidoc.inforu.co.il/#intro This endpoint allows for sending advanced WhatsApp messages with various customization options. ```APIDOC ## POST /api/v2/WhatsApp/SendWhatsApp ### Description Sends an advanced WhatsApp message with customizable parameters, including template usage, recipient details, and optional settings. ### Method POST ### Endpoint /api/v2/WhatsApp/SendWhatsApp ### Headers - Content-Type: application/json - Authorization: Your Base Credentials ### Parameters #### Request Body - **Data** (object) - Required - The main data payload for the message. - **TemplateId** (string) - Required - The ID of the WhatsApp template to use. - **ChatAssignToMe** (boolean) - Optional - Assign the chat to the current user. - **ChatAssignToUserId** (integer) - Optional - Assign the chat to a specific user ID. - **TemplateParameters** (array) - Optional - Parameters to populate the template. - **Name** (string) - Required - The name of the parameter in the template (e.g., `[#1#]`). - **Type** (string) - Required - The type of the parameter (e.g., `Contact`, `Custom`, `Link`). - **Value** (string) - Required - The value for the parameter. - **Buttons** (array) - Optional - Buttons to include with the message. - **ButtonIndex** (integer) - Required - The index of the button. - **FieldSource** (string) - Required - The source of the button field (e.g., `Contact`, `Custom`, `Text`). - **FieldName** (string) - Optional - The name of the field if `FieldSource` is `Contact` or `Custom`. - **Value** (string) - Optional - The static text value if `FieldSource` is `Text`. - **payload** (string) - Required - The payload associated with the button. - **Recipients** (array) - Required - A list of recipients for the message. - **Phone** (string) - Required - The recipient's phone number. - **CouponCode** (string) - Optional - A coupon code for the recipient. - **MessageMedia** (string) - Optional - A URL for media to send with the message. - **FirstName** (string) - Optional - The recipient's first name. - **LastName** (string) - Optional - The recipient's last name. - **MessageMediaFileUid** (string) - Optional - The UID of a media file. - **MediaFileName** (string) - Optional - The name of the media file. - **GroupNumbers** (array) - Optional - A list of group numbers to send to. - **GroupNumber** (string) - Required - The group number. - **ExcludeGroupNumbers** (array) - Optional - A list of group numbers to exclude from sending. - **GroupNumber** (string) - Required - The group number. - **Settings** (object) - Optional - Various settings for the message. - **CampaignName** (string) - Optional - The name of the campaign. - **TimeToSend** (datetime) - Optional - The desired time to send the message. - **DelayInSeconds** (integer) - Optional - Delay in seconds before sending. - **CustomerMessageID** (integer) - Optional - A custom message ID. - **CustomerParameter** (string) - Optional - A custom parameter. - **DeliveryNotificationUrl** (string) - Optional - URL for delivery notifications. - **Priority** (integer) - Optional - Priority of the message. - **IgnoreUnsubscribeCheck** (boolean) - Optional - Ignore unsubscribe check (contact support). - **ExpireDate** (datetime) - Optional - Expiration date for the message. - **IgnorePossibleSendingTime** (boolean) - Optional - Ignore system time limitations. - **CheckTimeRestiction** (boolean) - Optional - Ignore frequency time restrictions. - **AllowDuplicates** (boolean) - Optional - Allow sending the same message multiple times. - **TrackPurchaseTData** (boolean) - Optional - Associate purchasing data with the campaign (paid feature). - **ShortenUrlEnable** (boolean) - Optional - Replace URLs with shortened versions. ### Request Example ```json { "Data": { "TemplateId": "1216", "ChatAssignToMe": false, "ChatAssignToUserId": 1000222, "TemplateParameters": [ { "Name": "[#1#]", "Type": "Contact", "Value": "FirstName" }, { "Name": "[#2#]", "Type": "Custom", "Value": "CouponCode" }, { "Name": "[#3#]", "Type": "Link", "Value": "https://www.google.com" } ], "Buttons": [ { "ButtonIndex": 0, "FieldSource": "Contact", "FieldName": "טלפון", "payload": "id0303" }, { "ButtonIndex": 1, "FieldSource": "Custom", "FieldName": "CouponCode", "payload": "id0304" }, { "ButtonIndex": 3, "FieldSource": "Text", "Value": "test123", "payload": "id0305" } ], "Recipients": [ { "Phone": "0529999999", "CouponCode": "1ZG67893", "MessageMedia": "https://sample-videos.com/img/Sample-png-image-200kb.png" }, { "FirstName" : "Israeli", "LastName": "levi", "Phone": "0521234567", "CouponCode": "1ZG67894", "MessageMediaFileUid": "U@ZK59KA6S", "MediaFileName":"actualFileName.pdf" } ], "GroupNumbers": [ { "GroupNumber": "_INT_" } ], "ExcludeGroupNumbers": [ { "GroupNumber": "_INT_" } ], "Settings": { "CampaignName": "_STRING_", "TimeToSend": "_DATETIME_", "DelayInSeconds": "_INT_", "CustomerMessageID": "_INT_", "CustomerParameter": "_STRING_", "DeliveryNotificationUrl": "_STRING_", "Priority": "_INT_", "IgnoreUnsubscribeCheck": "_BOOL_", "ExpireDate": "_DATETIME_", "IgnorePossibleSendingTime": "_BOOL_", "CheckTimeRestiction": "_BOOL_", "AllowDuplicates": "_BOOL_", "TrackPurchaseTData": "_BOOL_", "ShortenUrlEnable" : "_BOOL_" } } } ``` ### Response (Response details not provided in the source text) ``` -------------------------------- ### POSTOTP example Source: https://apidoc.inforu.co.il/#intro This endpoint sends a WhatsApp message using a specified template. It is particularly useful for sending One-Time Passwords (OTP). ```APIDOC ## POST /api/v2/WhatsApp/SendWhatsApp ### Description Sends a WhatsApp message using a specified template, suitable for OTP delivery. ### Method POST ### Endpoint https://capi.inforu.co.il/api/v2/WhatsApp/SendWhatsApp ### Parameters #### Headers - **Content-Type** (string) - Required - application/json - **Authorization** (string) - Required - Your Base Credential #### Request Body - **Data** (object) - Required - **TemplateId** (int) - Required - The template ID in the system. - **TemplateParameters** (array) - Required - Parameters for the template. - **Name** (string) - Required - The name of the parameter in the template (e.g., "[#1#]"). - **Type** (string) - Required - Must be "OTP". - **Value** (string) - Required - The OTP code. - **Recipients** (array) - Required - List of recipients. - **Phone** (string) - Required - The contact Phone Number. ### Request Example ```json { "Data": { "TemplateId": "3938", "TemplateParameters": [ { "Name": "[#1#]", "Type": "OTP", "Value": "666" } ], "Recipients": [ { "Phone": "0542222222" } ] } } ``` ### Response #### Success Response (200) - **StatusId** (int) - Indicates the success status of the operation. - **StatusDescription** (string) - A description of the status. - **DetailedDescription** (string) - Further details about the status. - **FunctionName** (string) - The name of the function that was called. - **RequestId** (string) - A unique identifier for the request. - **Data** (object) - Contains data related to the operation. - **Recipients** (int) - The number of recipients processed. - **Errors** (null) - Placeholder for any errors encountered. #### Response Example ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/WhatsApp/SendWhatsApp", "RequestId": "sFmbyVGdulmL1J3bm5WauEjMnR3ckV3bsNWPl1WYOR3cvhkJ5ETQzUyM0E0MlcTMrQTMtkDMtEjMwITPw1WY0NVZtlGVmcjM4MDMwETPklkclNXV", "Data": { "Recipients": 1, "Errors": null } } ``` ``` -------------------------------- ### POST Advanced example Source: https://apidoc.inforu.co.il/#intro This endpoint allows sending advanced WhatsApp messages with various customization options. ```APIDOC ## POST /api/v2/WhatsApp/SendWhatsApp ### Description Sends advanced WhatsApp messages to specified recipients with customizable settings. ### Method POST ### Endpoint /api/v2/WhatsApp/SendWhatsApp ### Request Body - **Recipients** (array) - Required - List of recipients with their details. - **Phone** (string) - Required - Recipient's phone number. - **CouponCode** (string) - Optional - Coupon code for the recipient. - **MessageMedia** (string) - Optional - URL for media to be sent. - **FirstName** (string) - Optional - Recipient's first name. - **LastName** (string) - Optional - Recipient's last name. - **MessageMediaFileUid** (string) - Optional - Unique identifier for media file. - **MediaFileName** (string) - Optional - Name of the media file. - **GroupNumbers** (array) - Optional - List of group numbers to send to. - **GroupNumber** (string) - Required - The group number. - **ExcludeGroupNumbers** (array) - Optional - List of group numbers to exclude from sending. - **GroupNumber** (string) - Required - The group number. - **Settings** (object) - Optional - Settings for the campaign. - **CampaignName** (string) - Optional - Name of the campaign. - **TimeToSend** (datetime) - Optional - The scheduled time to send the message. - **DelayInSeconds** (integer) - Optional - Delay in seconds between messages. - **CustomerMessageID** (integer) - Optional - Customer-defined message ID. - **CustomerParameter** (string) - Optional - Customer-defined parameter. - **DeliveryNotificationUrl** (string) - Optional - URL for delivery notifications. - **Priority** (integer) - Optional - Priority of the message. - **IgnoreUnsubscribeCheck** (boolean) - Optional - Whether to ignore unsubscribe checks. - **ExpireDate** (datetime) - Optional - Expiration date for the message. - **IgnorePossibleSendingTime** (boolean) - Optional - Whether to ignore possible sending time restrictions. - **CheckTimeRestiction** (boolean) - Optional - Whether to check time restrictions. - **AllowDuplicates** (boolean) - Optional - Whether to allow duplicate messages. - **TrackPurchaseTData** (boolean) - Optional - Whether to track purchase data. - **ShortenUrlEnable** (boolean) - Optional - Whether to enable URL shortening. ### Request Example ```json { "Recipients": [ { "Phone": "0529999999", "CouponCode": "1ZG67893", "MessageMedia": "https://sample-videos.com/img/Sample-png-image-200kb.png" }, { "FirstName" : "Israeli", "LastName": "levi", "Phone": "0521234567", "CouponCode": "1ZG67894", "MessageMediaFileUid": "U@ZK59KA6S", "MediaFileName":"actualFileName.pdf" } ], "GroupNumbers": [ { "GroupNumber": "_INT_" } ], "ExcludeGroupNumbers": [ { "GroupNumber": "_INT_" } ], "Settings": { "CampaignName": "_STRING_", "TimeToSend": "_DATETIME_", "DelayInSeconds": "_INT_", "CustomerMessageID": "_INT_", "CustomerParameter": "_STRING_", "DeliveryNotificationUrl": "_STRING_", "Priority": "_INT_", "IgnoreUnsubscribeCheck": "_BOOL_", "ExpireDate": "_DATETIME_", "IgnorePossibleSendingTime": "_BOOL_", "CheckTimeRestiction": "_BOOL_", "AllowDuplicates": "_BOOL_", "TrackPurchaseTData": "_BOOL_", "ShortenUrlEnable" : "_BOOL_" } } ``` ### Response #### Success Response (200) - **StatusId** (integer) - Status of the operation. - **StatusDescription** (string) - Description of the status. - **DetailedDescription** (string) - Detailed description of the result. - **FunctionName** (string) - The function that was called. - **RequestId** (string) - Unique identifier for the request. - **Data** (object) - Contains data related to the response. - **Recipients** (integer) - Number of recipients processed. - **Errors** (object) - Information about any errors encountered. #### Response Example ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/WhatsApp/SendWhatsApp", "RequestId": ",wWYuJXZ05WauUncvZmbp5CMykGchNWPl1WYOR3cvhkJwMTQzUiM1E0MlUTMrkTMtMDMtYjMwITPw1WY0NVZtlGVmATMxYDOwETPklkclNXV", "Data": { "Recipients": 1, "Errors": null } } ``` ``` -------------------------------- ### POST WhatsApp Message - Advanced Example Source: https://apidoc.inforu.co.il/ This snippet demonstrates an advanced request body for sending WhatsApp messages. It includes details for multiple recipients with different media types and campaign settings. ```json { "Recipients": [ { "Phone": "0529999999", "CouponCode": "1ZG67893", "MessageMedia": "https://sample-videos.com/img/Sample-png-image-200kb.png" }, { "FirstName" : "Israeli", "LastName": "levi", "Phone": "0521234567", "CouponCode": "1ZG67894", "MessageMediaFileUid": "U@ZK59KA6S", "MediaFileName":"actualFileName.pdf" } ], "GroupNumbers": [ { "GroupNumber": "_INT_" } ], "ExcludeGroupNumbers": [ { "GroupNumber": "_INT_" } ], "Settings": { "CampaignName": "_STRING_", "TimeToSend": "_DATETIME_", "DelayInSeconds": "_INT_", "CustomerMessageID": "_INT_", "CustomerParameter": "_STRING_", "DeliveryNotificationUrl": "_STRING_", "Priority": "_INT_", "IgnoreUnsubscribeCheck": "_BOOL_", "ExpireDate": "_DATETIME_", "IgnorePossibleSendingTime": "_BOOL_", "CheckTimeRestiction": "_BOOL_", "AllowDuplicates": "_BOOL_", "TrackPurchaseTData": "_BOOL_", "ShortenUrlEnable" : "_BOOL_" } } ``` -------------------------------- ### WhatsApp API Success Response Source: https://apidoc.inforu.co.il/#intro This is an example of a successful response from the WhatsApp API after sending a message. It indicates the status, function called, and data processed. ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/WhatsApp/SendWhatsApp", "RequestId": ",wWYuJXZ05WauUncvZmbp5CMykGchNWPl1WYOR3cvhkJwMTQzUiM1E0MlUTMrkTMtMDMtYjMwITPw1WY0NVZtlGVmATMxYDOwETPklkclNXV", "Data": { "Recipients": 1, "Errors": null } } ``` -------------------------------- ### POST /api/v2/WhatsApp/SendWhatsApp Source: https://apidoc.inforu.co.il/ Sends a WhatsApp message using a predefined template. This endpoint supports advanced options for customizing message delivery, including ignoring unsubscribes, sending outside of set times, and tracking purchase data. ```APIDOC ## POST /api/v2/WhatsApp/SendWhatsApp ### Description Sends a WhatsApp message using a predefined template. This endpoint supports advanced options for customizing message delivery, including ignoring unsubscribes, sending outside of set times, and tracking purchase data. ### Method POST ### Endpoint /api/v2/WhatsApp/SendWhatsApp ### Headers - **Content-Type**: application/json - **Authorization**: Your Base Credentials ### Parameters #### Request Body - **Data** (object) - Required - Contains the payload for sending the WhatsApp message. - **TemplateId** (string) - Required - The ID of the template to use. - **ChatAssignToMe** (boolean) - Optional - Assign the chat to the current user. - **ChatAssignToUserId** (integer) - Optional - Assign the chat to a specific user ID. - **TemplateParameters** (array) - Optional - Parameters to populate the template. - **Name** (string) - Required - The name of the parameter (e.g., `[#1#]`). - **Type** (string) - Required - The type of the parameter (e.g., `Contact`, `Custom`, `Link`). - **Value** (string) - Required - The value for the parameter. - **Buttons** (array) - Optional - Buttons to include with the message. - **ButtonIndex** (integer) - Required - The index of the button. - **FieldSource** (string) - Required - The source of the button field (e.g., `Contact`, `Custom`, `Text`). - **FieldName** (string) - Optional - The name of the field if `FieldSource` is `Contact` or `Custom`. - **Value** (string) - Optional - The static value if `FieldSource` is `Text`. - **payload** (string) - Required - The payload associated with the button. - **Recipients** (array) - Required - A list of recipients for the message. - **Phone** (string) - Required - The recipient's phone number. - **FirstName** (string) - Optional - The recipient's first name. - **LastName** (string) - Optional - The recipient's last name. - **CouponCode** (string) - Optional - A coupon code for the recipient. - **MessageMedia** (string) - Optional - A URL for media to send with the message. - **MessageMediaFileUid** (string) - Optional - The UID of a media file. - **MediaFileName** (string) - Optional - The name of the media file. - **GroupNumbers** (array) - Optional - A list of group numbers to send to. - **GroupNumber** (string) - Required - The group number. - **ExcludeGroupNumbers** (array) - Optional - A list of group numbers to exclude from sending. - **GroupNumber** (string) - Required - The group number. - **Settings** (object) - Optional - Settings for the message. - **CampaignName** (string) - Optional - The name of the campaign. Required if `TrackPurchaseTData` is true. - **TimeToSend** (datetime) - Optional - The desired time to send the message. - **DelayInSeconds** (integer) - Optional - Delay in seconds before sending. - **CustomerMessageID** (integer) - Optional - A custom message ID. - **CustomerParameter** (string) - Optional - A custom parameter. - **DeliveryNotificationUrl** (string) - Optional - URL for delivery notifications. - **Priority** (integer) - Optional - Priority of the message. - **IgnoreUnsubscribeCheck** (boolean) - Optional - Set true to ignore unsubscribe check (contact support, for non-marketing templates only). - **ExpireDate** (datetime) - Optional - Expiration date for the message. - **IgnorePossibleSendingTime** (boolean) - Optional - Set true to ignore system time limitations. - **CheckTimeRestiction** (boolean) - Optional - Set true to ignore frequency time restrictions. - **AllowDuplicates** (boolean) - Optional - Set true to allow sending the same message multiple times to the same recipient. - **TrackPurchaseTData** (boolean) - Optional - Set true to associate purchasing with this campaign (paid feature). - **ShortenUrlEnable** (boolean) - Optional - Set true to shorten URLs in variables. ### Request Example ```json { "Data": { "TemplateId": "1216", "ChatAssignToMe": false, "ChatAssignToUserId": 1000222, "TemplateParameters": [ { "Name": "[#1#]", "Type": "Contact", "Value": "FirstName" }, { "Name": "[#2#]", "Type": "Custom", "Value": "CouponCode" }, { "Name": "[#3#]", "Type": "Link", "Value": "https://www.google.com" } ], "Buttons": [ { "ButtonIndex": 0, "FieldSource": "Contact", "FieldName": "טלפון", "payload": "id0303" }, { "ButtonIndex": 1, "FieldSource": "Custom", "FieldName": "CouponCode", "payload": "id0304" }, { "ButtonIndex": 3, "FieldSource": "Text", "Value": "test123", "payload": "id0305" } ], "Recipients": [ { "Phone": "0529999999", "CouponCode": "1ZG67893", "MessageMedia": "https://sample-videos.com/img/Sample-png-image-200kb.png" }, { "FirstName" : "Israeli", "LastName": "levi", "Phone": "0521234567", "CouponCode": "1ZG67894", "MessageMediaFileUid": "U@ZK59KA6S", "MediaFileName":"actualFileName.pdf" } ], "GroupNumbers": [ { "GroupNumber": "_INT_" } ], "ExcludeGroupNumbers": [ { "GroupNumber": "_INT_" } ], "Settings": { "CampaignName": "_STRING_", "TimeToSend": "_DATETIME_", "DelayInSeconds": "_INT_", "CustomerMessageID": "_INT_", "CustomerParameter": "_STRING_", "DeliveryNotificationUrl": "_STRING_", "Priority": "_INT_", "IgnoreUnsubscribeCheck": "_BOOL_", "ExpireDate": "_DATETIME_", "IgnorePossibleSendingTime": "_BOOL_", "CheckTimeRestiction": "_BOOL_", "AllowDuplicates": "_BOOL_", "TrackPurchaseTData": "_BOOL_", "ShortenUrlEnable" : "_BOOL_" } } } ``` ### Response (Response details not provided in the source text) ``` -------------------------------- ### POST /api/v2/WhatsApp/SendWhatsApp Source: https://apidoc.inforu.co.il/#intro Sends a WhatsApp message using a predefined template. Supports dynamic template parameters, URL buttons, media attachments, and advanced settings like chat assignment and delivery notifications. ```APIDOC ## POST /api/v2/WhatsApp/SendWhatsApp ### Description Sends a WhatsApp message using a predefined template. Supports dynamic template parameters, URL buttons, media attachments, and advanced settings like chat assignment and delivery notifications. ### Method POST ### Endpoint https://capi.inforu.co.il/api/v2/WhatsApp/SendWhatsApp ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **TemplateId** (int) - Required - The template ID in the system. - **ChatAssignToMe** (boolean) - Optional - Set true to assign the chat to the user who sent the message. Use EITHER ChatAssignToMe OR ChatAssignToUserId. - **ChatAssignToUserId** (int) - Optional - The ID of the user who the chat gets assigned to once the template is sent. Use EITHER ChatAssignToMe OR ChatAssignToUserId. **TemplateParameters** - **Name** (string) - Required - The name of the parameter in the template. - **Type** (string) - Required - Determines the source of dynamic information. Options: "contact" (from contact system), "custom" (from recipient object field), "text" (fixed text). - **Value** (string) - Required - The field name (for contact/custom type) or the fixed text for "text" type. **Buttons (Use For URL Button type)** - **ButtonIndex** (int) - Required - The button number (0 for the first button). - **FieldSource** (string) - Required - Determines the source of dynamic information for the button. Options: "contact", "custom", "text". - **FieldName \ Value** (string) - Required - The field name (for contact/custom type) or the fixed text for "text" type. - **payload** (string) - Optional - Value associated with the button, returned when updating an incoming message. **Recipients** - **Phone** (string) - Required - The contact phone number. - **firstname** (string) - Optional - The contact first name. - **lastname** (string) - Optional - The contact last name. - **CouponCode** (string) - Optional - The value of a custom field. - **MessageMedia** (url) - Optional - URL address of the media (must be on the same domain as the media in the template). Can be used only if the template was created via API. - **MessageMediaFileUid** (string) - Optional - A media file UID from the File upload function. - **MediaFileName** (string) - Optional - Overrides the filename in the sent file. **GroupNumbers** - **GroupNumber** (integer) - Optional - The number of the group from the inforUMobile system. The message will be sent to all contacts in the group. **ExcludeGroupNumbers** - **GroupNumber** (integer) - Optional - The number of the group from the inforUMobile system. The message will not be sent to contacts in this group. **Settings** - **CampaignName** (string) - Optional - The campaign name for reports. - **TimeToSend** (date time) - Optional - Date and time for sending messages (format: yyyy-mm-dd hh:mm). If blank, sent immediately. - **DelayInSeconds** (string) - Optional - Delay in seconds from request reception to message sending (use if TimeToSend is not in use). - **CustomerMessageID** (string) - Optional - Message ID on the client application for synchronization. - **CustomerParameter** (string) - Optional - Parameter set by the client for activity segmentation in reports. - **DeliveryNotificationUrl** (string) - Optional - URL to receive delivery confirmation notifications. - **Priority** (string) - Optional - Message priority (0: normal, -1: high, 1+: lower priority). ### Request Example ```json { "TemplateId": 12345, "Recipients": [ { "Phone": "+1234567890", "firstname": "John", "lastname": "Doe", "CustomField1": "Value1" } ], "TemplateParameters": [ { "Name": "param1", "Type": "text", "Value": "Hello" }, { "Name": "param2", "Type": "contact", "Value": "firstname" } ], "Settings": { "CustomerMessageID": "MSG123", "DeliveryNotificationUrl": "https://example.com/notify" } } ``` ### Response #### Success Response (200) - **Status** (string) - Indicates the status of the operation (e.g., "Success", "Failed"). - **Message** (string) - A descriptive message about the operation result. - **Data** (object) - Contains additional data related to the response, if any. #### Response Example ```json { "Status": "Success", "Message": "WhatsApp message sent successfully.", "Data": {} } ``` ``` -------------------------------- ### Send WhatsApp Message using cURL Source: https://apidoc.inforu.co.il/ This cURL command demonstrates how to send an advanced WhatsApp message using the API. Ensure your Authorization header is correctly set with your base credentials. ```curl curl --location 'https://capi.inforu.co.il/api/v2/WhatsApp/SendWhatsApp' \ --header 'Content-Type: application/json' \ --header 'Authorization: Your Base Credentials' \ --data-raw '{ "Data": { "TemplateId": "1216", "ChatAssignToMe": false, "ChatAssignToUserId": 1000222, "TemplateParameters": [ { "Name": "[#1#]", "Type": "Contact", "Value": "FirstName" }, { "Name": "[#2#]", "Type": "Custom", "Value": "CouponCode" }, { "Name": "[#3#]", "Type": "Link", "Value": "https://www.google.com" } ], "Buttons": [ { "ButtonIndex": 0, "FieldSource": "Contact", "FieldName": "טלפון", "payload": "id0303" }, { "ButtonIndex": 1, "FieldSource": "Custom", "FieldName": "CouponCode", "payload": "id0304" }, { "ButtonIndex": 3, "FieldSource": "Text", "Value": "test123", "payload": "id0305" } ], "Recipients": [ { "Phone": "0529999999", "CouponCode": "1ZG67893", "MessageMedia": "https://sample-videos.com/img/Sample-png-image-200kb.png" }, { "FirstName" : "Israeli", "LastName": "levi", "Phone": "0521234567", "CouponCode": "1ZG67894", "MessageMediaFileUid": "U@ZK59KA6S", "MediaFileName":"actualFileName.pdf" } ], "GroupNumbers": [ { "GroupNumber": "_INT_" } ], "ExcludeGroupNumbers": [ { "GroupNumber": "_INT_" } ], "Settings": { "CampaignName": "_STRING_", "TimeToSend": "_DATETIME_", "DelayInSeconds": "_INT_", "CustomerMessageID": "_INT_", "CustomerParameter": "_STRING_", "DeliveryNotificationUrl": "_STRING_", "Priority": "_INT_", "IgnoreUnsubscribeCheck": "_BOOL_", "ExpireDate": "_DATETIME_", "IgnorePossibleSendingTime": "_BOOL_", "CheckTimeRestiction": "_BOOL_", "AllowDuplicates": "_BOOL_", "TrackPurchaseTData": "_BOOL_", "ShortenUrlEnable" : "_BOOL_" } } }' ``` -------------------------------- ### POST SendWhatsApp Source: https://apidoc.inforu.co.il/ Sends a WhatsApp message using a specified template and parameters to a list of recipients. This is particularly useful for sending One-Time Passwords (OTP). ```APIDOC ## POST /api/v2/WhatsApp/SendWhatsApp ### Description Sends a WhatsApp message using a specified template and parameters to a list of recipients. This is particularly useful for sending One-Time Passwords (OTP). ### Method POST ### Endpoint https://capi.inforu.co.il/api/v2/WhatsApp/SendWhatsApp ### Parameters #### Header Parameters - **Content-Type** (string) - Required - application/json - **Authorization** (string) - Required - Your Base Credential #### Request Body - **Data** (object) - Required - **TemplateId** (int) - Required - The template Id in the system. - **TemplateParameters** (array) - Required - An array of parameters for the template. - **Name** (string) - Required - The name of the parameter in the template (e.g., "[#1#]"). - **Type** (string) - Required - The type of the parameter, must be "OTP". - **Value** (string) - Required - The OTP code. - **Recipients** (array) - Required - An array of recipients. - **Phone** (string) - Required - The contact Phone Number. ### Request Example ```json { "Data": { "TemplateId": "3938", "TemplateParameters": [ { "Name": "[#1#]", "Type": "OTP", "Value": "666" } ], "Recipients": [ { "Phone": "0542222222" } ] } } ``` ### Response #### Success Response (200) - **StatusId** (int) - Success status code. - **StatusDescription** (string) - Success status description. - **DetailedDescription** (string) - Detailed description of the status. - **FunctionName** (string) - The name of the function called. - **RequestId** (string) - A unique identifier for the request. - **Data** (object) - Contains details about the processed recipients and errors. - **Recipients** (int) - The number of recipients processed. - **Errors** (null) - Placeholder for errors, null if none. #### Response Example ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/WhatsApp/SendWhatsApp", "RequestId": "sFmbyVGdulmL1J3bm5WauEjMnR3ckV3bsNWPl1WYOR3cvhkJ5ETQzUyM0E0MlcTMrQTMtkDMtEjMwITPw1WY0NVZtlGVmcjM4MDMwETPklkclNXV", "Data": { "Recipients": 1, "Errors": null } } ``` ``` -------------------------------- ### Send Advanced WhatsApp Message using cURL Source: https://apidoc.inforu.co.il/#intro This cURL command demonstrates how to send an advanced WhatsApp message using the Inforu API. Ensure your Authorization header is correctly set. ```curl curl --location 'https://capi.inforu.co.il/api/v2/WhatsApp/SendWhatsApp' \ --header 'Content-Type: application/json' \ --header 'Authorization: Your Base Credentials' \ --data-raw '{ "Data": { "TemplateId": "1216", "ChatAssignToMe": false, "ChatAssignToUserId": 1000222, "TemplateParameters": [ { "Name": "[#1#]", "Type": "Contact", "Value": "FirstName" }, { "Name": "[#2#]", "Type": "Custom", "Value": "CouponCode" }, { "Name": "[#3#]", "Type": "Link", "Value": "https://www.google.com" } ], "Buttons": [ { "ButtonIndex": 0, "FieldSource": "Contact", "FieldName": "טלפון", "payload": "id0303" }, { "ButtonIndex": 1, "FieldSource": "Custom", "FieldName": "CouponCode", "payload": "id0304" }, { "ButtonIndex": 3, "FieldSource": "Text", "Value": "test123", "payload": "id0305" } ], "Recipients": [ { "Phone": "0529999999", "CouponCode": "1ZG67893", "MessageMedia": "https://sample-videos.com/img/Sample-png-image-200kb.png" }, { "FirstName" : "Israeli", "LastName": "levi", "Phone": "0521234567", "CouponCode": "1ZG67894", "MessageMediaFileUid": "U@ZK59KA6S", "MediaFileName":"actualFileName.pdf" } ], "GroupNumbers": [ { "GroupNumber": "_INT_" } ], "ExcludeGroupNumbers": [ { "GroupNumber": "_INT_" } ], "Settings": { "CampaignName": "_STRING_", "TimeToSend": "_DATETIME_", "DelayInSeconds": "_INT_", "CustomerMessageID": "_INT_", "CustomerParameter": "_STRING_", "DeliveryNotificationUrl": "_STRING_", "Priority": "_INT_", "IgnoreUnsubscribeCheck": "_BOOL_", "ExpireDate": "_DATETIME_", "IgnorePossibleSendingTime": "_BOOL_", "CheckTimeRestiction": "_BOOL_", "AllowDuplicates": "_BOOL_", "TrackPurchaseTData": "_BOOL_", "ShortenUrlEnable" : "_BOOL_" } } }' ``` -------------------------------- ### Send WhatsApp Template Message cURL Request Source: https://apidoc.inforu.co.il/#intro This cURL command demonstrates how to send a WhatsApp template message using the InforUMobile API. Ensure you replace 'Your Base Credentials' with your actual authentication token. ```curl curl --location 'https://capi.inforu.co.il/api/v2/WhatsApp/SendWhatsApp' \ --header 'Content-Type: application/json' \ --header 'Authorization: Your Base Credentials' \ --data '{ "Data": { "TemplateId": "1216", "TemplateParameters": [ { "Name": "[#1#]", "Type": "Contact", "Value": "FirstName" }, { "Name": "[#2#]", "Type": "Custom", "Value": "CouponCode" }, { "Name": "[#3#]", "Type": "Text", "Value": "alenbi 30" } ], "Recipients": [ { "Phone": "0529999999", "CouponCode": "1ZG67893" } ] } }' ``` -------------------------------- ### Send Whatsapp Template Message Source: https://apidoc.inforu.co.il/#intro Allows sending WhatsApp messages by specifying a Template ID, mapping template parameters, and providing recipient details. Template parameters can be sourced from contact information, custom fields, or fixed text. ```APIDOC ## POST /api/v2/WhatsApp/SendWhatsApp ### Description Sends WhatsApp messages using a predefined template. Requires Template ID, parameter mapping, and recipient information. ### Method POST ### Endpoint https://capi.inforu.co.il/api/v2/WhatsApp/SendWhatsApp ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **Data** (object) - Required - **TemplateId** (int) - Required - The template ID in the system. - **TemplateParameters** (array) - Required - An array of template parameter objects. - **Name** (string) - Required - The name of the parameter in the template (e.g., "[#1#]"). - **Type** (string) - Required - The source type for the parameter value. Accepted values: "Contact", "Custom", "Text". - **Value** (string) - Required - The value for the parameter. For "Contact" or "Custom" types, this is the field name. For "Text" type, this is the fixed text. - **Recipients** (array) - Required - An array of recipient objects. - **Phone** (string) - Required - The contact phone number. - **firstname** (string) - Optional - The contact's first name. - **lastname** (string) - Optional - The contact's last name. - **CouponCode** (string) - Optional - The value of a custom field (example). ### Request Example ```json { "Data": { "TemplateId": "1216", "TemplateParameters": [ { "Name": "[#1#]", "Type": "Contact", "Value": "FirstName" }, { "Name": "[#2#]", "Type": "Custom", "Value": "CouponCode" }, { "Name": "[#3#]", "Type": "Text", "Value": "alenbi 30" } ], "Recipients": [ { "Phone": "0529999999", "CouponCode": "1ZG67893" } ] } } ``` ### Response #### Success Response (200) - **StatusId** (int) - Success status code. - **StatusDescription** (string) - Description of the status. - **DetailedDescription** (string) - Detailed description of the operation. - **FunctionName** (string) - The function name called. - **RequestId** (string) - Unique identifier for the request. - **Data** (object) - Contains data about the operation. - **Recipients** (int) - Number of recipients processed. - **Errors** (null) - Placeholder for errors, null if successful. #### Response Example ```json { "StatusId": 1, "StatusDescription": "Success", "DetailedDescription": "", "FunctionName": "api/v2/WhatsApp/SendWhatsApp", "RequestId": "sFmbyVGdulmL1J3bm5WauEjMnR3ckV3bsNWPl1WYOR3cvhkJ5ETQzUyM0E0MlcTMrQTMtkDMtEjMwITPw1WY0NVZtlGVmcjM4MDMwETPklkclNXV", "Data": { "Recipients": 1, "Errors": null } } ``` ```