Skip to content

Latest commit

 

History

History
70 lines (52 loc) · 2.18 KB

DeleteCampaignApi.md

File metadata and controls

70 lines (52 loc) · 2.18 KB

DeleteCampaignApi

All URIs are relative to https://partner-api.stg-myteksi.com/grabfood-sandbox

Method HTTP request Description
deleteCampaign DELETE /partner/v1/campaigns/{campaign_id} Delete campaigns

deleteCampaign

deleteCampaign(authorization, campaignId)

Delete campaigns

Example

// Import classes:
import com.grab.grabfood.client.ApiClient;
import com.grab.grabfood.client.ApiException;
import com.grab.grabfood.client.Configuration;
import com.grab.grabfood.client.models.*;
import com.grab.grabfood.client.api.DeleteCampaignApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://partner-api.stg-myteksi.com/grabfood-sandbox");

    DeleteCampaignApi apiInstance = new DeleteCampaignApi(defaultClient);
    String authorization = "Bearer <ACCESS_TOKEN_HERE>"; // String | Specify the generated authorization token of the bearer type.
    String campaignId = "campaignId_example"; // String | 
    try {
      apiInstance.deleteCampaign(authorization, campaignId);
    } catch (ApiException e) {
      System.err.println("Exception when calling DeleteCampaignApi#deleteCampaign");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
authorization String Specify the generated authorization token of the bearer type.
campaignId String

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The API request is successfully processed. -