POST
/
v1
/
subscriptions
/
replace-items
curl --request POST \
  --url https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions/replace-items \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "item": {
    "sku": "MOBO-X570"
  },
  "replacementItem": {
    "customAttributes": {
      "storeId": "60cb07fc20387b000821c5c3",
      "associateId": 1,
      "trackingUrl": "609436d21baded0008945b05"
    },
    "item": {
      "id": 1000000006,
      "sku": "MOBO-X570",
      "quantity": 1,
      "weight": 10,
      "weightUnit": "lb",
      "title": "Vitamin",
      "description": "Vitamin C",
      "itemPrice": {
        "price": 100,
        "currencyCode": "USD"
      },
      "tax": {
        "taxCode": "FR020000",
        "taxAmount": 10,
        "currencyCode": "USD"
      }
    },
    "plan": {
      "id": "1001",
      "frequency": 30,
      "frequencyType": "Daily"
    },
    "offer": {
      "id": "SUB-E10717",
      "source": "PDP"
    },
    "shipping": {
      "shipmentCarrier": "USPS",
      "shipmentMethod": "Ground",
      "shipmentInstructions": "Please leave the package in the box",
      "taxCode": "SHP020000",
      "shippingAmount": 10,
      "taxAmount": 1,
      "currencyCode": "USD"
    },
    "expiry": {
      "expiryDate": "2022-07-18T09:16:11.437Z",
      "billingCycles": 2
    }
  }
}'
{
  "responseStatus": "OK",
  "message": "This request to replace items is currently being processed. Once done, we will update you via your webhooks (your webhooks need to be configured). Refer to our documentation on more information on webhooks."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Item to be replaced

Response

200
application/json

Request processed successfully

Replace item response