Promotions

Update promotion

Replace the promotion object of a specific promotion with another.

put/promotions/{id}

Request

  • Base URL
    https://api.c1st.com/api
  • URL
    https://api.c1st.com/api/promotions/{id}
  • Auth
    HTTP bearer

Path parameters

idinteger required

Request body

Example request

{
  "content": {
    "id": 123,
    "name": "Summer discount",
    "description": "10% on all bikes in the summer.",
    "deleted": 1,
    "startdate": "2019-01-01 12:00:00",
    "enddate": "2019-02-01 12:00:00",
    "minproducts": 1,
    "productfilters": [
      {
        "attribute": "tag",
        "value": "Bike"
      }
    ],
    "customerfilters": [
      {
        "attribute": "tag",
        "value": [
          "1",
          "2",
          "3"
        ]
      }
    ],
    "serviceplanfilters": [
      {
        "attribute": "tag",
        "value": [
          "1",
          "2",
          "3"
        ]
      }
    ],
    "articles": [
      {
        "productno": "456",
        "quantity": 5
      }
    ],
    "action": {
      "type": "percentage",
      "amount": 10
    }
  }
}

Response

Ok

updatedinteger

Whether or not the promotion was deleted. 0 for failure, 1 for success.

Example response

{
  "updated": 1
}

Changes

No recorded changes to this operation across all 1 revision of this API.