PATCH /external/api/campaigns

PATCH /external/api/campaigns

Body

  • id string Required

    Minimum length is 1.

  • name Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    Hide name attributes Show name attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    • value string | null
    • Additional properties are NOT allowed
  • image Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    Hide image attributes Show image attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    • value string(uuid) | null
    • Additional properties are NOT allowed
  • startDate Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    Hide startDate attributes Show startDate attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    • value string(date-time) | null
    • Additional properties are NOT allowed
  • endDate Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    Hide endDate attributes Show endDate attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    • value string(date-time) | null
    • Additional properties are NOT allowed
  • storeId Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    Hide storeId attributes Show storeId attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    • value string | null
    • Additional properties are NOT allowed
  • active Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    Hide active attributes Show active attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    • value boolean | null
    • Additional properties are NOT allowed
  • rule Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    Hide rule attributes Show rule attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    • value object
      Hide value attributes Show value 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
    • Additional properties are NOT allowed
  • products Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Collections.Generic.List`1[object]]
    Hide products attributes Show products attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Collections.Generic.List`1[object]]
    • value array[object] | null
      Hide value attributes Show value attributes object
      • id string Required

        Minimum length is 1.

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

Body

  • id string Required

    Minimum length is 1.

  • name Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    Hide name attributes Show name attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    • value string | null
    • Additional properties are NOT allowed
  • image Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    Hide image attributes Show image attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    • value string(uuid) | null
    • Additional properties are NOT allowed
  • startDate Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    Hide startDate attributes Show startDate attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    • value string(date-time) | null
    • Additional properties are NOT allowed
  • endDate Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    Hide endDate attributes Show endDate attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    • value string(date-time) | null
    • Additional properties are NOT allowed
  • storeId Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    Hide storeId attributes Show storeId attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    • value string | null
    • Additional properties are NOT allowed
  • active Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    Hide active attributes Show active attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    • value boolean | null
    • Additional properties are NOT allowed
  • rule Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    Hide rule attributes Show rule attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    • value object
      Hide value attributes Show value 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
    • Additional properties are NOT allowed
  • products Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Collections.Generic.List`1[object]]
    Hide products attributes Show products attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Collections.Generic.List`1[object]]
    • value array[object] | null
      Hide value attributes Show value attributes object
      • id string Required

        Minimum length is 1.

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

Body

  • id string Required

    Minimum length is 1.

  • name Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    Hide name attributes Show name attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    • value string | null
    • Additional properties are NOT allowed
  • image Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    Hide image attributes Show image attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    • value string(uuid) | null
    • Additional properties are NOT allowed
  • startDate Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    Hide startDate attributes Show startDate attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    • value string(date-time) | null
    • Additional properties are NOT allowed
  • endDate Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    Hide endDate attributes Show endDate attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    • value string(date-time) | null
    • Additional properties are NOT allowed
  • storeId Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    Hide storeId attributes Show storeId attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    • value string | null
    • Additional properties are NOT allowed
  • active Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    Hide active attributes Show active attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Nullable`1[object]]
    • value boolean | null
    • Additional properties are NOT allowed
  • rule Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    Hide rule attributes Show rule attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[object]
    • value object
      Hide value attributes Show value 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
    • Additional properties are NOT allowed
  • products Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Collections.Generic.List`1[object]]
    Hide products attributes Show products attributes Fygi.Domain.Utils.Optionals.cs.Optional`1[System.Collections.Generic.List`1[object]]
    • value array[object] | null
      Hide value attributes Show value attributes object
      • id string Required

        Minimum length is 1.

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

Responses

  • 200

    Success

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