v1

latestOpenAPI 3.0.02026-07-14205154.3 KB
Subscriptions

Calculate the current prices for the provided subscription template

Simulates an order made by subscriptions on checkout and retrieves the current price for items and shipping.

post/api/rns/pub/subscriptions/simulate

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

catalogAttachmentstring nullable
customerEmailstring nullable required
nextPurchaseDatestring date-time nullable
statusstring nullable
titlestring nullable

Example request

{
  "items": [
    {
      "manualPrice": 40,
      "quantity": 5,
      "skuId": "12"
    }
  ],
  "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"
  }
}

Response

Simulation result

Example response

{
  "simulateResponse": {
    "items": [
      {
        "quantity": 5
      }
    ],
    "logisticsInfo": [
      {
        "quantity": 5
      }
    ],
    "selectableGiftsResponse": [
      {
        "availableGifts": [
          {
            "quantity": 5
          }
        ]
      }
    ],
    "simulationItems": [
      {
        "quantity": 5
      }
    ]
  },
  "simulationItems": [
    {
      "quantity": 5
    }
  ]
}