PATCH /external/api/campaigns

PATCH /external/api/campaigns

Body

  • id string Required

    Minimum length is 1.

  • name object

    Additional properties are NOT allowed.

    Hide name attribute Show name attribute object
    • value string | null
  • image object

    Additional properties are NOT allowed.

    Hide image attribute Show image attribute object
    • value string(uuid) | null
  • startDate object

    Additional properties are NOT allowed.

    Hide startDate attribute Show startDate attribute object
    • value string(date-time) | null
  • endDate object

    Additional properties are NOT allowed.

    Hide endDate attribute Show endDate attribute object
    • value string(date-time) | null
  • storeId object

    Additional properties are NOT allowed.

    Hide storeId attribute Show storeId attribute object
    • value string | null
  • active object

    Additional properties are NOT allowed.

    Hide active attribute Show active attribute object
    • value boolean | null
  • rule object

    Additional properties are NOT allowed.

    Hide rule attribute Show rule attribute object
    • value object

      Additional properties are NOT allowed.

      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.

  • products object

    Additional properties are NOT allowed.

    Hide products attribute Show products attribute object
    • value array[object] | null
      Hide value attributes Show value attributes object
      • id string Required

        Minimum length is 1.

      • sortIndex integer(int32) | null
  • categories object

    Additional properties are NOT allowed.

    Hide categories attribute Show categories attribute object
    • value array[object] | null
      Hide value attribute Show value attribute object
      • id string Required

        Minimum length is 1.

Body

  • id string Required

    Minimum length is 1.

  • name object

    Additional properties are NOT allowed.

    Hide name attribute Show name attribute object
    • value string | null
  • image object

    Additional properties are NOT allowed.

    Hide image attribute Show image attribute object
    • value string(uuid) | null
  • startDate object

    Additional properties are NOT allowed.

    Hide startDate attribute Show startDate attribute object
    • value string(date-time) | null
  • endDate object

    Additional properties are NOT allowed.

    Hide endDate attribute Show endDate attribute object
    • value string(date-time) | null
  • storeId object

    Additional properties are NOT allowed.

    Hide storeId attribute Show storeId attribute object
    • value string | null
  • active object

    Additional properties are NOT allowed.

    Hide active attribute Show active attribute object
    • value boolean | null
  • rule object

    Additional properties are NOT allowed.

    Hide rule attribute Show rule attribute object
    • value object

      Additional properties are NOT allowed.

      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.

  • products object

    Additional properties are NOT allowed.

    Hide products attribute Show products attribute object
    • value array[object] | null
      Hide value attributes Show value attributes object
      • id string Required

        Minimum length is 1.

      • sortIndex integer(int32) | null
  • categories object

    Additional properties are NOT allowed.

    Hide categories attribute Show categories attribute object
    • value array[object] | null
      Hide value attribute Show value attribute object
      • id string Required

        Minimum length is 1.

Body

  • id string Required

    Minimum length is 1.

  • name object

    Additional properties are NOT allowed.

    Hide name attribute Show name attribute object
    • value string | null
  • image object

    Additional properties are NOT allowed.

    Hide image attribute Show image attribute object
    • value string(uuid) | null
  • startDate object

    Additional properties are NOT allowed.

    Hide startDate attribute Show startDate attribute object
    • value string(date-time) | null
  • endDate object

    Additional properties are NOT allowed.

    Hide endDate attribute Show endDate attribute object
    • value string(date-time) | null
  • storeId object

    Additional properties are NOT allowed.

    Hide storeId attribute Show storeId attribute object
    • value string | null
  • active object

    Additional properties are NOT allowed.

    Hide active attribute Show active attribute object
    • value boolean | null
  • rule object

    Additional properties are NOT allowed.

    Hide rule attribute Show rule attribute object
    • value object

      Additional properties are NOT allowed.

      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.

  • products object

    Additional properties are NOT allowed.

    Hide products attribute Show products attribute object
    • value array[object] | null
      Hide value attributes Show value attributes object
      • id string Required

        Minimum length is 1.

      • sortIndex integer(int32) | null
  • categories object

    Additional properties are NOT allowed.

    Hide categories attribute Show categories attribute object
    • value array[object] | null
      Hide value attribute Show value attribute object
      • id string Required

        Minimum length is 1.

Responses

  • 200

    Success

PATCH /external/api/campaigns
curl \
 --request PATCH 'https://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}]},"categories":{"value":[{"id":"string"}]}}]'
curl \
 --request PATCH 'https://api.fygi.store/external/api/campaigns' \
 --header "authorization: $API_KEY" \
 --header "Content-Type: text/json"
curl \
 --request PATCH 'https://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
        }
      ]
    },
    "categories": {
      "value": [
        {
          "id": "string"
        }
      ]
    }
  }
]
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
        }
      ]
    },
    "categories": {
      "value": [
        {
          "id": "string"
        }
      ]
    }
  }
]
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
        }
      ]
    },
    "categories": {
      "value": [
        {
          "id": "string"
        }
      ]
    }
  }
]