v1

latestOpenAPI 3.0.02026-07-14205154.3 KB
Subscriptions

Update subscription

Update a specific subscription.

patch/api/rns/pub/subscriptions/{id}

Path parameters

idstring required
Example:4002961

ID from the given subscription.

Headers

Content-Typestring required
Example:application/json

Type of the content being sent.

Acceptstring required
Example:application/json

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Request body

isSkippedboolean nullable

When set as true, it means the shopper asked to skip the next subscription order, and when set as false, no subscription order is going to be skipped.

statusstring nullable

Status to which you wish to update the subscription. The accepted values are:

  • ACTIVE
  • PAUSED
  • CANCELLED
  • EXPIRED
  • MISSING
titlestring nullable

Name of the subscription.

Example request

{
  "plan": {
    "frequency": {
      "interval": 3,
      "periodicity": "MONTHLY"
    },
    "id": "store.subscription",
    "purchaseDay": "15",
    "validity": {
      "begin": "2022-06-10T00:00:00",
      "end": "2023-06-10T00:00:00"
    }
  },
  "purchaseSettings": {
    "paymentMethod": {
      "installments": 3,
      "paymentAccountId": "340357032569595",
      "paymentSystem": "4"
    }
  },
  "shippingAddress": {
    "addressId": "8109266555005",
    "addressType": "residential"
  },
  "status": "ACTIVE",
  "title": "catFood"
}

Response

Subscription successfully updated

createdAtstring date-time required
customerEmailstring nullable required
customerIdstring nullable required
cycleCountinteger required
idstring nullable required
isSkippedboolean required
lastPurchaseDatestring date-time nullable
lastUpdatestring date-time required
nextPurchaseDatestring date-time required
statusstring nullable required
titlestring nullable

Example response

{
  "items": [
    {
      "manualPrice": 40,
      "quantity": 5,
      "skuId": "12"
    }
  ]
}