> 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.

# Compare settings between a source tenant and a target tenant

POST https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare
Content-Type: multipart/form-data

To Compare the configurations from the template downloaded and used in deployment manager for migration which is available in source and target tenant.


Reference: https://zuora.ferndocs.com/developers/api-reference/zuora-api/deployment-manager/configuration-templates/post-compare-template

## 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

### Query parameters

- `tenant` (string, required) — Customers need to specify tenant ID.

### Headers

- `Idempotency-Key` (string, optional) — Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident.
- `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-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-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 (`'`).

### Body (multipart/form-data)

This endpoint expects a multipart form containing an optional file.

- `template` (file, optional) — Template contains the config metadata and target tenant information.

## Response

### 200

OK

- `customFields` (list of CompareSchemaKeyValue, optional)
- `customObjects` (list of CompareSchemaKeyValue, optional)
- `dataAccessControl` (list of CompareSchemaKeyValue, optional)
- `metaData` (JsonNode, optional) — Json node object contains metadata.
- `notifications` (list of CompareSchemaKeyValue, optional)
- `productCatalog` (list of CompareSchemaKeyValue, optional)
- `settings` (list of CompareSchemaKeyValue, optional)
- `workflows` (list of CompareSchemaKeyValue, optional)

### 201

created. The request has been fulfilled and resulted in a new resource being created. The newly created resource can be referenced by the URL(s) returned in the entity of the response, with the most specific URL for the resource given by a Location header field.

## Errors

### 401 Unauthorized Error

Unauthorized

- `reasons` (list of ConfigTemplateErrorResponseReasonsItems, optional)

### 403 Forbidden Error

Forbidden

- `reasons` (list of ConfigTemplateErrorResponseReasonsItems, optional)

### 404 Not Found Error

Not Found

- `reasons` (list of ConfigTemplateErrorResponseReasonsItems, optional)

## Types

### CompareSchemaKeyValue

When a comparison is made between a source and target tenant, it sends a response to the user interface.

- `difference` (map from string to list of string, optional) — Returns the different components list.
- `response` (list of MigrationComponentContent, optional) — Provides the total reponse of the components.
- `segregationKeys` (list of string, optional) — Provides separation of components.

### JsonNode

Json node object contains metadata.

### ConfigTemplateErrorResponseReasonsItems

- `code` (string, optional) — The error code of response.
- `message` (string, optional) — A detailed description of the error response.

### MigrationComponentContent

When a comparison is made between a source and target tenant, it sends a response to the user interface.

- `attribute` (string, optional)
- `componentType` (string, optional) — Type of selected components to be migrated.
- `currentTargetResponse` (JsonNode, optional) — Json node object contains metadata.
- `description` (string, optional)
- `disabled` (string, optional)
- `errorMessage` (string, optional) — Error information.
- `httpMethods` (string, optional)
- `id` (string, optional)
- `key` (string, optional)
- `migratedOn` (datetime, optional) — It is the time when migration is triggered.
- `migrationId` (string, optional) — Migration ID. It is generated at the time of triggering deployment.
- `pathPattern` (string, optional) — PathPattern of component.
- `previousTargetResponse` (JsonNode, optional) — Json node object contains metadata.
- `result` (string, optional) — Returns the result details of Components.
- `segregationKey` (string, optional) — Displays the differences between components.
- `sourceResponse` (JsonNode, optional) — Json node object contains metadata.
- `status` (string, optional) — Returns the status of each component.
- `updateStatus` (string, optional) — Updated Status.

## Examples

### response

**Request**

```json
{
  "template": "<file: <file1>>"
}
```

**Response**

```json
{
  "customFields": [
    {
      "response": [
        {
          "componentType": "CustomFields",
          "id": "a8a0ff9f-3297-45a5-a523-4f5d5f4f393a",
          "key": "idx_date_1",
          "result": "DONE",
          "segregationKey": "Account",
          "error": "-",
          "method": "GET",
          "payload": {
            "API_name": "idx_date_1__c",
            "UIReadOnly": true,
            "description": "test",
            "format": "date",
            "indexed": true,
            "label": "idx_date_1"
          },
          "templateId": null,
          "url": "-"
        }
      ],
      "segregationKeys": [
        "Account",
        "Invoice",
        "InvoiceItem",
        "AccountingCode",
        "ProductRatePlanCharge",
        "ProductFeature",
        "Product",
        "JournalEntry",
        "RatePlan",
        "Amendment",
        "DebitTaxationItem",
        "Subscription",
        "Order",
        "Usage",
        "ProductRatePlan",
        "AccountingPeriod",
        "CreditMemoItem",
        "RevenueSchedule",
        "RatePlanCharge",
        "Contact",
        "OrderAction",
        "Payment",
        "CreditBalanceAdjustment",
        "Refund",
        "DebitMemo"
      ],
      "errors": [],
      "originalPayload": {
        "count": 2,
        "definitions": {
          "Account": {
            "schema": {
              "additionalProperties": false,
              "indexed": [
                "Last_Token_Transaction_Date__c",
                "idx_date_1__c"
              ],
              "properties": {
                "CollectionsAgent__c": {
                  "createdDate": "2022-08-22T18:16:38.000Z",
                  "default": "abc",
                  "description": "",
                  "label": "Collections Agent",
                  "maxLength": 255,
                  "type": "string",
                  "updatedDate": "2022-08-22T18:16:38.000Z"
                },
                "InCollections__c": {
                  "createdDate": "2022-08-18T12:38:04.000Z",
                  "description": "",
                  "label": "<details/open/ontoggle=confirm(cookie)>",
                  "maxLength": 25,
                  "type": "string",
                  "updatedDate": "2022-08-18T12:38:04.000Z"
                },
                "Last_Token_Transaction_Date__c": {
                  "createdDate": "2022-08-22T19:30:10.000Z",
                  "description": "",
                  "label": "Last_Token_Transaction_Date",
                  "maxLength": 255,
                  "type": "string",
                  "updatedDate": "2022-08-22T19:30:10.000Z"
                },
                "idx_date_1__c": {
                  "createdDate": "2022-08-18T12:38:13.000Z",
                  "description": "test",
                  "format": "date",
                  "label": "idx_date_1",
                  "type": "string",
                  "updatedDate": "2022-08-18T12:38:13.000Z"
                },
                "non_idx_text_1__c": {
                  "createdDate": "2022-08-18T12:38:14.000Z",
                  "default": "non_idx_text_1",
                  "description": "non_idx_text_1",
                  "label": "non_idx_text_1",
                  "maxLength": 50,
                  "type": "string",
                  "updatedDate": "2022-08-18T12:38:14.000Z"
                }
              },
              "readOnlyOnUI": [
                "idx_date_1__c",
                "non_idx_text_1__c"
              ],
              "type": "object"
            },
            "type": "Account"
          },
          "AccountingCode": {
            "schema": {
              "additionalProperties": false,
              "properties": {
                "AccountingCodeCustomDate__c": {
                  "createdDate": "2022-02-08T07:20:15.000Z",
                  "format": "date",
                  "label": "AccountingCodeCustomDate",
                  "type": "string",
                  "updatedDate": "2022-02-08T07:20:15.000Z"
                },
                "AccountingCodeCustomPickList__c": {
                  "createdDate": "2022-02-08T07:20:18.000Z",
                  "default": "Alpha",
                  "enum": [
                    "Alpha",
                    "Beta",
                    "Omega"
                  ],
                  "label": "AccountingCodeCustomPickList",
                  "type": "string",
                  "updatedDate": "2022-02-08T07:20:18.000Z"
                },
                "AccountingCodeCustomText__c": {
                  "createdDate": "2022-02-01T08:41:03.000Z",
                  "default": "custom text",
                  "label": "AccountingCodeCustomText",
                  "maxLength": 64,
                  "type": "string",
                  "updatedDate": "2022-02-01T08:41:03.000Z"
                }
              },
              "type": "object"
            },
            "type": "AccountingCode"
          }
        }
      }
    }
  ],
  "customObjects": [
    {
      "response": [
        {
          "componentType": "CustomObjects",
          "id": "456335f2-711d-4e73-b8ec-3309e78b403a",
          "key": "zzzzzzzzzz",
          "result": "DONE",
          "segregationKey": "Available Custom Objects",
          "error": "-",
          "method": "GET",
          "payload": {
            "api_name": "zzzzzzzzzz",
            "customFields": [
              {
                "api_name": "isFilterable__c",
                "description": " ",
                "field_name": "isFilterable",
                "filterable": "true",
                "required": "false",
                "type": "boolean"
              },
              {
                "api_name": "picklist__c",
                "description": " ",
                "field_name": "picklist",
                "filterable": "false",
                "required": "false",
                "type": "string"
              },
              {
                "api_name": "zzz__c",
                "description": " ",
                "field_name": "zzz",
                "filterable": "false",
                "required": "false",
                "type": "string"
              }
            ],
            "description": " ",
            "enableRecordMigration": "false",
            "label": "zzzzzzzzzz"
          },
          "templateId": null,
          "url": "/zzzzzzzzzz"
        }
      ],
      "segregationKeys": [
        "Available Custom Objects"
      ],
      "errors": [],
      "originalPayload": {}
    }
  ],
  "dataAccessControl": [
    {
      "response": [
        {
          "componentType": "dataAccessControl",
          "id": "456335f2-711d-4e73-b8ec-3309e78b403a",
          "key": "zzzzzzzzzz",
          "result": "DONE",
          "segregationKey": "Available dataAccessControl",
          "error": "-",
          "method": "GET",
          "payload": {},
          "templateId": null,
          "url": "/zzzzzzzzzz"
        }
      ],
      "segregationKeys": [
        "Available dataAccessControl"
      ],
      "errors": [],
      "originalPayload": {}
    }
  ],
  "notifications": [
    {
      "response": [
        {
          "componentType": "Notifications",
          "id": "f5ee9c26-8420-4f92-9463-1983d1268281",
          "key": "B2C Customers",
          "result": "DONE",
          "segregationKey": "Communication profile",
          "error": "-",
          "method": "GET",
          "payload": {
            "description": "",
            "id": "2c92c8fb7ddc795b017dde4350c949a0",
            "isDefault": false,
            "locale": "default",
            "name": "B2C Customers"
          },
          "templateId": null,
          "url": "settings/communication-profiles/2c92c8fb7ddc795b017dde4350c949a0"
        }
      ],
      "segregationKeys": [
        "Communication profile",
        "Email Templates"
      ],
      "errors": [],
      "originalPayload": {
        "2c92c8fb7ddc795b017dde4350c949a0": [
          {
            "active": false,
            "calloutAuth": false,
            "calloutOauth2": false,
            "calloutOption": false,
            "calloutPreemptiveAuth": false,
            "calloutRetriable": false,
            "contentType": "APPLICATION_JSON",
            "description": "Trigger the notification when invoices are posted within a bill run and the bill run has auto-post. This is to support existing email notification behavior from within a bill run.",
            "emailOption": true,
            "emailTemplate": "2c92c8f9631ea3850163271f80152de2",
            "emailTemplateName": "Invoice Posted Default Email Template",
            "eventId": "2c92c8f9631ea3850163271f7fa02da0",
            "eventName": "New Invoice Posted",
            "hidden": false,
            "id": "2c92c8fb7ddc795b017dde437a0949a6",
            "name": "Invoice Posted within a Bill Run of Auto-Post",
            "param1": "BILLRUN",
            "param4": "Not include invoice PDF",
            "profileId": "2c92c8fb7ddc795b017dde4350c949a0",
            "useCustomRequestBody": false
          }
        ]
      }
    }
  ],
  "productCatalog": [
    {
      "response": [
        {
          "componentType": "productCatalog",
          "id": "456335f2-711d-4e73-b8ec-3309e78b403a",
          "key": "zzzzzzzzzz",
          "result": "DONE",
          "segregationKey": "Available productCatalog",
          "error": "-",
          "method": "GET",
          "payload": {},
          "templateId": null,
          "url": "/zzzzzzzzzz"
        }
      ],
      "segregationKeys": [
        "Available productCatalog"
      ],
      "errors": [],
      "originalPayload": {}
    }
  ],
  "settings": [
    {
      "response": [
        {
          "componentType": "Settings",
          "id": "bfcb76d9-3fb8-4a15-8d13-fe0b805b5ee6",
          "key": "AccountingPeriods",
          "result": "FAILED",
          "segregationKey": "Finance",
          "error": "{\"success\":false,\"reasons\":[{\"message\":\"Failed to get user info\",\"code\":\"90000011\"}]}\n",
          "method": "GET",
          "payload": {},
          "templateId": null,
          "url": "v1/accounting-periods"
        },
        {
          "componentType": "Settings",
          "id": "6a27d0d3-3c4c-408f-b160-04510014ebf1",
          "key": "AccountingRules",
          "result": "DONE",
          "segregationKey": "Finance",
          "error": null,
          "method": "GET",
          "payload": {
            "allowBlankAccountingCodes": true,
            "allowCreationInClosedPeriod": true,
            "allowRevenueScheduleNegativeAmounts": false,
            "allowUsageInClosedPeriod": false
          },
          "templateId": null,
          "url": "/accounting-rules"
        }
      ],
      "segregationKeys": [
        "Finance",
        "Billing",
        "Administration",
        "ManageMultiEntity",
        "Payments",
        "Taxation",
        "BillingDocumentConfiguration",
        "ManageDataAccessControl"
      ],
      "errors": [],
      "originalPayload": {}
    }
  ],
  "workflows": [
    {
      "response": [
        {
          "componentType": "WorkFlows",
          "id": "df74980b-ff25-4684-a950-7e0c25810a72",
          "key": "Resume Subscriptions for Accounts with Zero Balance Limit 1_0.0.13",
          "result": "DONE",
          "segregationKey": "Resume Subscriptions for Accounts with Zero Balance Limit 1",
          "error": "-",
          "method": "GET",
          "payload": {
            "active_version": {
              "calloutTrigger": true,
              "createdAt": "2022-08-21T10:51:22.613-07:00",
              "created_by": {
                "created_at": "2021-11-22T19:06:54.279-08:00",
                "updated_at": "2022-09-06T05:16:20.455-07:00",
                "work_email": "rkumar@zuora.com"
              },
              "definitionId": 1,
              "description": "",
              "id": 2483,
              "interval": null,
              "name": "Resume Subscriptions for Accounts with Zero Balance Limit 1",
              "ondemandTrigger": true,
              "priority": "Medium",
              "scheduledTrigger": false,
              "status": "Active",
              "timezone": null,
              "type": "Workflow::Setup",
              "updatedAt": "2022-08-21T10:51:22.613-07:00",
              "updated_by": {
                "created_at": "N/A",
                "updated_at": "N/A",
                "work_email": "N/A"
              },
              "version": "0.0.13"
            },
            "calloutTrigger": true,
            "createdAt": "2022-08-21T10:51:22.613-07:00",
            "description": "",
            "id": 1,
            "interval": null,
            "latest_inactive_versions": [
              {
                "calloutTrigger": true,
                "createdAt": "2022-05-10T05:21:37.192-07:00",
                "created_by": {
                  "created_at": "2021-11-22T19:06:54.279-08:00",
                  "updated_at": "2022-09-06T05:16:20.455-07:00",
                  "work_email": "rkumar@zuora.com"
                },
                "definitionId": 1,
                "description": "",
                "id": 689,
                "interval": null,
                "name": "Resume Subscriptions for Accounts with Zero Balance Limit 1",
                "ondemandTrigger": true,
                "priority": "Medium",
                "scheduledTrigger": false,
                "status": "Inactive",
                "timezone": null,
                "type": "Workflow::Setup",
                "updatedAt": "2022-05-10T05:21:37.192-07:00",
                "updated_by": {
                  "created_at": "N/A",
                  "updated_at": "N/A",
                  "work_email": "N/A"
                },
                "version": "0.0.10"
              }
            ],
            "name": "Resume Subscriptions for Accounts with Zero Balance Limit 1",
            "ondemandTrigger": true,
            "priority": "Medium",
            "scheduledTrigger": false,
            "status": "Active",
            "timezone": null,
            "updatedAt": "2022-08-21T10:51:22.613-07:00"
          },
          "templateId": null,
          "url": "1"
        }
      ],
      "segregationKeys": [
        "Payment to Provision",
        "Negative Invoices to Positive Account Credit Balance Limit 1",
        "Automated Dunning | 2nd Attempt Failed",
        "Subscription Price Uplift -- JSON Transform"
      ],
      "errors": [],
      "originalPayload": {}
    }
  ]
}
```

**SDK Code**

```python response
import requests

url = "https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare"

querystring = {"tenant":"tenant"}

files = { "template": "open('<file1>', 'rb')" }
headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, files=files, headers=headers, params=querystring)

print(response.json())
```

```javascript response
const url = 'https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant';
const form = new FormData();
form.append('template', '<file1>');

const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

options.body = form;

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"template\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	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/deployment-manager/deployment_artifacts/compare?tenant=tenant")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"template\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n"

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.post("https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant")
  .header("Authorization", "Bearer <token>")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"template\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant', [
  'multipart' => [
    [
        'name' => 'template',
        'filename' => '<file1>',
        'contents' => null
    ]
  ]
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp response
using RestSharp;

var client = new RestClient("https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"template\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift response
import Foundation

let headers = ["Authorization": "Bearer <token>"]
let parameters = [
  [
    "name": "template",
    "fileName": "<file1>"
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### Example 2

**Request**

```json
{
  "template": "<file: <file1>>"
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare"

querystring = {"tenant":"tenant"}

files = { "template": "open('<file1>', 'rb')" }
headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, files=files, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant';
const form = new FormData();
form.append('template', '<file1>');

const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

options.body = form;

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

```go
package main

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

func main() {

	url := "https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"template\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	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
require 'uri'
require 'net/http'

url = URI("https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"template\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n"

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

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

HttpResponse<String> response = Unirest.post("https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant")
  .header("Authorization", "Bearer <token>")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"template\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant', [
  'multipart' => [
    [
        'name' => 'template',
        'filename' => '<file1>',
        'contents' => null
    ]
  ]
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"template\"; filename=\"<file1>\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]
let parameters = [
  [
    "name": "template",
    "fileName": "<file1>"
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://rest.test.zuora.com/deployment-manager/deployment_artifacts/compare?tenant=tenant")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```