Sub-resources of campaign-products

All available sub-resources of the resource campaign-products.

Get a campaign product store records

Get information about all campaign products store records.
[badge-blue GET] /campaign-products/{campaign_product_id}/campaign-product-store-records

Path parameters

Parameter name Type Description Mandatory (Yes/No)
campaign_product_id string The unique id of the Campaign product Yes

Query string

Parameter name Type Description Mandatory (Yes/No)
count integer The number of records to return.
Default value is 100.
No
offset integer The number of records from a collection to skip.
Default value is 0.
No
sort_field string One of the query string parameters for sorting.
Response is sorted by the specified field.
No
sort_direction string Direction of sorting the response list.
Possible values are: ASC / DESC
No

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
campaign_product_store_records CampaignProductStoreRecord[] List of the campaign product store records
total_items integer Count of all found campaign product store records

Example request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/campaign-products/8fdce3475560d56e95a035c/campaign-product-store-records
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmU2ZTBkMjg4MDllMzM3ZDdjNGEmENDljNGYyMzlkOWEwZmQyM2Q0NA==

Example response

HTTP/1.1 200 OK
Date: Tue, 04 Aug 2020 10:40:39 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "campaign_product_store_records": [
      {
        "campaign_product_store_record_id": "88c774183f5c3e413b3ba570f8",
        "store_id": "8fdd651ff3f615bcebebad87ce",
        "campaign_product_id": "8fdce3475560d56e95a6ab035c"
      },
      {
        "campaign_product_store_record_id": "80c1151c3f1a93549d17cab717",
        "store_id": "82de12eb8b138791e678fd11c3",
        "campaign_product_id": "8fdce3475560d56e95a6ab035c"
      },
      {
        "campaign_product_store_record_id": "85d7af2653321aa8a410046383",
        "store_id": "81dc8d5807157297ad7d668e61",
        "campaign_product_id": "8fdce3475560d56e95a6ab035c"
      },
      {
        "campaign_product_store_record_id": "8ad4ff4db9d628f2c8cb6181a4",
        "store_id": "8bda8a4854394325e2748a5005",
        "campaign_product_id": "8fdce3475560d56e95a6ab035c"
      }
    ],
    "total_items": 4
  }
}


Add a store to the campaign product

Add one of the stores to a campaign product
[badge-green POST] /campaign-products/{campaign_product_id}/campaign-product-store-records

Path parameters

Parameter name Type Description Mandatory (Yes/No)
campaign_product_id string The unique id of the campaign product Yes

Request

Parameter name Type Description Mandatory (Yes/No)
campaign_product_store_record CamapignProductStoreRecord Campaign product store record Yes

Response

Status code: 201 Created
Output structure : object

Parameter name Type Description
campaign_product_store_record_id string The unique id of the campaign product store record

Example request

POST https://<projectURL>/rest-api/enterprise-interface/v1.0/campaign-products/86ce801b45f59aa0854ba948/campaign-product-store-records
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmU2ZTBkMjg4MDllMzM3ZDdjNGEmEyZGFjZ3NmUYyMzlkOWEwZmQyM2Q0NA==

{
  "campaign_product_store_record" : {
    "store_id" : "8fdd651ff3f615bcebebad87ce",
    "campaign_product_id" : "86ce801b45f59aaad0854ba948"
  }
}

Example response

HTTP/1.1 201 Created
Date: Tue, 04 Aug 2020 10:46:12 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "campaign_product_store_record_id": "8dcba51e4abd377d8da75d4693"
  }
}