@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Marketing API
@base https://api.ebay.com/sell/marketing/v1
@version v1.23.0
@auth OAuth2
@endpoints 80
@hint download_for_search
@toc ad_campaign(45), bulk_create_negative_keyword(1), bulk_update_negative_keyword(1), negative_keyword(4), ad_report(1), ad_report_metadata(2), ad_report_task(4), item_price_markdown(4), item_promotion(4), promotion(4), promotion_report(1), promotion_summary_report(1), email_campaign(8)

@group ad_campaign
@endpoint POST /ad_campaign/{campaign_id}/bulk_create_ads_by_inventory_reference
@required {campaign_id: str, Content-Type: str}
@optional {requests: [map{adGroupId: str, bidPercentage: str, inventoryReferenceId: str, inventoryReferenceType: str}]}
@returns(200) {responses: [map]}
@returns(207)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/bulk_create_ads_by_listing_id
@required {campaign_id: str, Content-Type: str}
@optional {requests: [map{adGroupId: str, bidPercentage: str, listingId: str}]}
@returns(200) {responses: [map]}
@returns(207)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/bulk_delete_ads_by_inventory_reference
@required {campaign_id: str, Content-Type: str}
@optional {requests: [map{inventoryReferenceId: str, inventoryReferenceType: str}]}
@returns(200) {responses: [map]}
@returns(207)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/bulk_delete_ads_by_listing_id
@required {campaign_id: str, Content-Type: str}
@optional {requests: [map{listingId: str}]}
@returns(200) {responses: [map]}
@returns(207)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/bulk_update_ads_bid_by_inventory_reference
@required {campaign_id: str, Content-Type: str}
@optional {requests: [map{adGroupId: str, bidPercentage: str, inventoryReferenceId: str, inventoryReferenceType: str}]}
@returns(200) {responses: [map]}
@returns(207)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/bulk_update_ads_bid_by_listing_id
@required {campaign_id: str, Content-Type: str}
@optional {requests: [map{adGroupId: str, bidPercentage: str, listingId: str}]}
@returns(200) {responses: [map]}
@returns(207)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/bulk_update_ads_status
@required {campaign_id: str, Content-Type: str}
@optional {requests: [map{adId: str, adStatus: str}]}
@returns(200) {responses: [map]}
@returns(207)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/bulk_update_ads_status_by_listing_id
@required {campaign_id: str, Content-Type: str}
@optional {requests: [map{adGroupId: str, adStatus: str, listingId: str}]}
@returns(200) {responses: [map]}
@returns(207)
@errors {400, 404, 409, 500}

@endpoint GET /ad_campaign/{campaign_id}/ad
@required {campaign_id: str}
@optional {ad_group_ids: str, ad_status: str, limit: str, listing_ids: str, offset: str}
@returns(200) {ads: [map], href: str, limit: int(int32), next: str, offset: int(int32), prev: str, total: int(int32)}
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/ad
@required {campaign_id: str, Content-Type: str}
@optional {adGroupId: str, bidPercentage: str, listingId: str}
@returns(201)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/create_ads_by_inventory_reference
@required {campaign_id: str, Content-Type: str}
@optional {adGroupId: str, bidPercentage: str, inventoryReferenceId: str, inventoryReferenceType: str}
@returns(201) {ads: [map]}
@errors {400, 404, 409, 500}

@endpoint GET /ad_campaign/{campaign_id}/ad/{ad_id}
@required {ad_id: str, campaign_id: str}
@returns(200) {adGroupId: str, adId: str, adStatus: str, alerts: [map], bidPercentage: str, inventoryReferenceId: str, inventoryReferenceType: str, listingId: str}
@errors {400, 404, 409, 500}

@endpoint DELETE /ad_campaign/{campaign_id}/ad/{ad_id}
@required {ad_id: str, campaign_id: str}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/delete_ads_by_inventory_reference
@required {campaign_id: str, Content-Type: str}
@optional {inventoryReferenceId: str, inventoryReferenceType: str}
@returns(200) {adIds: [str]}
@errors {400, 404, 409, 500}

@endpoint GET /ad_campaign/{campaign_id}/get_ads_by_inventory_reference
@required {campaign_id: str, inventory_reference_id: str, inventory_reference_type: str}
@returns(200) {ads: [map]}
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/ad/{ad_id}/update_bid
@required {ad_id: str, campaign_id: str, Content-Type: str}
@optional {bidPercentage: str}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint GET /ad_campaign/{campaign_id}/ad_group
@required {campaign_id: str}
@optional {ad_group_status: str, limit: str, offset: str}
@returns(200) {adGroups: [map], href: str, limit: int(int32), next: str, offset: int(int32), prev: str, total: int(int32)}
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/ad_group
@required {campaign_id: str, Content-Type: str}
@optional {defaultBid: map{currency: str, value: str}, name: str}
@returns(201)
@errors {400, 404, 409, 500}

@endpoint GET /ad_campaign/{campaign_id}/ad_group/{ad_group_id}
@required {ad_group_id: str, campaign_id: str}
@returns(200) {adGroupId: str, adGroupStatus: str, defaultBid: map{currency: str, value: str}, name: str}
@errors {400, 404, 409, 500}

@endpoint PUT /ad_campaign/{campaign_id}/ad_group/{ad_group_id}
@required {ad_group_id: str, campaign_id: str, Content-Type: str}
@optional {adGroupStatus: str, defaultBid: map{currency: str, value: str}, name: str}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/ad_group/{ad_group_id}/suggest_bids
@required {ad_group_id: str, campaign_id: str, Content-Type: str}
@optional {keywords: [map{keywordText: str, matchType: str}]}
@returns(200) {suggestedBids: [map]}
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/ad_group/{ad_group_id}/suggest_keywords
@required {ad_group_id: str, campaign_id: str, Content-Type: str}
@optional {additionalInfo: [str], exclusions: [str], listingIds: [str], matchType: str}
@returns(200) {suggestedKeywords: [map]}
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/clone
@required {campaign_id: str, Content-Type: str}
@optional {campaignName: str, endDate: str, fundingStrategy: map{adRateStrategy: str, biddingStrategy: str, bidPercentage: str, bidPreferences: [map], dynamicAdRatePreferences: [map], fundingModel: str}, startDate: str}
@returns(201)
@errors {400, 404, 409, 500}

@endpoint GET /ad_campaign
@optional {campaign_name: str, campaign_status: str, campaign_targeting_types: str, channels: str, end_date_range: str, funding_strategy: str, limit: str, offset: str, start_date_range: str}
@returns(200) {campaigns: [map], href: str, limit: int(int32), next: str, offset: int(int32), prev: str, total: int(int32)}
@errors {400, 409, 500}

@endpoint POST /ad_campaign
@required {Content-Type: str}
@optional {budget: map{daily: map}, campaignCriterion: map{autoSelectFutureInventory: bool, criterionType: str, selectionRules: [map]}, campaignName: str, campaignTargetingType: str, channels: [str], endDate: str, fundingStrategy: map{adRateStrategy: str, biddingStrategy: str, bidPercentage: str, bidPreferences: [map], dynamicAdRatePreferences: [map], fundingModel: str}, marketplaceId: str, startDate: str}
@returns(201)
@errors {400, 409, 500}

@endpoint GET /ad_campaign/{campaign_id}
@required {campaign_id: str}
@returns(200) {alerts: [map], budget: map{daily: map{amount: map{currency: str, value: str}, budgetStatus: str}}, campaignCriterion: map{autoSelectFutureInventory: bool, criterionType: str, selectionRules: [map]}, campaignId: str, campaignName: str, campaignStatus: str, campaignTargetingType: str, channels: [str], endDate: str, fundingStrategy: map{adRateStrategy: str, biddingStrategy: str, bidPercentage: str, bidPreferences: [map], dynamicAdRatePreferences: [map], fundingModel: str}, marketplaceId: str, startDate: str}
@errors {400, 404, 409, 500}

@endpoint DELETE /ad_campaign/{campaign_id}
@required {campaign_id: str}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/end
@required {campaign_id: str}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint GET /ad_campaign/find_campaign_by_ad_reference
@optional {inventory_reference_id: str, inventory_reference_type: str, listing_id: str}
@returns(200) {campaigns: [map]}
@errors {400, 404, 409, 500}

@endpoint GET /ad_campaign/get_campaign_by_name
@required {campaign_name: str}
@returns(200) {alerts: [map], budget: map{daily: map{amount: map{currency: str, value: str}, budgetStatus: str}}, campaignCriterion: map{autoSelectFutureInventory: bool, criterionType: str, selectionRules: [map]}, campaignId: str, campaignName: str, campaignStatus: str, campaignTargetingType: str, channels: [str], endDate: str, fundingStrategy: map{adRateStrategy: str, biddingStrategy: str, bidPercentage: str, bidPreferences: [map], dynamicAdRatePreferences: [map], fundingModel: str}, marketplaceId: str, startDate: str}
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/pause
@required {campaign_id: str}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/resume
@required {campaign_id: str}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint GET /ad_campaign/suggest_budget
@required {X-EBAY-C-MARKETPLACE-ID: str}
@returns(200) {suggestedBudget: [map]}
@errors {400, 404, 409, 500}

@endpoint GET /ad_campaign/{campaign_id}/suggest_items
@required {campaign_id: str}
@optional {category_ids: str, limit: str, offset: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), prev: str, suggestedItems: [map], total: int(int32)}
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/suggest_max_cpc
@required {Content-Type: str}
@optional {listingIds: [str], marketplaceId: str}
@returns(200) {amount: map{currency: str, value: str}, marketplaceId: str}
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/update_ad_rate_strategy
@required {campaign_id: str, Content-Type: str}
@optional {adRateStrategy: str, bidPercentage: str, dynamicAdRatePreferences: [map{adRateAdjustmentPercent: str, adRateCapPercent: str}]}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/update_bidding_strategy
@required {campaign_id: str, Content-Type: str}
@optional {biddingStrategy: str, bidPreferences: [map{maxCpc: map}]}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/update_campaign_budget
@required {campaign_id: str, Content-Type: str}
@optional {daily: map{amount: map}}
@returns(200)
@returns(204)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/update_campaign_identification
@required {campaign_id: str, Content-Type: str}
@optional {campaignName: str, endDate: str, startDate: str}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/bulk_create_keyword
@required {campaign_id: str, Content-Type: str}
@optional {requests: [map{adGroupId: str, bid: map, keywordText: str, matchType: str}]}
@returns(200) {responses: [map]}
@returns(207)
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/bulk_update_keyword
@required {campaign_id: str, Content-Type: str}
@optional {requests: [map{bid: map, keywordId: str, keywordStatus: str}]}
@returns(200) {responses: [map]}
@returns(207)
@errors {400, 404, 409, 500}

@endpoint GET /ad_campaign/{campaign_id}/keyword
@required {campaign_id: str}
@optional {ad_group_ids: str, keyword_status: str, limit: str, offset: str}
@returns(200) {href: str, keywords: [map], limit: int(int32), next: str, offset: int(int32), prev: str, total: int(int32)}
@errors {400, 404, 409, 500}

@endpoint POST /ad_campaign/{campaign_id}/keyword
@required {campaign_id: str, Content-Type: str}
@optional {adGroupId: str, bid: map{currency: str, value: str}, keywordText: str, matchType: str}
@returns(201)
@errors {400, 404, 409, 500}

@endpoint GET /ad_campaign/{campaign_id}/keyword/{keyword_id}
@required {campaign_id: str, keyword_id: str}
@returns(200) {adGroupId: str, bid: map{currency: str, value: str}, keywordId: str, keywordStatus: str, keywordText: str, matchType: str}
@errors {400, 404, 409, 500}

@endpoint PUT /ad_campaign/{campaign_id}/keyword/{keyword_id}
@required {campaign_id: str, keyword_id: str, Content-Type: str}
@optional {bid: map{currency: str, value: str}, keywordStatus: str}
@returns(200) {errors: [map], keywordId: str, statusCode: int(int32), warnings: [map]}
@returns(204)
@errors {400, 404, 409, 500}

@endgroup

@group bulk_create_negative_keyword
@endpoint POST /bulk_create_negative_keyword
@required {Content-Type: str}
@optional {requests: [map{adGroupId: str, campaignId: str, negativeKeywordMatchType: str, negativeKeywordText: str}]}
@returns(200) {responses: [map]}
@returns(207)
@errors {400, 403, 409, 500}

@endgroup

@group bulk_update_negative_keyword
@endpoint POST /bulk_update_negative_keyword
@required {Content-Type: str}
@optional {requests: [map{negativeKeywordId: str, negativeKeywordStatus: str}]}
@returns(200) {responses: [map]}
@returns(207)
@errors {400, 403, 409, 500}

@endgroup

@group negative_keyword
@endpoint GET /negative_keyword
@optional {ad_group_ids: str, campaign_ids: str, limit: str, negative_keyword_status: str, offset: str}
@returns(200) {href: str, limit: int(int32), negativeKeywords: [map], next: str, offset: int(int32), prev: str, total: int(int32)}
@errors {400, 403, 404, 409, 500}

@endpoint POST /negative_keyword
@required {Content-Type: str}
@optional {adGroupId: str, campaignId: str, negativeKeywordMatchType: str, negativeKeywordText: str}
@returns(201)
@errors {400, 403, 409, 500}

@endpoint GET /negative_keyword/{negative_keyword_id}
@required {negative_keyword_id: str}
@returns(200) {adGroupId: str, campaignId: str, negativeKeywordId: str, negativeKeywordMatchType: str, negativeKeywordStatus: str, negativeKeywordText: str}
@errors {400, 403, 404, 409, 500}

@endpoint PUT /negative_keyword/{negative_keyword_id}
@required {negative_keyword_id: str, Content-Type: str}
@optional {negativeKeywordStatus: str}
@returns(204)
@errors {400, 403, 404, 409, 500}

@endgroup

@group ad_report
@endpoint GET /ad_report/{report_id}
@required {report_id: str}
@returns(200)
@errors {400, 404, 500}

@endgroup

@group ad_report_metadata
@endpoint GET /ad_report_metadata
@optional {funding_model: str, channel: str}
@returns(200) {reportMetadata: [map]}
@errors {400, 500}

@endpoint GET /ad_report_metadata/{report_type}
@required {report_type: str}
@optional {funding_model: str, channel: str}
@returns(200) {dimensionMetadata: [map], maxNumberOfDimensionsToRequest: int(int32), maxNumberOfMetricsToRequest: int(int32), channel: str, metricMetadata: [map], reportType: str}
@errors {400, 403, 404, 500}

@endgroup

@group ad_report_task
@endpoint GET /ad_report_task
@optional {limit: str, offset: str, report_task_statuses: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), prev: str, total: int(int32), reportTasks: [map]}
@errors {400, 500}

@endpoint POST /ad_report_task
@required {Content-Type: str}
@optional {additionalRecords: [str], campaignIds: [str], channels: [str], dateFrom: str, dateTo: str, dimensions: [map{annotationKeys: [str], dimensionKey: str}], fundingModels: [str], inventoryReferences: [map{inventoryReferenceId: str, inventoryReferenceType: str}], listingIds: [str], marketplaceId: str, metricKeys: [str], reportFormat: str, reportType: str}
@returns(202)
@errors {400, 403, 409, 500}

@endpoint GET /ad_report_task/{report_task_id}
@required {report_task_id: str}
@returns(200) {campaignIds: [str], channels: [str], dateFrom: str, dateTo: str, dimensions: [map], fundingModels: [str], inventoryReferences: [map], listingIds: [str], marketplaceId: str, metricKeys: [str], reportExpirationDate: str, reportFormat: str, reportHref: str, reportId: str, reportName: str, reportTaskCompletionDate: str, reportTaskCreationDate: str, reportTaskExpectedCompletionDate: str, reportTaskId: str, reportTaskStatus: str, reportTaskStatusMessage: str, reportType: str}
@errors {400, 404, 500}

@endpoint DELETE /ad_report_task/{report_task_id}
@required {report_task_id: str}
@returns(204)
@errors {400, 404, 409, 500}

@endgroup

@group item_price_markdown
@endpoint POST /item_price_markdown
@required {Content-Type: str}
@optional {applyFreeShipping: bool, autoSelectFutureInventory: bool, blockPriceIncreaseInItemRevision: bool, description: str, endDate: str, marketplaceId: str, name: str, priority: str, promotionImageUrl: str, promotionStatus: str, selectedInventoryDiscounts: [map{discountBenefit: map, discountId: str, inventoryCriterion: map, ruleOrder: int(int32)}], startDate: str}
@returns(201)
@errors {400, 409, 500}

@endpoint GET /item_price_markdown/{promotion_id}
@required {promotion_id: str}
@returns(200) {applyFreeShipping: bool, autoSelectFutureInventory: bool, blockPriceIncreaseInItemRevision: bool, description: str, endDate: str, marketplaceId: str, name: str, priority: str, promotionImageUrl: str, promotionStatus: str, selectedInventoryDiscounts: [map], startDate: str}
@errors {400, 404, 500}

@endpoint PUT /item_price_markdown/{promotion_id}
@required {promotion_id: str, Content-Type: str}
@optional {applyFreeShipping: bool, autoSelectFutureInventory: bool, blockPriceIncreaseInItemRevision: bool, description: str, endDate: str, marketplaceId: str, name: str, priority: str, promotionImageUrl: str, promotionStatus: str, selectedInventoryDiscounts: [map{discountBenefit: map, discountId: str, inventoryCriterion: map, ruleOrder: int(int32)}], startDate: str}
@returns(200)
@returns(204)
@errors {400, 404, 409, 500}

@endpoint DELETE /item_price_markdown/{promotion_id}
@required {promotion_id: str}
@returns(204)
@errors {400, 404, 500}

@endgroup

@group item_promotion
@endpoint POST /item_promotion
@required {Content-Type: str}
@optional {applyDiscountToSingleItemOnly: bool, budget: map{currency: str, value: str}, couponConfiguration: map{couponCode: str, couponType: str, maxCouponRedemptionPerUser: int(int32)}, description: str, discountRules: [map{discountBenefit: map, discountSpecification: map, maxDiscountAmount: map, ruleOrder: int(int32)}], endDate: str, inventoryCriterion: map{inventoryCriterionType: str, inventoryItems: [map], listingIds: [str], ruleCriteria: map}, marketplaceId: str, name: str, priority: str, promotionImageUrl: str, promotionStatus: str, promotionType: str, startDate: str}
@returns(201) {warnings: [map]}
@errors {400, 409, 500}

@endpoint GET /item_promotion/{promotion_id}
@required {promotion_id: str}
@returns(200) {applyDiscountToSingleItemOnly: bool, budget: map{currency: str, value: str}, couponConfiguration: map{couponCode: str, couponType: str, maxCouponRedemptionPerUser: int(int32)}, description: str, discountRules: [map], endDate: str, inventoryCriterion: map{inventoryCriterionType: str, inventoryItems: [map], listingIds: [str], ruleCriteria: map{excludeInventoryItems: [map], excludeListingIds: [str], markupInventoryItems: [map], markupListingIds: [str], selectionRules: [map]}}, marketplaceId: str, name: str, priority: str, promotionId: str, promotionImageUrl: str, promotionStatus: str, promotionType: str, startDate: str}
@errors {400, 404, 500}

@endpoint PUT /item_promotion/{promotion_id}
@required {promotion_id: str, Content-Type: str}
@optional {applyDiscountToSingleItemOnly: bool, budget: map{currency: str, value: str}, couponConfiguration: map{couponCode: str, couponType: str, maxCouponRedemptionPerUser: int(int32)}, description: str, discountRules: [map{discountBenefit: map, discountSpecification: map, maxDiscountAmount: map, ruleOrder: int(int32)}], endDate: str, inventoryCriterion: map{inventoryCriterionType: str, inventoryItems: [map], listingIds: [str], ruleCriteria: map}, marketplaceId: str, name: str, priority: str, promotionImageUrl: str, promotionStatus: str, promotionType: str, startDate: str}
@returns(200) {warnings: [map]}
@returns(204)
@errors {400, 404, 409, 500}

@endpoint DELETE /item_promotion/{promotion_id}
@required {promotion_id: str}
@returns(204)
@errors {400, 404, 500}

@endgroup

@group promotion
@endpoint GET /promotion/{promotion_id}/get_listing_set
@required {promotion_id: str}
@optional {limit: str, offset: str, q: str, sort: str, status: str}
@returns(200) {href: str, limit: int(int32), listings: [map], next: str, offset: int(int32), prev: str, total: int(int32), warnings: [map]}
@errors {400, 404, 500}

@endpoint GET /promotion
@required {marketplace_id: str}
@optional {limit: str, offset: str, promotion_status: str, promotion_type: str, q: str, sort: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), prev: str, promotions: [map], total: int(int32)}
@errors {400, 500}

@endpoint POST /promotion/{promotion_id}/pause
@required {promotion_id: str}
@returns(204)
@errors {400, 404, 500}

@endpoint POST /promotion/{promotion_id}/resume
@required {promotion_id: str}
@returns(204)
@errors {400, 404, 500}

@endgroup

@group promotion_report
@endpoint GET /promotion_report
@required {marketplace_id: str}
@optional {limit: str, offset: str, promotion_status: str, promotion_type: str, q: str}
@returns(200) {href: str, limit: int(int32), next: str, offset: int(int32), prev: str, promotionReports: [map], total: int(int32)}
@errors {400, 500}

@endgroup

@group promotion_summary_report
@endpoint GET /promotion_summary_report
@required {marketplace_id: str}
@returns(200) {baseSale: map{currency: str, value: str}, lastUpdated: str, percentageSalesLift: str, promotionSale: map{currency: str, value: str}, totalSale: map{currency: str, value: str}}
@errors {400, 404, 500}

@endgroup

@group email_campaign
@endpoint GET /email_campaign
@optional {limit: str, offset: str, q: str, sort: str}
@returns(200) {campaigns: [map], href: str, limit: int(int32), next: str, offset: int(int32), prev: str, total: int(int32)}
@errors {400, 409, 500}

@endpoint POST /email_campaign
@required {X-EBAY-C-MARKETPLACE-ID: str, Content-Type: str}
@optional {audienceCodes: [str], categoryId: str, categoryType: str, emailCampaignType: str, itemIds: [str], itemSelectMode: str, personalizedMessage: str, priceRange: map{currency: str, gte: num, lte: num}, promotionId: str, promotionSelectModeEnum: str, scheduleDate: str, sort: str, subject: str}
@returns(200) {emailCampaignId: str, emailCampaignStatus: str}
@errors {400, 409, 500}

@endpoint GET /email_campaign/{email_campaign_id}
@required {email_campaign_id: str}
@returns(200) {audiences: [map], categoryId: str, categoryType: str, creationDate: str, emailCampaignId: str, emailCampaignStatus: str, emailCampaignType: str, itemIds: [str], itemSelectMode: str, marketplaceId: str, modificationDate: str, personalizedMessage: str, priceRange: map{currency: str, gte: num, lte: num}, promotionId: str, promotionSelectMode: str, scheduleDate: str, scheduleDateType: str, sentDate: str, sort: str, subject: str}
@errors {400, 409, 500}

@endpoint PUT /email_campaign/{email_campaign_id}
@required {email_campaign_id: str, Content-Type: str}
@optional {audienceCodes: [str], categoryId: str, categoryType: str, itemIds: [str], itemSelectMode: str, personalizedMessage: str, priceRange: map{currency: str, gte: num, lte: num}, promotionId: str, promotionSelectModeEnum: str, scheduleDate: str, sort: str, subject: str}
@returns(200) {emailCampaignId: str, emailCampaignStatus: str}
@errors {400, 409, 500}

@endpoint DELETE /email_campaign/{email_campaign_id}
@required {email_campaign_id: str}
@returns(200) {emailCampaignId: str}
@errors {400, 409, 500}

@endpoint GET /email_campaign/audience
@required {emailCampaignType: str}
@optional {limit: str, offset: str}
@returns(200) {audiences: [map], href: str, limit: int(int32), next: str, offset: int(int32), prev: str, total: int(int32)}
@errors {400, 409, 500}

@endpoint GET /email_campaign/{email_campaign_id}/email_preview
@required {email_campaign_id: str}
@returns(200) {content: str, renderDate: str}
@errors {400, 409, 500}

@endpoint GET /email_campaign/report
@required {endDate: str, startDate: str}
@returns(200) {clickCount: int(int32), openCount: int(int32), totalSales: map{currency: str, value: str}}
@errors {400, 409, 500}

@endgroup

@end
