> For the complete documentation index, see [llms.txt](https://docs.driffle.com/driffle-seller-api-legacy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.driffle.com/driffle-seller-api-legacy/reference/api-reference/offers-auction/update-offer.md).

# Update Offer

The following API allow you to update an offer/auction on Driffle.&#x20;

{% hint style="warning" %}
Rate Limiting applies to this API endpoint and is set to 1 request per 3 seconds.
{% endhint %}

<mark style="color:green;">`PATCH`</mark> `/offer/update`

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

<pre class="language-json"><code class="lang-json">  {
    "offerId": 0,
    "yourPrice": 0,
    "retailPrice": 0,
    "toggleOffer": "disable",
    "declaredStock": 100000,
<strong>    "auctionedKeys": 100,
</strong><strong>    "wholesale":{
</strong>        "enabled": true,
        "tiers": [
            {
                "level": 1,
                "discount": 10
            },
            {
                "level": 2,
                "discount": 15
            }
          ]
     },
     "automatePriceOptions": {
        "lowerPriceLimit": 8.99,
        "upperPriceLimit": 12.99,
        "priceChangeFactor": 0.05,
        "priceChangeInterval": 3600,
        "automatePriceStatus": "enable"
    }
  }
</code></pre>

<table data-full-width="false"><thead><tr><th>Param</th><th>Description</th><th>Param Type</th><th>Type</th><th>Required</th></tr></thead><tbody><tr><td>offerId</td><td>ID of the Offer</td><td>body</td><td>number</td><td>Yes</td></tr><tr><td>yourPrice</td><td>"You get" price. commission will be applied to this price.</td><td>body</td><td>number</td><td>No</td></tr><tr><td>retailPrice</td><td>"Retail Price" is the price after commission. Buyers will see this price</td><td>body</td><td>number</td><td>No</td></tr><tr><td>toggleOffer</td><td>"enable" or "disable" offer</td><td>body</td><td>string</td><td>No</td></tr><tr><td>declaredStock</td><td>Number of keys to sell through declared stock feature -  optional </td><td>body</td><td>string</td><td>No</td></tr><tr><td>auctionedKeys</td><td>Maximum number of orders you can accept for a product - optional (Only in preReleased products)</td><td>body</td><td>number</td><td>No</td></tr><tr><td>wholesale</td><td>Specifies wholesale enable status and tier-based discounts by purchase quantity. <br><a data-mention href="/pages/CHpnEoAKrUwG83s8QSGk">/pages/CHpnEoAKrUwG83s8QSGk</a></td><td>body</td><td>{"enabled":true,"tiers":[{"level":1,"discount":10},{"level":2,"discount":15}]}<br></td><td>No</td></tr><tr><td>automatePriceOptions</td><td>configures automated price adjustments for an offer <a data-mention href="/pages/HCF5erEkWhs7Z00YlVx1">/pages/HCF5erEkWhs7Z00YlVx1</a></td><td>body</td><td><code>{"lowerPriceLimit":8.99,"upperPriceLimit":12.99,"priceChangeFactor":0.05,"priceChangeInterval":3600,"automatePriceStatus":"enable"}</code></td><td>No</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "message": "string",
  "statusCode": 200,
  "data": "string"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "message": "Bad Request. Wrong/Invalid params format.",
    "statusCode": 400 
}
```

{% endtab %}

{% tab title="401" %}

```
{
    "message": "UnAuthorized request. Invalid/Expired token",
    "statusCode": 401
}
```

{% endtab %}

{% tab title="403" %}

```
{
    "message": "Forbidden Request. Action not allowed or Rate Limit exhausted.", 
    "statusCode": 403
}
```

{% endtab %}

{% tab title="500" %}

```
{
    "message": "Internal Server Error",
    "statusCode": 500
}
```

{% endtab %}
{% endtabs %}

{% openapi src="/files/SeLAFLEnGdWtLEAgD7vn" path="/offer/update" method="patch" %}
[swagger-3.1.2.json](https://407468006-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfPzmNpsOZnU4ujov7zQD%2Fuploads%2FVNTDb4p5ZEcy7NxZDYLy%2Fswagger-3.1.2.json?alt=media\&token=e22d344b-832d-442e-84d6-81493d1ea455)
{% endopenapi %}
