All URIs are relative to /api
Method | HTTP request | Description |
---|---|---|
fetchCatlog | GET /instances/{instance_key}/business/catalog | Fetches the catlog. |
sendPaymentRequest | POST /instances/{instance_key}/business/payment-request | Send a payment request. |
APIResponse fetchCatlog(instanceKey)
Fetches the catlog.
Gets list of all products registered by you.
import WhatsApi from 'WhatsAPI';
let defaultClient = WhatsApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new WhatsApi.BusinessManagementApi();
let instanceKey = "instanceKey_example"; // String | Instance key
apiInstance.fetchCatlog(instanceKey, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
instanceKey | String | Instance key |
- Content-Type: Not defined
- Accept: /
APIResponse sendPaymentRequest(instanceKey, data)
Send a payment request.
Sends an payment request to a user. Feature is still in beta.
import WhatsApi from 'WhatsAPI';
let defaultClient = WhatsApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new WhatsApi.BusinessManagementApi();
let instanceKey = "instanceKey_example"; // String | Instance key
let data = new WhatsApi.PaymentRequestPayload(); // PaymentRequestPayload | Data
apiInstance.sendPaymentRequest(instanceKey, data, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
instanceKey | String | Instance key | |
data | PaymentRequestPayload | Data |
- Content-Type: application/json
- Accept: /