Update Subscription by groupId

Updates a Subscription by groupId.

If you need to update information within a given Subscription group, you don't need to insert the whole JSON body in your request. Just add an array of the parameter with the desired information you want to alter.

Example: if you want to change the quantity of an SKU within a subscription group, (adding, or removing items), just use the following body in your request.

curl --location --request PATCH 'http://api.vtexinternal.com/api/rns/subscriptions-group/734D48BE8D6350A2810A520B3AC6919B?an=recorrenciaqa' \
--header 'Content-Type: application/json' \
--header 'Content-Type: text/plain' \
--data-raw '{
    "item": [
        {
            "sku": {
                "id": "22"
            },
            "quantity": 2
        }
    ]
}'

Request body example

curl --location --request PATCH 'https://{{accountName}}.{{environment}}.com.br/api/rns/subscriptions-group/{{groupId}}' \
--header 'Content-Type: application/json' \
--header 'X-VTEX-API-AppToken: {{X-VTEX-API-AppToken}}' \
--header 'X-VTEX-API-AppKey: {{X-VTEX-API-AppKey}}' \
--data-raw '{
  "item": [
    {
      "sku": {
        "id": "string",
        "name": "string",
        "productName": "string",
        "imageUrl": "string",
        "detailUrl": "string",
        "nameComplete": "string"
      },
      "quantity": 0,
      "endpoint": "string",
      "priceAtSubscriptionDate": 0,
      "sellingPrice": 0,
      "SubscriptionId": "string",
      "cycleCount": 0,
      "status": "ACTIVE",
      "createdAt": "2019-06-20T18:27:41.230Z",
      "lastUpdate": "2019-06-20T18:27:41.230Z",
      "originalOrderId": "string",
      "originalItemIndex": 0,
      "metadata": [
        {
          "name": "string",
          "properties": {
            "additionalProp1": "string",
            "additionalProp2": "string",
            "additionalProp3": "string"
          }
        }
      ],
      "isSkipped": true
    }
  ],
  "plan": {
    "frequency": {
      "periodicity": "string",
      "interval": 0
    },
    "validity": {
      "begin": "2019-06-20T18:27:41.230Z",
      "end": "2019-06-20T18:27:41.230Z"
    },
    "type": "string"
  },
  "purchaseSettings": {
    "purchaseDay": "string",
    "paymentMethod": {
      "paymentSystem": "string",
      "paymentAccountId": "string"
    },
    "seller": "string",
    "salesChannel": "string",
    "selectedSla": "string",
    "currencyCode": "string"
  },
  "shippingAddress": {
    "addressId": "string",
    "street": "string",
    "number": "string",
    "complement": "string",
    "neighborhood": "string",
    "city": "string",
    "state": "string",
    "country": "string",
    "postalCode": "string",
    "reference": "string",
    "formattedAddress": "string",
    "additionalComponents": [
      {
        "longName": "string",
        "shortName": "string",
        "types": [
          "string"
        ]
      }
    ],
    "geoCoordinate": [
      0
    ],
    "receiverName": "string",
    "addressType": "string",
    "addressName": "string"
  },
  "status": "string",
  "isSkipped": true,
  "metadata": [
    {
      "name": "string",
      "properties": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      }
    }
  ]
}'
Language
Authentication
URL
Click Try It! to start a request and see the response here!