> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Activate an order

PUT https://rest.test.zuora.com/v1/orders/{orderNumber}/activate

**Note:** This operation is only available if you have the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature enabled. If you are an existing Zuora Subscribe and Amend customer, we recommend you enable Orders Harmonization to access the Orders feature. With Orders, you can access both existing functions for subscription and billing management and the new features on Zuora Billing.

Activate order is only available for draft orders.

Reference: https://zuora.ferndocs.com/developers/api-reference/zuora-api/orders-and-subscriptions/orders/put-order-activate

## Authentication

- `Authorization` header (bearer token, required) — Use `Bearer {{token}}` in the `Authorization` header for authentication.

## Servers

- `https://rest.test.zuora.com` (US Developer & Central Sandbox (incl. Test Drive), default)
- `https://rest.sandbox.na.zuora.com` (US API Sandbox Cloud 1)
- `https://rest.apisandbox.zuora.com` (US API Sandbox Cloud 2)
- `https://rest.na.zuora.com` (US Production Cloud 1)
- `https://rest.zuora.com` (US Production Cloud 2)
- `https://rest.test.eu.zuora.com` (EU Developer & Central Sandbox)
- `https://rest.sandbox.eu.zuora.com` (EU API Sandbox)
- `https://rest.eu.zuora.com` (EU Production)
- `https://rest.test.ap.zuora.com` (APAC Developer & Central Sandbox)
- `https://rest.ap.zuora.com` (APAC Production)

## Request

### Path parameters

- `orderNumber` (string, required) — Order number of a order in which you are to activate.

### Headers

- `Accept-Encoding` (string, optional) — Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it.
- `Content-Encoding` (string, optional) — Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.
- `Zuora-Track-Id` (string, optional) — A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`"`), and quote (`'`).
- `Zuora-Entity-Ids` (string, optional) — An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header.
- `Zuora-Org-Ids` (string, optional) — Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user's accessible orgs.
- `Zuora-Version` (string, optional) — The minor API version. For a list of available minor versions, see [API upgrades](https://developer.zuora.com/v1-api-reference/api-upgrades/).

## Response

### 200

OK

- `processId` (string, optional) — The ID of the process that handles the operation.
- `reasons` (list of PostOrderResponseTypeReasonsItems, optional) — The container of the error code and message. This field is available only if the `success` field is `false`.
- `requestId` (string, optional) — Unique identifier of the request.
- `success` (boolean, optional) — Indicates whether the call succeeded.
- `accountId` (string, optional) — The account ID for the order. This field is returned instead of the `accountNumber` field if the `returnIds` query parameter is set to `true`.
- `accountNumber` (string, optional) — The account number for the order.
- `commitments` (list of CommitmentOutput, optional) — The commitments created by this order request.
- `creditMemoIds` (list of string, optional) — An array of the credit memo IDs generated in this order request. The credit memo is only available if you have the Invoice Settlement feature enabled. This field is returned instead of the `creditMemoNumbers` field if the `returnIds` query parameter is set to `true`.
- `creditMemoNumbers` (list of string, optional) — An array of the credit memo numbers generated in this order request. The credit memo is only available if you have the Invoice Settlement feature enabled.
- `invoiceIds` (list of string, optional) — An array of the invoice IDs generated in this order request. Normally it includes one invoice ID only, but can include multiple items when a subscription was tagged as invoice separately. This field is returned instead of the `invoiceNumbers` field if the `returnIds` query parameter is set to `true`.
- `invoiceNumbers` (list of string, optional) — An array of the invoice numbers generated in this order request. Normally it includes one invoice number only, but can include multiple items when a subscription was tagged as invoice separately.
- `orderId` (string, optional) — The ID of the order created. This field is returned instead of the `orderNumber` field if the `returnIds` query parameter is set to `true`.
- `orderLineItems` (list of PostOrderResponseTypeOrderLineItemsItems, optional) — [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) are non subscription based items created by an Order, representing transactional charges such as one-time fees, physical goods, or professional service charges that are not sold as subscription services. With the Order Line Items feature enabled, you can now launch non-subscription and unified monetization business models in Zuora, in addition to subscription business models. **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is now generally available to all Zuora customers. You need to enable the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature to access the [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature. As of Zuora Billing Release 313 (November 2021), new customers who onboard on [Orders](https://docs.zuora.com/en/zuora-billing/manage-accounts-subscriptions-and-non-subscriptions/manage-subscription-transactions/orders/orders-introduction/overview-of-orders) will have the [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items) feature enabled by default.
- `orderNumber` (string, optional) — The order number of the order created.
- `paidAmount` (string, optional) — The total amount collected in this order request.
- `paymentId` (string, optional) — The payment Id that is collected in this order request. This field is returned instead of the `paymentNumber` field if the `returnIds` query parameter is set to `true`.
- `paymentNumber` (string, optional) — The payment number that is collected in this order request.
- `ramps` (list of PostOrderResponseTypeRampsItems, optional) — **Note**: This field is only available if you have the Ramps feature enabled. The [Orders](https://docs.zuora.com/en/zuora-billing/manage-accounts-subscriptions-and-non-subscriptions/manage-subscription-transactions/orders/orders-introduction/overview-of-orders) feature must be enabled before you can access the [Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/A_Overview_of_Ramps_and_Ramp_Metrics) feature. The Ramps feature is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://docs.zuora.com/en/entitlements/current-entitlements/zuora-editions) for pricing information coming October 2020. The ramp definitions created by this order request.
- `refunds` (list of PostOrderResponseTypeRefundsItems, optional) — Container for refunds.
- `status` (enum, optional) — Status of the order. `Pending` is only applicable for an order that contains a `CreateSubscription` order action.
  - Allowed values: `Draft`, `Pending`, `Completed`, `Scheduled`
- `subscriptionIds` (list of string, optional) — Container for the subscription IDs of the subscriptions in an order. This field is returned if the `returnIds` query parameter is set to `true`.
- `writeOff` (list of PostOrderResponseTypeWriteOffItems, optional) — Container for write-offs.

## Errors

### 500 Internal Server Error

Internal Server Error

- `reasons` (list of ErrorResponseReasonsItems, optional)

### 400 Client Request Error

Request Errors

- `processId` (string, optional) — The ID of the process that handles the operation.
- `reasons` (list of CommonResponseReasonsItems, optional) — The container of the error code and message. This field is available only if the `success` field is `false`.
- `requestId` (string, optional) — Unique identifier of the request.
- `success` (boolean, optional) — Indicates whether the call succeeded.

## Types

### PostOrderResponseTypeReasonsItems

- `code` (string, optional) — The error code of response.
- `message` (string, optional) — The detail information of the error response

### CommitmentOutput

The Commitment object in the "Create an order" or "Update an order" response.

- `id` (string, optional) — ID of the commitment
- `commitmentNumber` (string, optional) — Number of the commitment.
- `prepaymentType` (enum, optional) — The prepayment type of the commitment.
  - Allowed values: `NotPrepaid`, `FullyPrepaid`
- `type` (enum, optional) — The type of the commitment.
  - Allowed values: `MinCommitment`, `MaxCommitment`
- `startDate` (date, optional) — The start date of the commitment.
- `endDate` (date, optional) — The end date of the commitment.
- `status` (enum, optional) — The status of the commitment.
  - Allowed values: `Cancel1ed`, `Active`, `Evaluated`, `CancelledPendingEvaluation`
- `totalAmount` (double, optional) — The total amount of the commitment.
- `schedules` (list of CommitmentOutputSchedulesItems, optional) — A list of Commitment schedule objects.

### PostOrderResponseTypeOrderLineItemsItems

- `id` (string, optional) — The sytem generated Id for the Order Line Item.
- `itemNumber` (string, optional) — The number for the Order Line Item.

### PostOrderResponseTypeRampsItems

- `rampNumber` (string, optional) — The number of the ramp definition.
- `subscriptionNumber` (string, optional) — The number of the subscription that this ramp deal definition is applied to.

### PostOrderResponseTypeRefundsItems

- `number` (string, optional) — The refund number.
- `refundInvoiceNumbers` (list of string, optional) — An array of the refunded invoice numbers generated in this order request.
- `status` (enum, optional) — The status of the refund.
  - Allowed values: `Success`, `Error`

### PostOrderResponseTypeWriteOffItems

- `amount` (double, optional) — The amount written off from the invoice balance.
- `failedReason` (string, optional) — The reason of write-off failure.
- `invoiceNumber` (string, optional) — The number of the invoice that is written off.
- `status` (enum, optional) — The status of the write-off.
  - Allowed values: `Success`, `Failed`
- `writeOffCreditMemoNumber` (string, optional) — The number of the credit memo that is written off.

### ErrorResponseReasonsItems

- `code` (string, optional) — The error code of response.
- `message` (string, optional) — The detail information of the error response

### CommonResponseReasonsItems

- `code` (string, optional) — The error code of response.
- `message` (string, optional) — The detail information of the error response

### CommitmentOutputSchedulesItems

- `id` (string, optional) — The ID of the schedule.
- `startDate` (string, optional) — The start date of the schedule.
- `endDate` (string, optional) — The end date of the schedule.
- `prepaymentDefinition` (PrepaymentDefinition, optional) — The prepayment definition for the commitment schedule.
- `totalAmount` (double, optional) — The total amount of the schedule.
- `status` (enum, optional) — The status of the schedule.
  - Allowed values: `Active`, `Evaluated`, `Cancelled`, `CancelledPendingEvaluation`

### PrepaymentDefinition

The prepayment definition for the commitment schedule.

- `prepaymentFrequency` (enum, optional) — The prepayment frequency for the prepayment definition. If the value is `Specific_Months`, `Specific_Weeks`, or `Specific_Days`, use the `specificFrequency` field to specify the duration.
  - Allowed values: `Month`, `Quarter`, `Semi_Annual`, `Annual`, `Eighteen_Months`, `Two_Years`, `Three_Years`, `Five_Years`, `Specific_Months`, `Week`, `Specific_Weeks`, `Specific_Days`
- `specificFrequency` (integer, optional) — The specific frequency length. This field is required when `prepaymentFrequency` is `Specific_Months`, `Specific_Weeks`, or `Specific_Days`.
- `customFields` (map from string to any, optional) — Container for custom fields of a prepayment definition object.

## Examples

**Response**

```json
{
  "success": true,
  "accountNumber": "A00000001",
  "invoiceNumbers": [
    "INV00000001"
  ],
  "orderLineItems": [
    {
      "id": "bd78c0522adf42c2aa0fccacc997fa20",
      "itemNumber": "116"
    }
  ],
  "orderNumber": "OM-00002",
  "paidAmount": "300",
  "paymentNumber": "P-00000002",
  "status": "Pending",
  "subscriptions": [
    {
      "status": "Pending Activation",
      "subscriptionNumber": "SM-00001"
    },
    {
      "status": "Pending Acceptance",
      "subscriptionNumber": "SM-00002"
    },
    {
      "status": "Active",
      "subscriptionNumber": "SM-00003"
    },
    {
      "status": "Pending Acceptance",
      "subscriptionNumber": "SM-00004"
    },
    {
      "status": "Suspended",
      "subscriptionNumber": "SM-00005"
    },
    {
      "status": "Active",
      "subscriptionNumber": "SM-00006"
    }
  ]
}
```

**SDK Code**

```python response
import requests

url = "https://rest.test.zuora.com/v1/orders/orderNumber/activate"

headers = {"Authorization": "Bearer <token>"}

response = requests.put(url, headers=headers)

print(response.json())
```

```javascript response
const url = 'https://rest.test.zuora.com/v1/orders/orderNumber/activate';
const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://rest.test.zuora.com/v1/orders/orderNumber/activate"

	req, _ := http.NewRequest("PUT", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby response
require 'uri'
require 'net/http'

url = URI("https://rest.test.zuora.com/v1/orders/orderNumber/activate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://rest.test.zuora.com/v1/orders/orderNumber/activate")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://rest.test.zuora.com/v1/orders/orderNumber/activate', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp response
using RestSharp;

var client = new RestClient("https://rest.test.zuora.com/v1/orders/orderNumber/activate");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift response
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://rest.test.zuora.com/v1/orders/orderNumber/activate")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```