order_subscriptions

Update an order subscription

Changed on

Update an order subscription

patch/order_subscriptions/{orderSubscriptionId}

Request

  • Base URL
    https://{your_organization_slug}.commercelayer.io/api
  • URL
    https://{your_organization_slug}.commercelayer.io/api/order_subscriptions/{orderSubscriptionId}
  • Auth
    HTTP bearer

Path parameters

orderSubscriptionIdstring required

The resource's id

Request body

Example request

{
  "data": {
    "id": "XAyRWNUzyN",
    "attributes": {
      "frequency": "monthly",
      "activate_by_source_order": true,
      "place_target_order": true,
      "renewal_alert_period": 1,
      "expires_at": "2018-01-02T12:00:00.000Z",
      "next_run_at": "2018-01-01T12:00:00.000Z",
      "options": {
        "place_target_order": false
      },
      "_activate": true,
      "_deactivate": true,
      "_cancel": true,
      "_convert": true,
      "reference": "ANY-EXTERNAL-REFEFERNCE",
      "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
      "metadata": {
        "foo": "bar"
      }
    },
    "relationships": {
      "customer_payment_source": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "tags": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      }
    }
  }
}

Response

The updated order subscription object

Changes

    • info

      added the optional property // to the response with the status

    • warning

      added the new pending enum value to the // response property for the response status