Welcome to Zuora Product Documentation

Explore our rich library of product information

Change terms and conditions using the REST API

Learn how to change the terms and conditions of a subscription using the REST API by creating an order.

You can use the Create an order operation to change the terms and conditions of a subscription. Before the Orders feature is enabled, you have to use the Update a subscription, Amend, or "CRUD: Create amendment" operation.

  1. Determine the values of the following variables:

    Variable

    Description

    $SubscriptionNum

    The number of the subscription to update. For example, A-S00000001.

    $AccountNum

    The number of the account that will own the order. For example, A00000001 .

    $Today

    Today's date. For example, 2017-09-30.

    $TermStartDate

    The new start date of the current term. For example, 2017-11-01.

  2. Use the Create an order operation
    1. To create an order under an existing account without creating any contact information: To create the order under a new account instead of an existing account, specify the newAccount field instead of the existingAccountNumberfield:

      Request

      POST /v1/orders/

      Request Body

      {
        "orderDate": "$Today",
        "existingAccountNumber": "$AccountNum",
        "subscriptions": [
          {
            "subscriptionNumber": "$SubscriptionNum",
            "orderActions": [
              {
                "type": "TermsAndConditions",
                "triggerDates": [
                  {
                    "name": "ContractEffective",
                    "triggerDate": "$Today"
                  },
                  {
                    "name": "ServiceActivation",
                    "triggerDate": "$Today"
                  },
                  {
                    "name": "CustomerAcceptance",
                    "triggerDate": "$Today"
                  }
                ],
                "termsAndConditions": {
                  "lastTerm": {
                    "startDate": "$TermStartDate",
                    "period": 20,
                    "periodType": "Month",
                    "termType": "TERMED"
                  },
                  "renewalTerms": [
                    {
                      "period": 6,
                      "periodType": "Month"
                    }
                  ],
                  "renewalSetting": "RENEW_WITH_SPECIFIC_TERM",
                  "autoRenew": true
                }
              }
            ]
          }
        ],
        "processingOptions": {
          "runBilling": false,
          "collectPayment": false
        }
      }
    2. To create an order under an existing account by creating the new contact information for this subscription:

      Request

      POST /v1/orders/

      Request Body

      {
          "orderNumber": "O-tc-001",
          "orderDate": "2025-02-01",
          "existingAccountNumber": "A00000001",
          "subscriptions": [
            {
              "subscriptionNumber": "S-existing-001",
              "orderActions": [
                {
                  "type": "TermsAndConditions",
                  "triggerDates": [
                    {
                      "name": "ContractEffective",
                      "triggerDate": "2025-02-01"
                    }
                  ],
                  "termsAndConditions": {
                    "initialTerm": {
                      "termType": "TERMED",
                      "startDate": "2025-02-01",
                      "period": 12,
                      "periodType": "Month"
                    },
                    "renewalTerms": [
                      {
                        "period": 12,
                        "periodType": "Month"
                      }
                    ],
                    "renewalSetting": "RENEW_WITH_SPECIFIC_TERM",
                    "autoRenew": false,
                    "billToContact": {
                      "firstName": "TC",
                      "lastName": "BillTo",
                      "workEmail": "tc.billto@test.com",
                      "address1": "100 First St",
                      "city": "Los Angeles",
                      "state": "CA",
                      "country": "United States",
                      "postalCode": "90001"
                    },
                    "soldToContact": {
                      "firstName": "TC",
                      "lastName": "SoldTo",
                      "workEmail": "tc.soldto@test.com",
                      "address1": "200 Second St",
                      "city": "Chicago",
                      "state": "IL",
                      "country": "United States",
                      "postalCode": "60601"
                    },
                    "shipToContact": {
                      "firstName": "TC",
                      "lastName": "ShipTo",
                      "workEmail": "tc.shipto@test.com",
                      "address1": "300 Third St",
                      "city": "Portland",
                      "state": "OR",
                      "country": "United States",
                      "postalCode": "97201"
                    }
                  }
                }
              ]
            }
          ]
        }

To preview invoices for the updated subscription, use the Preview an order operation.