# Create proposal

Use the **createProposal** method via JSON-RPC API 6.0 to add/create a new quote.

## Request parameters

<table><thead><tr><th width="170.2667236328125">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><a href="/pages/zGoQB6vtnyNTNd3gM09q"><code>proposal</code></a></td><td><strong>Required (object)</strong></td></tr><tr><td><a href="/pages/zGoQB6vtnyNTNd3gM09q#proposalcontent-object"><code>proposalContent</code></a></td><td><strong>Required (object)</strong></td></tr><tr><td><a href="/pages/zGoQB6vtnyNTNd3gM09q#lineitem-object"><code>lineItems</code></a></td><td><strong>Required (object)</strong></td></tr><tr><td><code>sessionId</code></td><td><p><strong>Required (string)</strong></p><p>Unique 2Checkout session ID code.</p></td></tr></tbody></table>

### Request Sample

```php
<?php

require ('PATH_TO_AUTH');

$proposal = new stdClass();
$proposal->Type = "acquisition";
$proposal->BillTo = new stdClass();
$proposal->BillTo->Company = "Billing company";
$proposal->Content = new stdClass();
$proposal->Content->Language = "EN";
$proposal->Content->Currency = "USD";
$proposal->Content->LineItems =  array();
$lineItem = new stdClass();
$lineItem->ProductName = "My Product Name";
$lineItem->ProductCode = "5DCB30C6B0";
$lineItem->Quantity = 1;
$lineItem->Price = 54.2;
$lineItem->DiscountedPrice = 50;
$lineItem->PriceType = "net";
$lineItem->ContractPeriod = 0;
$proposal->Content->LineItems[0] = $lineItem;
$proposal->tac = new stdClass();
$proposal->tac->content = "Lorem ipsum.";
$proposal->SellTo = new stdClass();
$proposal->SellTo->Company = "End user company";

$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'createProposal';
$jsonRpcRequest->params = array($sessionID, $proposal);
$jsonRpcRequest->id = $i++;

try {
    $result = callRPC($jsonRpcRequest, $host);
    echo "Proposal: </br>",
    var_dump($result);
}
catch (SoapFault $e) {
    echo "Could not fetch proposal: " . $e->getMessage();
    exit;
}
```

### Request sample with prorationDate

```php
<?php

        require('PATH_TO_AUTH');

        $proposal = new stdClass();
        $proposal->Type = "amendment";
        $proposal->BillTo = new stdClass();
        $proposal->BillTo->Company = "Billing company";
        $proposal->Content = new stdClass();
        $proposal->Content->Language = "EN";
        $proposal->Content->Currency = "USD";
        $proposal->Content->Terms = 30;
        $proposal->Content->LineItems = array();
        $lineItem = new stdClass();
        $lineItem->ProductName = "My Product Name";
        $lineItem->ProductCode = "5DCB30C6B0";
        $lineItem->Quantity = 1;
        $lineItem->Price = 54.2;
        $lineItem->DiscountedPrice = 50;
        $lineItem->PriceType = "net";
        $lineItem->ContractPeriod = 0;
        $lineItem->ProrationDate = "2020-11-14T15:28:56+00:00";
        $lineItem->subscriptionReference ="1234567890";
        $proposal->Content->LineItems[0] = $lineItem;
        $proposal->tac = new stdClass();
        $proposal->tac->content = "Lorem ipsum.";
        $proposal->SellTo = new stdClass();
        $proposal->SellTo->Company = "End user company";

        $jsonRpcRequest = new stdClass();
        $jsonRpcRequest->jsonrpc = '2.0';
        $jsonRpcRequest->method = 'createProposal';
        $jsonRpcRequest->params = array($sessionID, $proposal);
        $jsonRpcRequest->id = $i++;

        try {
            $result = callRPC($jsonRpcRequest, $host);
            echo "Proposal: </br>",
            var_dump($result);
        } catch (SoapFault $e) {
            echo "Could not fetch proposal: " . $e->getMessage();
            exit;
        }
```

### Request sample with vatCode

```php
<?php

        require ('PATH_TO_AUTH');

        $proposal = new stdClass();
        $proposal->Type = "acquisition";
        $proposal->BillTo = new stdClass();
        $proposal->BillTo->Company = "Billing company";
        $proposal->Content = new stdClass();
        $proposal->Content->Language = "EN";
        $proposal->Content->Currency = "USD";
        $proposal->Content->LineItems =  array();
        $lineItem = new stdClass();
        $lineItem->ProductName = "My Product Name";
        $lineItem->ProductCode = "5DCB30C6B0";
        $lineItem->Quantity = 1;
        $lineItem->Price = 54.2;
        $lineItem->DiscountedPrice = 50;
        $lineItem->PriceType = "net";
        $lineItem->ContractPeriod = 0;
        $proposal->Content->LineItems[0] = $lineItem;
        $proposal->tac = new stdClass();
        $proposal->tac->content = "Lorem ipsum.";
        $proposal->SellTo = new stdClass();
        $proposal->SellTo->Company = "End user company";
        $proposal->SellTo->VatCode = "854234564";

        $jsonRpcRequest = new stdClass();
        $jsonRpcRequest->jsonrpc = '2.0';
        $jsonRpcRequest->method = 'createProposal';
        $jsonRpcRequest->params = array($sessionID, $proposal);
        $jsonRpcRequest->id = $i++;

        try {
            $result = callRPC($jsonRpcRequest, $host);
            echo "Proposal: </br>",
            var_dump($result);
        }
        catch (SoapFault $e) {
            echo "Could not fetch proposal: " . $e->getMessage();
            exit;
        }
```

### Request sample with TaxExemptionId

```php
<?php

        require ('PATH_TO_AUTH');

        $proposal = new stdClass();
        $proposal->Type = "acquisition";
        $proposal->BillTo = new stdClass();
        $proposal->BillTo->Company = "Billing company";
        $proposal->Content = new stdClass();
        $proposal->Content->Language = "EN";
        $proposal->Content->Currency = "USD";
        $proposal->Content->LineItems =  array();
        $lineItem = new stdClass();
        $lineItem->ProductName = "My Product Name";
        $lineItem->ProductCode = "5DCB30C6B0";
        $lineItem->Quantity = 1;
        $lineItem->Price = 54.2;
        $lineItem->DiscountedPrice = 50;
        $lineItem->PriceType = "net";
        $lineItem->ContractPeriod = 0;
        $proposal->Content->LineItems[0] = $lineItem;
        $proposal->tac = new stdClass();
        $proposal->tac->content = "Lorem ipsum.";
        $proposal->SellTo = new stdClass();
        $proposal->SellTo->Company = "End user company";
        $proposal->SellTo->TaxExemptionId = "854234564";

        $jsonRpcRequest = new stdClass();
        $jsonRpcRequest->jsonrpc = '2.0';
        $jsonRpcRequest->method = 'createProposal';
        $jsonRpcRequest->params = array($sessionID, $proposal);
        $jsonRpcRequest->id = $i++;

        try {
            $result = callRPC($jsonRpcRequest, $host);
            echo "Proposal: </br>",
            var_dump($result);
        }
        catch (SoapFault $e) {
            echo "Could not fetch proposal: " . $e->getMessage();
            exit;
        }
```

## Response

The **createProposal** API call returns a [Proposal](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/proposal-microservice.md) object.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/proposal-microservice/create-proposal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
