PUT /external/api/campaigns

PUT /external/api/campaigns

Body

  • name string Required

    Minimum length is 1.

  • internalName string | null
  • id string Required

    Minimum length is 1.

  • storeId string | null
  • startDate string(date-time) | null
  • endDate string(date-time) | null
  • rule object Required
    Hide rule attributes Show rule attributes object
    • type string Required

      Values are cashDiscount, percentDiscount, newPrice, cartPercentDiscount, cartCashDiscount, quantityRebate, or quantityCashRebate.

    • requiresMembership boolean Required
    • scope string

      Values are product, productCart, or cart.

    • Additional properties are NOT allowed
  • products array[object] | null
    Hide products attributes Show products attributes object
    • id string Required

      Minimum length is 1.

    • sortIndex integer(int32) | null
    • Additional properties are NOT allowed
  • Additional properties are NOT allowed

Body

  • name string Required

    Minimum length is 1.

  • internalName string | null
  • id string Required

    Minimum length is 1.

  • storeId string | null
  • startDate string(date-time) | null
  • endDate string(date-time) | null
  • rule object Required
    Hide rule attributes Show rule attributes object
    • type string Required

      Values are cashDiscount, percentDiscount, newPrice, cartPercentDiscount, cartCashDiscount, quantityRebate, or quantityCashRebate.

    • requiresMembership boolean Required
    • scope string

      Values are product, productCart, or cart.

    • Additional properties are NOT allowed
  • products array[object] | null
    Hide products attributes Show products attributes object
    • id string Required

      Minimum length is 1.

    • sortIndex integer(int32) | null
    • Additional properties are NOT allowed
  • Additional properties are NOT allowed

Body

  • name string Required

    Minimum length is 1.

  • internalName string | null
  • id string Required

    Minimum length is 1.

  • storeId string | null
  • startDate string(date-time) | null
  • endDate string(date-time) | null
  • rule object Required
    Hide rule attributes Show rule attributes object
    • type string Required

      Values are cashDiscount, percentDiscount, newPrice, cartPercentDiscount, cartCashDiscount, quantityRebate, or quantityCashRebate.

    • requiresMembership boolean Required
    • scope string

      Values are product, productCart, or cart.

    • Additional properties are NOT allowed
  • products array[object] | null
    Hide products attributes Show products attributes object
    • id string Required

      Minimum length is 1.

    • sortIndex integer(int32) | null
    • Additional properties are NOT allowed
  • Additional properties are NOT allowed

Responses

  • 200

    Success

PUT /external/api/campaigns
curl \
 --request PUT 'https://demo.api.fygi.store/external/api/campaigns' \
 --header "authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '[{"name":"string","internalName":"string","id":"string","storeId":"string","startDate":"2025-05-04T09:42:00Z","endDate":"2025-05-04T09:42:00Z","rule":{"type":"cashDiscount","requiresMembership":true,"scope":"product"},"products":[{"id":"string","sortIndex":42}]}]'
curl \
 --request PUT 'https://demo.api.fygi.store/external/api/campaigns' \
 --header "authorization: $API_KEY" \
 --header "Content-Type: text/json"
curl \
 --request PUT 'https://demo.api.fygi.store/external/api/campaigns' \
 --header "authorization: $API_KEY" \
 --header "Content-Type: application/*+json"
Request examples
[
  {
    "name": "string",
    "internalName": "string",
    "id": "string",
    "storeId": "string",
    "startDate": "2025-05-04T09:42:00Z",
    "endDate": "2025-05-04T09:42:00Z",
    "rule": {
      "type": "cashDiscount",
      "requiresMembership": true,
      "scope": "product"
    },
    "products": [
      {
        "id": "string",
        "sortIndex": 42
      }
    ]
  }
]
Request examples
[
  {
    "name": "string",
    "internalName": "string",
    "id": "string",
    "storeId": "string",
    "startDate": "2025-05-04T09:42:00Z",
    "endDate": "2025-05-04T09:42:00Z",
    "rule": {
      "type": "cashDiscount",
      "requiresMembership": true,
      "scope": "product"
    },
    "products": [
      {
        "id": "string",
        "sortIndex": 42
      }
    ]
  }
]
Request examples
[
  {
    "name": "string",
    "internalName": "string",
    "id": "string",
    "storeId": "string",
    "startDate": "2025-05-04T09:42:00Z",
    "endDate": "2025-05-04T09:42:00Z",
    "rule": {
      "type": "cashDiscount",
      "requiresMembership": true,
      "scope": "product"
    },
    "products": [
      {
        "id": "string",
        "sortIndex": 42
      }
    ]
  }
]