# Add special price promotion

Use the **AddSpecialPricePromotion** method to create a promotion with a special price.

## Request parameters

<table><thead><tr><th width="130.800048828125">Parameters</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>Promotion</code></td><td><p><strong>Required (object)</strong></p><p>Contains details of the promotion.</p></td></tr><tr><td><code>PriceMatrix</code></td><td><p><strong>Required (array of objects)</strong></p><p>Only for this type of promotion. It is generated by getPriceMatrix and used to set promotion special prices.</p></td></tr><tr><td><code>Coupon</code></td><td><p><strong>Required (object)</strong></p><p>Type of coupon applied to the promotion.</p></td></tr></tbody></table>

### Request sample

```php
<?php

require('PATH_TO_AUTH');

$promotionObject = new stdClass;
$promotionObject->Name = 'YOUR_PROMOTION_TITLE';
$promotionObject->Description = 'YOUR_PROMOTION_DESCRIPTION';
$promotionObject->DefaultCurrency = "EUR";
$promotionObject->StartDate = date('Y-m-d', strtotime('1 month ago'));
$promotionObject->EndDate = date('Y-m-d', strtotime('+1 month'));
$promotionObject->Type = 'SPECIAL_PRICE';
$promotionObject->Enabled = 1;
$promotionObject->MaximumOrdersNumber = 0;
$promotionObject->MaximumQuantity = 0;
$promotionObject->InstantDiscount = false;
$promotionObject->ApplyRecurring = 'NONE';
$promotionObject->RecurringChargesNumber = 3;
$promotionObject->InstantDiscount = 0;

$couponObject = new stdClass;
$couponObject->Type = 'SINGLE';
$couponObject->Code = 'single_code';
$promotionObject->Coupon = $couponObject;

$productsObj1 = new stdClass;
$productsObj1->Code = 'test';
$promotionObject->Products = [$productsObj1];

$priceMatrixDefinition1 = new stdClass;
$priceMatrixDefinition1->ProductCode = "test";
$priceMatrixDefinition1->PricingConfigurationCode = "738C6A2049";
$priceMatrixDefinition1->OptionHash = "708e43960c4edc42f14cf388bcb24bde";

$option1 = new stdClass;
$option1->GroupName = "Units";
$option1->OptionText = "1 - maximum";

$price1 = new stdClass;
$price1->Value = 10;
$price1->Currency = "USD";
$price2 = new stdClass;
$price2->Value = 15;
$price2->Currency = "EUR";

$priceMatrixDefinition1->Options = [$option1];
$priceMatrixDefinition1->Prices = [$price1, $price2];

$promotionObject->PriceMatrix = [$priceMatrixDefinition1];

$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'addPromotion',
'params' => array($sessionID, $promotionObject),
);

$result = callRPC((object)$jsonRpcRequest, $host);
var_dump($result);
```

## Response

```json
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "Code": "M99QQ7Q97A",
    "Name": "Promo percentage REST",
    "Description": "Promo description1",
    "StartDate": "2019-11-30",
    "EndDate": "2100-12-31",
    "MaximumOrdersNumber": -1,
    "MaximumQuantity": "1",
    "InstantDiscount": false,
    "Coupon": {
      "Type": "MULTIPLE",
      "Codes": [
        "code1",
        "code2"
      ]
    },
    "Enabled": true,
    "Type": "SPECIAL_PRICE",
    "Products": [
      {
        "Code": "test",
        "PricingOptionCodes": null,
        "PricingConfigurationCode": null
      }
    ],
    "Translations": [
      {
        "Name": "Promo percentage REST",
        "Language": "EN"
      }
    ],
    "Sources": [],
    "ApplyRecurring": "NONE",
    "RecurringChargesNumber": "0",
    "DefaultCurrency": "EUR",
    "PriceMatrix": [
      {
        "ProductCode": "test",
        "PricingConfigurationCode": "738C6A2049",
        "OptionHash": "708e43960c4edc42f14cf388bcb24bde",
        "Options": [
          {
            "GroupName": "Units",
            "OptionText": "1 - maximum"
          }
        ],
        "Prices": [
          {
            "Value": 31.15600000000014,
            "Currency": "CAD"
          },
          {
            "Value": 20,
            "Currency": "EUR"
          },
          {
            "Value": 40,
            "Currency": "USD"
          },
          {
            "Value": 1587.5251590697817,
            "Currency": "ARS"
          },
          {
            "Value": 18541.128586270122,
            "Currency": "CLP"
          },
          {
            "Value": 18.132399999999887,
            "Currency": "GBP"
          },
          {
            "Value": 2447.1999999999794,
            "Currency": "JPY"
          },
          {
            "Value": 499.51800000000384,
            "Currency": "MXN"
          },
          {
            "Value": 97.536,
            "Currency": "RON"
          },
          {
            "Value": 1846.0500000000052,
            "Currency": "RUB"
          },
          {
            "Value": 601.8285443739301,
            "Currency": "UAH"
          },
          {
            "Value": 384.3740000000019,
            "Currency": "ZAR"
          }
        ]
      }
    ]
  }
}
```


---

# 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/promotions/add-special-price-promotion.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.
