{"openapi":"3.0.1","info":{"title":"Campaign","description":"An API for a Bluestone Campaign project.\n <b><h1>Deprecated endpoints:</h1></b><table border=\"1px;\"><tr><th style=\"text-align: center; vertical-align: middle;\"><b><h3>Uri</b></h3></th><th><b>Method</b></th><th><b><h3>Since</h3></b></th><th><b><h3>End of life</h3></b></th></tr></table>","version":"1-apps"},"servers":[{"url":"api.test.bluestonepim.com/campaign"}],"tags":[{"name":"Technical","description":"To get technical information."}],"paths":{"/technical/version":{"get":{"tags":["Technical"],"summary":"Show service version.","operationId":"presentVersion","responses":{"200":{"description":"Show service version."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]}},"/campaigns/{id}/badges":{"get":{"tags":["Campaign Badge"],"summary":"Get array of badge.","operationId":"getBadge","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}},{"name":"context","in":"header","description":"Specifies the context in which to operate. If omitted, the default context `en` is used.\n\nIn Bluestone PIM, the context is generally synonymous with the language setting. The context determines how product information is tailored and presented based on language or other local specifications.\n\nFor more detailed information on how context relates to language settings in Bluestone PIM, refer to the [Languages and Context documentation](https://help.bluestonepim.com/languages-and-context).\n\n**Note:** The default context is identified by the ID `\"en\"`. IDs for additional contexts begin with a lowercase `\"L\"`, **not** with the digit `\"1\"`, followed by a number. This naming convention helps distinguish between default and custom contexts within Bluestone PIM.","schema":{"type":"string","default":"en"}},{"name":"context-fallback","in":"header","description":"Specifies whether to enable the fallback mechanism for the context. If omitted, the default value `true` will be used. When set to `true`, the system will provide a default translation or relevant information if the requested context's specific translation is missing.\n\nFor more detailed information on how context relates to language settings in Bluestone PIM, refer to the [Languages and Context documentation](https://help.bluestonepim.com/languages-and-context).\n\n**Note:** Setting the `context-fallback` parameter to `false` disables the fallback mechanism. In this configuration, if a translation or specific context information is not available, the system will not provide an alternative or default content. This ensures that only content that matches the exact context ID requested is returned, potentially leading to cases where no content is available if the specific translation is missing.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Array are listed.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Badge"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."}},"security":[{"oauth2":[]}]},"post":{"tags":["Campaign Badge"],"summary":"Create/Update badge to campaign.","operationId":"createBadgeInCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}},{"name":"context","in":"header","description":"Specifies the context in which to operate. If omitted, the default context `en` is used.\n\nIn Bluestone PIM, the context is generally synonymous with the language setting. The context determines how product information is tailored and presented based on language or other local specifications.\n\nFor more detailed information on how context relates to language settings in Bluestone PIM, refer to the [Languages and Context documentation](https://help.bluestonepim.com/languages-and-context).\n\n**Note:** The default context is identified by the ID `\"en\"`. IDs for additional contexts begin with a lowercase `\"L\"`, **not** with the digit `\"1\"`, followed by a number. This naming convention helps distinguish between default and custom contexts within Bluestone PIM.","schema":{"type":"string","default":"en"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadgeRequest"}}},"required":true},"responses":{"200":{"description":"Badge created in campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullCampaignResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Cannot create badge in campaign."}},"security":[{"oauth2":[]}]},"delete":{"tags":["Campaign Badge"],"summary":"Delete badge data from campaign.","operationId":"deleteBadgeInCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Delete badge from campaign successfully."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]}},"/campaigns/{id}/attributes":{"get":{"tags":["Campaign Attribute"],"summary":"Get campaign attributes.","operationId":"getCampaignAttributes","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}},{"name":"context","in":"header","description":"Specifies the context in which to operate. If omitted, the default context `en` is used.\n\nIn Bluestone PIM, the context is generally synonymous with the language setting. The context determines how product information is tailored and presented based on language or other local specifications.\n\nFor more detailed information on how context relates to language settings in Bluestone PIM, refer to the [Languages and Context documentation](https://help.bluestonepim.com/languages-and-context).\n\n**Note:** The default context is identified by the ID `\"en\"`. IDs for additional contexts begin with a lowercase `\"L\"`, **not** with the digit `\"1\"`, followed by a number. This naming convention helps distinguish between default and custom contexts within Bluestone PIM.","schema":{"type":"string","default":"en"}},{"name":"context-fallback","in":"header","description":"Specifies whether to enable the fallback mechanism for the context. If omitted, the default value `true` will be used. When set to `true`, the system will provide a default translation or relevant information if the requested context's specific translation is missing.\n\nFor more detailed information on how context relates to language settings in Bluestone PIM, refer to the [Languages and Context documentation](https://help.bluestonepim.com/languages-and-context).\n\n**Note:** Setting the `context-fallback` parameter to `false` disables the fallback mechanism. In this configuration, if a translation or specific context information is not available, the system will not provide an alternative or default content. This ensures that only content that matches the exact context ID requested is returned, potentially leading to cases where no content is available if the specific translation is missing.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Campaign attribute returns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignAttributeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."}},"security":[{"oauth2":[]}]},"post":{"tags":["Campaign Attribute"],"summary":"Add/Update attributes to campaign.","operationId":"upsertCampaignAttributes","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}},{"name":"context","in":"header","description":"Specifies the context in which to operate. If omitted, the default context `en` is used.\n\nIn Bluestone PIM, the context is generally synonymous with the language setting. The context determines how product information is tailored and presented based on language or other local specifications.\n\nFor more detailed information on how context relates to language settings in Bluestone PIM, refer to the [Languages and Context documentation](https://help.bluestonepim.com/languages-and-context).\n\n**Note:** The default context is identified by the ID `\"en\"`. IDs for additional contexts begin with a lowercase `\"L\"`, **not** with the digit `\"1\"`, followed by a number. This naming convention helps distinguish between default and custom contexts within Bluestone PIM.","schema":{"type":"string","default":"en"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignAttributeRequest"}}},"required":true},"responses":{"201":{"description":"Add attributes to campaign success."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]},"delete":{"tags":["Campaign Attribute"],"summary":"Delete campaign attributes.","operationId":"deleteCampaignAttributes","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveCampaignAttributeRequest"}}},"required":true},"responses":{"204":{"description":"Delete campaign attribute successfully."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]}},"/campaigns/predefined":{"get":{"tags":["Campaign Attribute"],"summary":"Get campaign predefined attributes.","operationId":"getCampaignPredefinedAttributes","responses":{"200":{"description":"Campaign predefined attribute returns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPredefinedAttributeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."}},"security":[{"oauth2":[]}]},"put":{"tags":["Campaign Attribute"],"summary":"Add/Update predefined attributes to organization.","operationId":"upsertPredefinedCampaignAttributes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPredefinedAttributeRequest"}}},"required":true},"responses":{"201":{"description":"Add predefined attributes to campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPredefinedAttribute"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]}},"/campaigns/{id}/bannerDisplayCategories":{"get":{"tags":["Campaign Banner"],"summary":"Get categories to display banner.","operationId":"getCategoryBanner","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Categories ids return.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BannerCategoryResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."}},"security":[{"oauth2":[]}]},"post":{"tags":["Campaign Banner"],"summary":"Add categories to display banner.","operationId":"addCategoryBanner","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BannerCategoryRequest"}}},"required":true},"responses":{"200":{"description":"Add categories to campaign success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BannerCategoryLinked"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]},"delete":{"tags":["Campaign Banner"],"summary":"Delete categories for display banner.","operationId":"deleteCategoryBanner","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BannerCategoryRequest"}}},"required":true},"responses":{"204":{"description":"Delete categories from campaign successfully."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]}},"/campaigns":{"get":{"tags":["Campaign"],"summary":"List Campaign.","operationId":"getCampaignList","parameters":[{"name":"status","in":"query","description":"Campaign status.","schema":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]}},{"name":"keyword","in":"query","description":"Search keyword.","schema":{"type":"string"}},{"name":"name","in":"query","description":"Campaign name.","schema":{"type":"string"}},{"name":"title","in":"query","description":"Campaign title.","schema":{"type":"string"}},{"name":"description","in":"query","description":"Campaign description.","schema":{"type":"string"}},{"name":"customerProfileId","in":"query","description":"Customer profile id.","schema":{"type":"string"}},{"name":"startDate","in":"query","description":"Campaign start date value in ISO 8601 date format.","schema":{"type":"string","format":"date-time"}},{"name":"expireDate","in":"query","description":"Campaign expire date value in ISO 8601 date format.","schema":{"type":"string","format":"date-time"}},{"name":"sortBy","in":"query","description":"sort by.","schema":{"type":"string","default":"name","enum":["name","title","status","expireDate","startDate"]}},{"name":"sort","in":"query","description":"soring order of the campaign.","schema":{"type":"string","default":"asc","enum":["asc","desc"]}},{"name":"page","in":"query","description":"Number of page, from 0 to 1431655.","schema":{"maximum":1431655,"minimum":0,"type":"integer","format":"int32","default":0}},{"name":"pageSize","in":"query","description":"Size of page, from 1 to 1500.","schema":{"maximum":1500,"minimum":1,"type":"integer","format":"int32","default":10}},{"name":"context","in":"header","description":"Specifies the context in which to operate. If omitted, the default context `en` is used.\n\nIn Bluestone PIM, the context is generally synonymous with the language setting. The context determines how product information is tailored and presented based on language or other local specifications.\n\nFor more detailed information on how context relates to language settings in Bluestone PIM, refer to the [Languages and Context documentation](https://help.bluestonepim.com/languages-and-context).\n\n**Note:** The default context is identified by the ID `\"en\"`. IDs for additional contexts begin with a lowercase `\"L\"`, **not** with the digit `\"1\"`, followed by a number. This naming convention helps distinguish between default and custom contexts within Bluestone PIM.","schema":{"type":"string","default":"en"}},{"name":"context-fallback","in":"header","description":"Specifies whether to enable the fallback mechanism for the context. If omitted, the default value `true` will be used. When set to `true`, the system will provide a default translation or relevant information if the requested context's specific translation is missing.\n\nFor more detailed information on how context relates to language settings in Bluestone PIM, refer to the [Languages and Context documentation](https://help.bluestonepim.com/languages-and-context).\n\n**Note:** Setting the `context-fallback` parameter to `false` disables the fallback mechanism. In this configuration, if a translation or specific context information is not available, the system will not provide an alternative or default content. This ensures that only content that matches the exact context ID requested is returned, potentially leading to cases where no content is available if the specific translation is missing.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Campaign are listed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCampaignResponse"}},"application/full+json":{"schema":{"$ref":"#/components/schemas/ListCampaignResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]},"post":{"tags":["Campaign"],"summary":"Create campaign.","operationId":"createCampaign","parameters":[{"name":"context","in":"header","description":"Context.","schema":{"type":"string","default":"en"},"example":"en"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignRequest"}}},"required":true},"responses":{"201":{"description":"Campaign create success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Cannot create new campaign."}},"security":[{"oauth2":[]}]}},"/campaigns/{id}":{"get":{"tags":["Campaign"],"summary":"Get Campaign.","operationId":"getCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}},{"name":"context","in":"header","description":"Context.","schema":{"type":"string","default":"en"},"example":"en"},{"name":"context-fallback","in":"header","description":"Context fallback.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Campaign found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullCampaignWithConnectionResponse"}},"application/full+json":{"schema":{"$ref":"#/components/schemas/FullCampaignWithConnectionResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."}},"security":[{"oauth2":[]}]},"put":{"tags":["Campaign"],"summary":"Update campaign information.","operationId":"updateCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}},{"name":"context","in":"header","description":"Context.","schema":{"type":"string","default":"en"},"example":"en"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRequest"}}},"required":true},"responses":{"200":{"description":"Campaign updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign id not found."}},"security":[{"oauth2":[]}]},"delete":{"tags":["Campaign"],"summary":"Delete campaign.","operationId":"deleteCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Delete campaign successfully."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]},"patch":{"tags":["Campaign"],"summary":"Patch campaign information.","operationId":"patchCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}},{"name":"context","in":"header","description":"Context.","schema":{"type":"string","default":"en"},"example":"en"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRequest"}}},"required":true},"responses":{"200":{"description":"Campaign updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign id not found."}},"security":[{"oauth2":[]}]}},"/campaigns/product/{productId}":{"post":{"tags":["Campaign"],"summary":"Get product campaign with information.","description":"Omitting customerGroupIds searches for the campaigns that are not linked to any customer group; providing them returns only the campaigns linked to those groups. The rule applies to campaigns linked directly to the product and to campaigns linked through its categories alike.","operationId":"getCampaign_1","parameters":[{"name":"productId","in":"path","description":"product id.","required":true,"schema":{"type":"string"}},{"name":"context","in":"header","description":"Context.","schema":{"type":"string","default":"en"},"example":"en"},{"name":"context-fallback","in":"header","description":"Context fallback.","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProductCampaignRequest"}}}},"responses":{"200":{"description":"Get product campaigns successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCampaignResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"price rule id not found."},"502":{"description":"An upstream service needed to answer the request could not be reached. The request is safe to retry."}},"security":[{"oauth2":[]}]}},"/campaigns/{id}/categories":{"get":{"tags":["Campaign Category"],"summary":"Get linked categories campaign.","operationId":"getGroupIds","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Categories ids return.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignProductResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."}},"security":[{"oauth2":[]}]},"post":{"tags":["Campaign Category"],"summary":"Add/Update category to campaign.","operationId":"addCategoryToCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCategoryRequest"}}},"required":true},"responses":{"200":{"description":"Add category to campaign success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCategoryLinked"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]},"delete":{"tags":["Campaign Category"],"summary":"Delete category data from campaign product.","operationId":"deleteGroupsCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCategoryRequest"}}},"required":true},"responses":{"204":{"description":"Delete category from campaign successfully."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]}},"/campaigns/{id}/groups":{"get":{"tags":["Campaign Customer Group"],"summary":"Get customer group ids.","operationId":"getGroupIds_1","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Customer group ids return.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignProductResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."}},"security":[{"oauth2":[]}]},"post":{"tags":["Campaign Customer Group"],"summary":"Add/Update customer group to campaign.","operationId":"addGroupToCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCustomerGroupRequest"}}},"required":true},"responses":{"200":{"description":"Add groups to campaign success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCustomerGroupLinked"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."},"502":{"description":"An upstream service needed to answer the request could not be reached. The request is safe to retry."}},"security":[{"oauth2":[]}]},"delete":{"tags":["Campaign Customer Group"],"summary":"Delete customer group data from campaign product.","operationId":"deleteGroupsCampaign_1","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCustomerGroupRequest"}}},"required":true},"responses":{"204":{"description":"Delete customer group from campaign successfully."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]}},"/campaigns/{id}/profiles":{"get":{"tags":["Campaign Customer Profile"],"summary":"Get customer profile ids.","operationId":"getCustomerProfile","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Customer profile ids return.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerProfileResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."}},"security":[{"oauth2":[]}]},"post":{"tags":["Campaign Customer Profile"],"summary":"Add/Update customer profile to campaign.","operationId":"upsertCustomerProfile","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomerProfileRequest"}}},"required":true},"responses":{"200":{"description":"Add profile to campaign success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerProfileLinked"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]},"delete":{"tags":["Campaign Customer Profile"],"summary":"Delete customer profile data from campaign product.","operationId":"deleteCustomerProfile","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCustomerProfileRequest"}}},"required":true},"responses":{"204":{"description":"Delete customer profile from campaign successfully."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]}},"/campaigns/{id}/media":{"get":{"tags":["Campaign Media"],"summary":"List medias in campaign.","operationId":"getMedias","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Medias are listed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMediaResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Media not found."}},"security":[{"oauth2":[]}]},"put":{"tags":["Campaign Media"],"summary":"Sorting media in campaign.","operationId":"sortMedia","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SortCampaignMediaRequest"}}},"required":true},"responses":{"204":{"description":"Media sorted."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Cannot sort media."}},"security":[{"oauth2":[]}]},"post":{"tags":["Campaign Media"],"summary":"Add media in campaign.","operationId":"createMediaInCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignMediaRequest"}}},"required":true},"responses":{"201":{"description":"Media added in campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Cannot add media in campaign."}},"security":[{"oauth2":[]}]}},"/campaigns/{id}/media/{mediaId}":{"put":{"tags":["Campaign Media"],"summary":"Update media in campaign.","operationId":"updateMediaInCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}},{"name":"mediaId","in":"path","description":"Media id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignMediaRequest"}}},"required":true},"responses":{"200":{"description":"Media updated in campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Cannot update media in campaign."}},"security":[{"oauth2":[]}]},"delete":{"tags":["Campaign Media"],"summary":"Delete media from campaign.","operationId":"deleteMediaFromCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}},{"name":"mediaId","in":"path","description":"Media id.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Delete media from campaign successfully."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign or Media not found."}},"security":[{"oauth2":[]}]}},"/metadata/category/{categoryId}":{"get":{"tags":["Metadata"],"summary":"Get category metadata by ID.","operationId":"getCategoryMetadataByCanonicalId","parameters":[{"name":"categoryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A category metadata is retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMetaCampaign"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]}},"/metadata/category":{"get":{"tags":["Metadata"],"summary":"Get category metadata by timestamp to be published.","operationId":"getCategoryMetadataByTimestamp","parameters":[{"name":"updatedAfter","in":"query","schema":{"type":"integer","format":"int64","default":1536305594528}},{"name":"page","in":"query","schema":{"type":"integer","format":"int32","default":0}},{"name":"pageSize","in":"query","schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":100}}],"responses":{"200":{"description":"A category metadata list is retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMetaEntity"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]}},"/metadata/product/{productId}":{"get":{"tags":["Metadata"],"summary":"Get product metadata by ID.","operationId":"getProductMetadataByCanonicalId","parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A product metadata is retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMetaCampaign"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]}},"/metadata/product":{"get":{"tags":["Metadata"],"summary":"Get product metadata by timestamp to be published.","operationId":"getProductMetadataByTimestamp","parameters":[{"name":"updatedAfter","in":"query","schema":{"type":"integer","format":"int64","default":1536305594528}},{"name":"page","in":"query","schema":{"type":"integer","format":"int32","default":0}},{"name":"pageSize","in":"query","schema":{"maximum":1000,"minimum":1,"type":"integer","format":"int32","default":100}}],"responses":{"200":{"description":"A product metadata list is retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMetaEntity"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]}},"/campaigns/{id}/prices":{"get":{"tags":["Campaign Price"],"summary":"Get campaign price rule.","operationId":"getCampaignPrice","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Product ids return.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPriceRuleResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."},"500":{"description":"Cannot get campaign price."}},"security":[{"oauth2":[]}]},"post":{"tags":["Campaign Price"],"summary":"Add/Update campaign price rule.","operationId":"createPriceRule","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPriceRuleRequest"}}},"required":true},"responses":{"200":{"description":"Add/Update campaign price rule success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPriceRuleResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."},"422":{"description":"Unable to create price rule."}},"security":[{"oauth2":[]}]},"delete":{"tags":["Campaign Price"],"summary":"Delete price from campaign.","operationId":"deleteCampaignPrice","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Delete price from campaign successfully."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign or Price not found."}},"security":[{"oauth2":[]}]}},"/products/campaigns/search":{"post":{"tags":["Product Campaign"],"summary":"Get active campaigns for a bulk list of products. (Only matches campaigns linked directly to a product.)","description":"Only matches campaigns linked directly to a product. Campaigns linked via category (and its parent categories) are not included.","operationId":"getProductsCampaign","parameters":[{"name":"context","in":"header","description":"Context.","schema":{"type":"string","default":"en"},"example":"en"},{"name":"context-fallback","in":"header","description":"Context fallback.","schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProductsCampaignRequest"}}}},"responses":{"200":{"description":"Get product campaigns successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkProductCampaignResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"An upstream service needed to answer the request could not be reached, so whether these products carry a campaign is unknown. The request is safe to retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]}},"/campaigns/{id}/products":{"get":{"tags":["Campaign Product"],"summary":"Get product ids.","operationId":"getProductIds","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Product ids return.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignProductResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."}},"security":[{"oauth2":[]}]},"post":{"tags":["Campaign Product"],"summary":"Add/Update product to campaign.","operationId":"addProductToCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignProductRequest"}}},"required":true},"responses":{"200":{"description":"Add products to campaign success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignProductLinked"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]},"delete":{"tags":["Campaign Product"],"summary":"Delete products data from campaign product.","operationId":"deleteProductsCampaign","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignProductRequest"}}},"required":true},"responses":{"204":{"description":"Delete products from campaign successfully."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]}},"/campaigns/{id}/rulesCategories":{"get":{"tags":["Campaign Rule Category"],"summary":"Get rule category ids in campaign.","operationId":"getCampaignRuleCategory","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List rule category ids successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRuleCategoryResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."}},"security":[{"oauth2":[]}]},"post":{"tags":["Campaign Rule Category"],"summary":"Add rule category to campaign.","operationId":"addCampaignRuleCategory","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRuleCategoryRequest"}}},"required":true},"responses":{"200":{"description":"Add rule category to campaign successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCampaignRuleCategoryResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]},"delete":{"tags":["Campaign Rule Category"],"summary":"Delete rule category in campaign.","operationId":"deleteCampaignRuleCategory","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRuleCategoryRequest"}}},"required":true},"responses":{"204":{"description":"Delete rule category successfully."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]}},"/campaigns/{id}/rulesProducts":{"get":{"tags":["Campaign Rule Product"],"summary":"Get rule product ids in campaign.","operationId":"getCampaignRuleProduct","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List rule product ids successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRuleProductResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign not found."}},"security":[{"oauth2":[]}]},"post":{"tags":["Campaign Rule Product"],"summary":"Add rule product to campaign.","operationId":"addCampaignRuleProduct","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRuleProductRequest"}}},"required":true},"responses":{"200":{"description":"Add rule products to campaign success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCampaignRuleProductResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]},"delete":{"tags":["Campaign Rule Product"],"summary":"Delete rule products data in campaign.","operationId":"deleteCampaignRuleProduct","parameters":[{"name":"id","in":"path","description":"Campaign id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRuleProductRequest"}}},"required":true},"responses":{"204":{"description":"Delete rule products in campaign successfully."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Campaign is not found."}},"security":[{"oauth2":[]}]}}},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"status":{"title":"Error status code.","type":"integer","format":"int32"},"error":{"title":"General error description.","type":"string"},"errorDetails":{"title":"List of errors details.","type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}},"requestId":{"title":"Request ID used for logging.","type":"string"},"timestamp":{"title":"Error timestamp.","type":"integer","format":"int64"},"quotaLimitExceededDetails":{"title":"Additional entity id list related to error","type":"array","items":{"$ref":"#/components/schemas/QuotaLimitExceededDetails"}}}},"ErrorDetails":{"title":"List of errors details.","type":"object","properties":{"message":{"title":"Error message.","type":"string"},"field":{"title":"Error related field.","type":"string"},"rejectedValue":{"title":"Invalid value causing error.","type":"string"}}},"QuotaLimitExceededDetails":{"title":"Additional entity id list related to error","type":"object","properties":{"quota":{"title":"Quota name.","type":"string"},"message":{"title":"Quota limit message.","type":"string"},"limit":{"title":"Quota limit.","type":"integer","format":"int32"},"entityId":{"title":"Id of the entity that caused the quota limit to be exceeded.","type":"string","nullable":true},"entityType":{"title":"Type of the entity that caused the quota limit to be exceeded.","type":"string","nullable":true}}},"Asset":{"type":"object","properties":{"mediaId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"},"labels":{"type":"array","items":{"type":"string"}}}},"BadgeResponse":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"color":{"type":"string"},"background":{"type":"string"}}},"FullCampaignResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"priority":{"type":"integer","format":"int32"},"header":{"type":"string"},"text":{"type":"string"},"price":{"type":"string"},"note":{"type":"string"},"linkName":{"type":"string"},"link":{"type":"string"},"textColor":{"type":"string"},"backgroundColor":{"type":"string"},"newPage":{"type":"boolean"},"badgeEnable":{"type":"boolean"},"startDate":{"type":"string"},"expireDate":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"},"bannerDisplayLocations":{"type":"array","items":{"type":"string","enum":["START_PAGE","CATEGORY_PAGE","SEARCH_PAGE","CAMPAIGN_LANDING_PAGE"]}},"badges":{"type":"array","items":{"$ref":"#/components/schemas/BadgeResponse"}},"medias":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}}}},"BadgeRequest":{"type":"object","properties":{"text":{"type":"string"},"color":{"type":"string"},"background":{"type":"string"}}},"Badge":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"object","additionalProperties":{"type":"string"}},"color":{"type":"string"},"background":{"type":"string"}}},"RemoveCampaignAttributeRequest":{"type":"object","properties":{"attributeKeys":{"type":"array","items":{"type":"string"}}}},"CampaignAttributeResponse":{"type":"object","properties":{"id":{"type":"string"},"campaignId":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"organizationId":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"}}}},"CampaignPredefinedAttributeResponse":{"type":"object","properties":{"id":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"organizationId":{"type":"string"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/PredefinedAttributeResponse"}}}},"PredefinedAttributeResponse":{"type":"object","properties":{"type":{"type":"string","enum":["TEXT","BOOLEAN","MARKDOWN","NUMBER","DATETIME","SINGLE_SELECT"]},"name":{"type":"string"},"title":{"type":"string"},"defaultValue":{"type":"object","additionalProperties":{"type":"string"}},"selectOptions":{"type":"array","items":{"$ref":"#/components/schemas/SelectOptions"}},"helpText":{"type":"string"},"readonly":{"type":"boolean"},"required":{"type":"boolean"},"section":{"type":"string"}}},"SelectOptions":{"type":"object","properties":{"text":{"type":"string"},"value":{"type":"object","additionalProperties":{"type":"string"}}}},"CampaignAttributeRequest":{"type":"object","properties":{"attributes":{"type":"object","additionalProperties":{"type":"string"}}}},"CampaignPredefinedAttribute":{"type":"object","properties":{"id":{"type":"string","example":"64f44f9d5e12ab1d2a7c4f2e"},"modifiedAt":{"type":"string","format":"date-time"},"modifiedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"organizationId":{"type":"string"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/PredefinedAttribute"}},"description":{"type":"string"}}},"PredefinedAttribute":{"type":"object","properties":{"type":{"type":"string","enum":["TEXT","BOOLEAN","MARKDOWN","NUMBER","DATETIME","SINGLE_SELECT"]},"name":{"type":"string"},"title":{"type":"string"},"defaultValue":{"type":"object","additionalProperties":{"type":"string"}},"selectOptions":{"type":"array","items":{"$ref":"#/components/schemas/SelectOptions"}},"helpText":{"type":"string"},"readonly":{"type":"boolean"},"required":{"type":"boolean"},"section":{"type":"string"}}},"CampaignPredefinedAttributeRequest":{"type":"object","properties":{"attributes":{"type":"array","items":{"$ref":"#/components/schemas/PredefinedAttribute"}}}},"BannerCategoryLinked":{"type":"object","properties":{"id":{"type":"string"},"campaignId":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"organizationId":{"type":"string"},"categoryIds":{"uniqueItems":true,"type":"array","items":{"type":"string"}}}},"BannerCategoryRequest":{"required":["categoryIds"],"type":"object","properties":{"categoryIds":{"title":"Category ids that connect to campaign banner.","type":"array","items":{"title":"Category id","type":"string"}}}},"BannerCategoryResponse":{"type":"object","properties":{"categoryIds":{"type":"array","items":{"type":"string"}}}},"CampaignResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"priority":{"type":"integer","format":"int32"},"header":{"type":"string"},"text":{"type":"string"},"price":{"type":"string"},"note":{"type":"string"},"linkName":{"type":"string"},"link":{"type":"string"},"textColor":{"type":"string"},"backgroundColor":{"type":"string"},"newPage":{"type":"boolean"},"badgeEnable":{"type":"boolean"},"startDate":{"type":"string"},"expireDate":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"},"bannerDisplayLocations":{"type":"array","items":{"type":"string","enum":["START_PAGE","CATEGORY_PAGE","SEARCH_PAGE","CAMPAIGN_LANDING_PAGE"]}}}},"CreateCampaignRequest":{"required":["name","title"],"type":"object","properties":{"description":{"type":"string"},"startDate":{"type":"string","description":"start date in ISO 8601 date format."},"expireDate":{"type":"string","description":"expire date in ISO 8601 date format."},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"title":{"type":"string","description":"Campaign title."},"name":{"type":"string","description":"Campaign name."}}},"FullCampaignWithConnectionResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"priority":{"type":"integer","format":"int32"},"header":{"type":"string"},"text":{"type":"string"},"price":{"type":"string"},"note":{"type":"string"},"linkName":{"type":"string"},"link":{"type":"string"},"textColor":{"type":"string"},"backgroundColor":{"type":"string"},"newPage":{"type":"boolean"},"badgeEnable":{"type":"boolean"},"startDate":{"type":"string"},"expireDate":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"},"bannerDisplayLocations":{"type":"array","items":{"type":"string","enum":["START_PAGE","CATEGORY_PAGE","SEARCH_PAGE","CAMPAIGN_LANDING_PAGE"]}},"badges":{"type":"array","items":{"$ref":"#/components/schemas/BadgeResponse"}},"medias":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}},"products":{"type":"array","items":{"type":"string"}},"groups":{"type":"array","items":{"type":"string"}},"profiles":{"type":"array","items":{"type":"string"}},"categories":{"type":"array","items":{"type":"string"}},"bannerDisplayCategories":{"type":"array","items":{"type":"string"}},"ruleCategories":{"type":"array","items":{"type":"string"}},"ruleProducts":{"type":"array","items":{"type":"string"}}}},"CampaignPriceRuleInfo":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"number","format":"double"},"rangeFrom":{"type":"number","format":"double"},"priceId":{"type":"string"},"status":{"type":"boolean"}}},"ProductCampaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"badgeEnable":{"type":"boolean"},"startDate":{"type":"string"},"expireDate":{"type":"string"},"badges":{"type":"array","items":{"$ref":"#/components/schemas/BadgeResponse"}},"bannerDisplayLocations":{"type":"array","items":{"type":"string","enum":["START_PAGE","CATEGORY_PAGE","SEARCH_PAGE","CAMPAIGN_LANDING_PAGE"]}},"bannerDisplayCategories":{"type":"array","items":{"type":"string"}},"priceRule":{"$ref":"#/components/schemas/CampaignPriceRuleInfo"},"customerGroups":{"type":"array","description":"Ids of the customer groups this campaign is linked to. Empty when the campaign is not linked to any.","items":{"type":"string","description":"Ids of the customer groups this campaign is linked to. Empty when the campaign is not linked to any."}},"attributes":{"type":"object","additionalProperties":{"type":"string"}}},"description":"Active campaigns linked directly to this product. Empty when there are none."},"ProductCampaignResponse":{"type":"object","properties":{"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/ProductCampaign"}}}},"GetProductCampaignRequest":{"type":"object","properties":{"customerGroupIds":{"type":"array","items":{"type":"string"}}}},"ListCampaignResponse":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"data":{"type":"array","items":{"$ref":"#/components/schemas/FullCampaignWithConnectionResponse"}}}},"CampaignRequest":{"type":"object","properties":{"description":{"type":"string"},"startDate":{"type":"string","description":"start date in ISO 8601 date format."},"expireDate":{"type":"string","description":"expire date in ISO 8601 date format."},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"title":{"type":"string","description":"Campaign title which is required on default context."},"name":{"type":"string","description":"Campaign name which is required on default context."},"badgeEnable":{"type":"boolean"},"priority":{"type":"integer","format":"int32"},"header":{"type":"string"},"text":{"type":"string"},"price":{"type":"string"},"note":{"type":"string"},"linkName":{"type":"string"},"link":{"type":"string"},"textColor":{"type":"string"},"backgroundColor":{"type":"string"},"newPage":{"type":"boolean"},"bannerDisplayLocations":{"title":"Banner display location.","type":"array","items":{"title":"Banner display location.","type":"string","enum":["START_PAGE","CATEGORY_PAGE","SEARCH_PAGE","CAMPAIGN_LANDING_PAGE"]}}}},"CampaignCategoryLinked":{"type":"object","properties":{"id":{"type":"string"},"campaignId":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"organizationId":{"type":"string"},"categoryId":{"uniqueItems":true,"type":"array","items":{"type":"string"}}}},"CampaignCategoryRequest":{"required":["value"],"type":"object","properties":{"value":{"title":"Category ids that connect to campaign.","type":"array","items":{"title":"Category id","type":"string"}}}},"CampaignProductResponse":{"type":"object","properties":{"value":{"type":"array","items":{"type":"string"}}}},"CampaignCustomerGroupLinked":{"type":"object","properties":{"id":{"type":"string"},"campaignId":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"organizationId":{"type":"string"},"customerGroupId":{"uniqueItems":true,"type":"array","items":{"type":"string"}},"errorMessage":{"type":"string"}}},"CampaignCustomerGroupRequest":{"required":["value"],"type":"object","properties":{"value":{"title":"Customer group ids that connect to campaign.","type":"array","items":{"type":"string"}}}},"DeleteCustomerProfileRequest":{"required":["value"],"type":"object","properties":{"value":{"title":"Customer profile ids that connect to campaign.","type":"array","items":{"type":"string"}}}},"CustomerProfileResponse":{"type":"object","properties":{"value":{"type":"array","items":{"type":"string"}}}},"CustomerProfileLinked":{"type":"object","properties":{"id":{"type":"string"},"campaignId":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"organizationId":{"type":"string"},"customerProfileId":{"uniqueItems":true,"type":"array","items":{"type":"string"}},"errorMessage":{"type":"string"}}},"UpsertCustomerProfileRequest":{"required":["value"],"type":"object","properties":{"value":{"title":" Customer profile ids that connect to campaign.","type":"array","items":{"type":"string"}}}},"MediaResponse":{"type":"object","properties":{"id":{"type":"string"},"priority":{"type":"integer","format":"int32"},"name":{"type":"string"},"description":{"type":"string"},"labels":{"type":"array","items":{"type":"string"}},"mediaId":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"}}},"CampaignMediaRequest":{"required":["mediaId"],"type":"object","properties":{"mediaId":{"type":"string"}}},"ListMediaResponse":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MediaResponse"}}}},"MediaSorting":{"type":"object","properties":{"id":{"type":"string","description":"Asset id"},"priority":{"type":"integer","format":"int32"},"movedNode":{"type":"boolean","description":"asset move by user"}}},"SortCampaignMediaRequest":{"type":"object","properties":{"sort":{"type":"array","items":{"$ref":"#/components/schemas/MediaSorting"}}}},"UpdateCampaignMediaRequest":{"type":"object","properties":{"title":{"type":"string","description":"Campaign media title."},"description":{"type":"string","description":"Campaign media description."},"labels":{"title":"Campaign media label ids list.","type":"array","items":{"type":"string"}}}},"ListMetaCampaign":{"type":"object","properties":{"campaign":{"type":"array","items":{"$ref":"#/components/schemas/MetaCampaign"}}}},"MetaBadge":{"type":"object","properties":{"text":{"type":"object","additionalProperties":{"type":"string"}},"color":{"type":"string"},"background":{"type":"string"}}},"MetaCampaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"object","additionalProperties":{"type":"string"}},"title":{"type":"object","additionalProperties":{"type":"string"}},"description":{"type":"object","additionalProperties":{"type":"string"}},"startDate":{"type":"string","format":"date-time"},"expireDate":{"type":"string","format":"date-time"},"badgeEnable":{"type":"boolean"},"bannerDisplayLocations":{"type":"array","items":{"type":"string","enum":["START_PAGE","CATEGORY_PAGE","SEARCH_PAGE","CAMPAIGN_LANDING_PAGE"]}},"status":{"type":"string"},"badges":{"type":"array","items":{"$ref":"#/components/schemas/MetaBadge"}},"customerGroupIds":{"type":"array","items":{"type":"string"}},"customerProfileIds":{"type":"array","items":{"type":"string"}},"ruleCategoryIds":{"type":"array","items":{"type":"string"}},"ruleProductIds":{"type":"array","items":{"type":"string"}},"priceRule":{"$ref":"#/components/schemas/CampaignPriceRuleInfo"},"attributes":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}}}},"ListMetaEntity":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MetaEntity"}}}},"MetaEntity":{"type":"object","properties":{"id":{"type":"string"},"metadata":{"$ref":"#/components/schemas/ListMetaCampaign"}}},"CampaignPriceRuleResponse":{"type":"object","properties":{"campaignId":{"type":"string"},"type":{"type":"string"},"value":{"type":"number","format":"double"},"minimumPrice":{"type":"number","format":"double"},"applyTo":{"type":"string"},"rangeFrom":{"type":"number","format":"double"},"rangeTo":{"type":"number","format":"double"},"priceId":{"type":"string"},"status":{"type":"boolean"},"priceName":{"type":"string"}}},"CampaignPriceRuleRequest":{"required":["applyTo","rangeFrom","type","value"],"type":"object","properties":{"type":{"type":"string","enum":["percentage-subsidy","fixed-subsidy","fixed-price"]},"value":{"type":"integer","description":"Campaign price.","format":"int64"},"minimumPrice":{"type":"integer","format":"int64"},"applyTo":{"type":"string","enum":["product","category"]},"rangeFrom":{"type":"integer","format":"int64"},"rangeTo":{"type":"integer","format":"int64"}}},"BulkProductCampaignResponse":{"type":"object","properties":{"products":{"type":"array","items":{"$ref":"#/components/schemas/ProductCampaignsItem"}}}},"ProductCampaignsItem":{"type":"object","properties":{"productId":{"type":"string","description":"Product id, echoed in lower-case hex regardless of the casing used in the request. One entry is returned per distinct requested id, in the order they were sent."},"campaigns":{"type":"array","description":"Active campaigns linked directly to this product. Empty when there are none.","items":{"$ref":"#/components/schemas/ProductCampaign"}}}},"GetProductsCampaignRequest":{"type":"object","properties":{"productIds":{"maxItems":100,"minItems":1,"type":"array","description":"Product ids to look up campaigns for. Hex casing is not significant, and ids are echoed back in lower case. Repeating an id yields a single response entry.","items":{"type":"string"}}}},"CampaignProductLinked":{"type":"object","properties":{"id":{"type":"string"},"campaignId":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"organizationId":{"type":"string"},"productId":{"uniqueItems":true,"type":"array","items":{"type":"string"}},"errorMessage":{"type":"string"}}},"CampaignProductRequest":{"required":["value"],"type":"object","properties":{"value":{"title":"Product ids that connect to campaign.","type":"array","items":{"type":"string"}}}},"AddCampaignRuleCategoryResponse":{"type":"object","properties":{"id":{"type":"string"},"campaignId":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"organizationId":{"type":"string"},"ruleCategoryIds":{"uniqueItems":true,"type":"array","items":{"type":"string"}},"errorMessage":{"type":"string"}}},"CampaignRuleCategoryRequest":{"required":["value"],"type":"object","properties":{"value":{"title":"Rule category ids.","maxItems":100,"minItems":1,"type":"array","example":["69412c6177f4f6e986efe78b"],"items":{"title":"Rule category ids.","type":"string","example":"[\"69412c6177f4f6e986efe78b\"]"}}}},"CampaignRuleCategoryResponse":{"type":"object","properties":{"value":{"type":"array","items":{"type":"string"}}}},"AddCampaignRuleProductResponse":{"type":"object","properties":{"id":{"type":"string"},"campaignId":{"type":"string"},"modifiedAt":{"type":"string"},"modifiedBy":{"type":"string"},"createdAt":{"type":"string"},"createdBy":{"type":"string"},"organizationId":{"type":"string"},"ruleProductIds":{"uniqueItems":true,"type":"array","items":{"type":"string"}},"errorMessage":{"type":"string"}}},"CampaignRuleProductRequest":{"required":["value"],"type":"object","properties":{"value":{"title":"Rule product ids.","maxItems":100,"minItems":1,"type":"array","example":["69412c6177f4f6e986efe78b"],"items":{"title":"Rule product ids.","type":"string","example":"[\"69412c6177f4f6e986efe78b\"]"}}}},"CampaignRuleProductResponse":{"type":"object","properties":{"value":{"type":"array","items":{"type":"string"}}}}},"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://idp.test.bluestonepim.com/op/token","scopes":{"openid profile systemRoles permissions organization email name nickname":"All needed scopes."}}}}}},"x-amazon-apigateway-api-key-source":"AUTHORIZER"}