Package com.whatsapp.api.service
Interface WhatsappBusinessManagementApiService
public interface WhatsappBusinessManagementApiService
The interface Whatsapp business management api service.
-
Method Summary
Modifier and TypeMethodDescriptionretrofit2.Call<Template>
createMessageTemplate
(String apiVersion, String whatsappBusinessAccountId, MessageTemplate messageTemplate) Create message template call.retrofit2.Call<Response>
deleteMessageTemplate
(String apiVersion, String whatsappBusinessAccountId, String name) Delete message template call.retrofit2.Call<GraphCommerceSettings>
getWhatsappCommerceSettings
(String apiVersion, String phoneNumberId, Map<String, String> queryParams) Business phone number's whatsApp commerce settings call.retrofit2.Call<Response>
requestCode
(String apiVersion, String phoneNumberId, RequestCode requestCode) Request code call.retrofit2.Call<PhoneNumber>
Retrieve phone number call.retrofit2.Call<PhoneNumbers>
retrievePhoneNumbers
(String apiVersion, String whatsappBusinessAccountId) Retrieve phone numbers call.retrofit2.Call<MessageTemplates>
retrieveTemplates
(String apiVersion, String whatsappBusinessAccountId) Retrieve templates call.retrofit2.Call<MessageTemplates>
Retrieve templates call.retrofit2.Call<Template>
updateMessageTemplate
(String apiVersion, String whatsappBusinessAccountId, String messageTemplateId, MessageTemplate messageTemplate) Update message template call.retrofit2.Call<Response>
updateWhatsappCommerceSettings
(String apiVersion, String phoneNumberId, CommerceDataItem commerceDataItem) Business phone number's whatsApp commerce settings call.retrofit2.Call<Response>
verifyCode
(String apiVersion, String phoneNumberId, VerifyCode verifyCode) Verify code call.
-
Method Details
-
createMessageTemplate
@POST("/{api-version}/{whatsapp-business-account-ID}/message_templates") retrofit2.Call<Template> createMessageTemplate(@Path("api-version") String apiVersion, @Path("whatsapp-business-account-ID") String whatsappBusinessAccountId, @Body MessageTemplate messageTemplate) Create message template call.- Parameters:
whatsappBusinessAccountId
- the whatsapp business account idmessageTemplate
- the message template- Returns:
- the call
-
updateMessageTemplate
@POST("/{api-version}/{whatsapp-business-account-ID}/message_templates/{message-template-id}") retrofit2.Call<Template> updateMessageTemplate(@Path("api-version") String apiVersion, @Path("whatsapp-business-account-ID") String whatsappBusinessAccountId, @Path("message-template-id") String messageTemplateId, @Body MessageTemplate messageTemplate) Update message template call.- Parameters:
whatsappBusinessAccountId
- the whatsapp business account idmessageTemplateId
- the message template idmessageTemplate
- the message template- Returns:
- the call
-
deleteMessageTemplate
@DELETE("/{api-version}/{whatsapp-business-account-ID}/message_templates") retrofit2.Call<Response> deleteMessageTemplate(@Path("api-version") String apiVersion, @Path("whatsapp-business-account-ID") String whatsappBusinessAccountId, @Query("name") String name) Delete message template call.- Parameters:
whatsappBusinessAccountId
- the whatsapp business account idname
- the name- Returns:
- the call
-
retrieveTemplates
@GET("/{api-version}/{whatsapp-business-account-ID}/message_templates") retrofit2.Call<MessageTemplates> retrieveTemplates(@Path("api-version") String apiVersion, @Path("whatsapp-business-account-ID") String whatsappBusinessAccountId) Retrieve templates call.- Parameters:
whatsappBusinessAccountId
- the whatsapp business account id- Returns:
- the call
-
retrieveTemplates
@GET("/{api-version}/{whatsapp-business-account-ID}/message_templates") retrofit2.Call<MessageTemplates> retrieveTemplates(@Path("api-version") String apiVersion, @Path("whatsapp-business-account-ID") String whatsappBusinessAccountId, @QueryMap Map<String, Object> filters) Retrieve templates call.- Parameters:
whatsappBusinessAccountId
- the whatsapp business account idfilters
- the filters- Returns:
- the call
-
retrievePhoneNumber
@GET("/{api-version}/{phone-number-ID}") retrofit2.Call<PhoneNumber> retrievePhoneNumber(@Path("api-version") String apiVersion, @Path("phone-number-ID") String phoneNumberId, @QueryMap Map<String, Object> queryParams) Retrieve phone number call.- Parameters:
phoneNumberId
- the phone number idqueryParams
- the query params- Returns:
- the call
-
retrievePhoneNumbers
@GET("/{api-version}/{whatsapp-business-account-ID}/phone_numbers") retrofit2.Call<PhoneNumbers> retrievePhoneNumbers(@Path("api-version") String apiVersion, @Path("whatsapp-business-account-ID") String whatsappBusinessAccountId) Retrieve phone numbers call.- Parameters:
whatsappBusinessAccountId
- the whatsapp business account id- Returns:
- the call
-
requestCode
@POST("/{api-version}/{phone-number-ID}/request_code") retrofit2.Call<Response> requestCode(@Path("api-version") String apiVersion, @Path("phone-number-ID") String phoneNumberId, @Body RequestCode requestCode) Request code call.- Parameters:
phoneNumberId
- the phone number idrequestCode
- the request code- Returns:
- the call
-
verifyCode
@POST("/{api-version}/{phone-number-ID}/verify_code") retrofit2.Call<Response> verifyCode(@Path("api-version") String apiVersion, @Path("phone-number-ID") String phoneNumberId, @Body VerifyCode verifyCode) Verify code call.- Parameters:
phoneNumberId
- the phone number idverifyCode
- the verify code- Returns:
- the call
-
getWhatsappCommerceSettings
@GET("/{api-version}/{phone-number-ID}/whatsapp_commerce_settings") retrofit2.Call<GraphCommerceSettings> getWhatsappCommerceSettings(@Path("api-version") String apiVersion, @Path("phone-number-ID") String phoneNumberId, @QueryMap Map<String, String> queryParams) Business phone number's whatsApp commerce settings call.- Parameters:
phoneNumberId
- the phone number idqueryParams
- the query params- Returns:
- the call
-
updateWhatsappCommerceSettings
@POST("/{api-version}/{phone-number-ID}/whatsapp_commerce_settings") retrofit2.Call<Response> updateWhatsappCommerceSettings(@Path("api-version") String apiVersion, @Path("phone-number-ID") String phoneNumberId, @Body CommerceDataItem commerceDataItem) Business phone number's whatsApp commerce settings call.- Parameters:
phoneNumberId
- the phone number idcommerceDataItem
- the query params- Returns:
- the call
-