# Orders API: "mixed usage of applied adjustments fields with deprecated adjustments fields is not supported"

**URL:** <https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663>\
**Category:** Questions\
**Tags:** orders-api\
**Created:** [January 22, 2021, 4:42pm UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663 "2021-01-22T16:42:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rei](https://avatars.discourse-cdn.com/v4/letter/r/ecd19e/32.png) [@rei](https://developer.squareup.com/forums/u/rei)\
**Post date:** [January 22, 2021, 4:42pm UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663/1 "2021-01-22T16:42:08Z")

</div>

I’m looking at the documentation for `POST /v2/orders` but there doesn’t seem to be a list of deprecated fields.

What could I be missing?

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [January 22, 2021, 4:47pm UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663/2 "2021-01-22T16:47:59Z")

</div>

Hi @rei welcome to the forums!

I’m actually not 100% sure of this myself. Could you share the `order_id` (if it was created)? If it wasn’t created, please share your Square application id and I’ll take a look in our logs to figure out what’s happening.

---

<div class="post-metadata">

**Author:** ![rei](https://avatars.discourse-cdn.com/v4/letter/r/ecd19e/32.png) [@rei](https://developer.squareup.com/forums/u/rei)\
**Post date:** [January 22, 2021, 5:13pm UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663/3 "2021-01-22T17:13:35Z")

</div>

Hey,

Thanks for the reply.

It isn’t generating any Orders, so here’s the application ID: sq0idp-ufZTqmCnnMGILSjZsY6Nsg

---

<div class="post-metadata">

**Author:** ![rei](https://avatars.discourse-cdn.com/v4/letter/r/ecd19e/32.png) [@rei](https://developer.squareup.com/forums/u/rei)\
**Post date:** [January 22, 2021, 9:29pm UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663/4 "2021-01-22T21:29:28Z")

</div>

I was able to create an Order by removing taxes and discounts and modifiers of all sorts and removing the catalog object ID from the line (don’t know why it wouldn’t find it; doing a search still finds the right item).

But looking for it on my Square dashboard, under All Orders, All types and All locations, I don’t see it.

I’m also able to create an Invoice out of it, which in turn does show up in my dashboard.

I’m pretty certain I have the right Environment and Location, as I’ve also checked that using the same client object (from C#).

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [January 22, 2021, 10:15pm UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663/5 "2021-01-22T22:15:40Z")

</div>

Was just about to follow up: yeah, it sounds like you can’t do `applied_discounts` and `discounts` in the line items. `applied_discounts` is the way forward.

In order to see an order in your dashboard, you need to supply fulfillments in the order, as well as pay for the order.

---

<div class="post-metadata">

**Author:** ![rei](https://avatars.discourse-cdn.com/v4/letter/r/ecd19e/32.png) [@rei](https://developer.squareup.com/forums/u/rei)\
**Post date:** [January 22, 2021, 10:25pm UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663/6 "2021-01-22T22:25:31Z")

</div>

Ah, I see. Thanks!

Any idea why it might be telling me it can’t find the catalog object ID even though I can see it using RetrieveCatalogObject?

Also, it’s telling me that applied\_money for applied\_discount is read only. What’s the correct way to change a discount amount from code if we want to use applied\_discounts?

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [January 22, 2021, 10:49pm UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663/7 "2021-01-22T22:49:35Z")

</div>

Not sure about your first question; what is the catalog object ID?

As for the latter, you should be supplying either a catalog object for discount or an ad-hoc discount in the root-level order `discounts` array, and then if you intend on using them in the line items, use the `applied_discounts` to say you want to “apply” this discount to the item. For more info see here: [https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts)

---

<div class="post-metadata">

**Author:** ![rei](https://avatars.discourse-cdn.com/v4/letter/r/ecd19e/32.png) [@rei](https://developer.squareup.com/forums/u/rei)\
**Post date:** [January 22, 2021, 11:01pm UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663/8 "2021-01-22T23:01:24Z")

</div>

The object ID is FWUVMLQQTHDNP3IT32YNGL6U .

So the `discounts` are specified under `order.discounts`, and then they’re referenced in `order.line_items.applied_discounts` by `discount_uid`, right?

That’s what gives me that error:

`{"errors": [{"code": "BAD_REQUEST","detail": "mixed usage of applied adjustments fields with deprecated adjustments fields is not supported","category": "INVALID_REQUEST_ERROR"}]}`

Odd…

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [January 22, 2021, 11:38pm UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663/9 "2021-01-22T23:38:23Z")

</div>

I do not see an error about `FWUVMLQQTHDNP3IT32YNGL6U` not being found. Can you provide the full response?

Can you share your full request and I’ll see if I can replicate it?

---

<div class="post-metadata">

**Author:** ![rei](https://avatars.discourse-cdn.com/v4/letter/r/ecd19e/32.png) [@rei](https://developer.squareup.com/forums/u/rei)\
**Post date:** [January 22, 2021, 11:46pm UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663/10 "2021-01-22T23:46:13Z")

</div>

Request body:

```auto
{
  "order": {
    "location_id": "LR4S1V9ZX73S4",
    "reference_id": "CustomerID 791115421179711488L Week 1s",
    "customer_id": "2V872E88NCZG3A3E80Y67ZACXC",
    "line_items": [
      {
        "name": "standard 6 for Week 1",
        "quantity": "1",
        "catalog_object_id": "FWUVMLQQTHDNP3IT32YNGL6U",
        "modifiers": [
          {
            "uid": "PID-786235143399411712",
            "name": "Buri Teriyaki × 2",
            "base_price_money": {
              "amount": 2000,
              "currency": "CAD"
            }
          }
        ],
        "base_price_money": {
          "amount": 7050,
          "currency": "CAD"
        }
      }
    ],
    "discounts": [
      {
        "uid": "SoftLaunchDiscount",
        "name": "Soft launch discount"
      },
      {
        "uid": "DiscountAmount",
        "name": "Order discount"
      }
    ],
    "pricing_options": {
      "auto_apply_taxes": true
    }
  },
  "idempotency_key": "5ce2e6f0-1dbf-4217-8744-ae1e364e3d81"
}

```

Full HTTP response:

```auto
HTTP/1.1 404 Not Found
Date: Fri, 22 Jan 2021 22:20:37 GMT
Frame-Options: DENY
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block
Content-Type: application/json;charset=utf-8
Square-Version: 2021-01-21
Content-Length: 160
Strict-Transport-Security: max-age=631152000; includeSubDomains; preload

{"errors": [{"code": "NOT_FOUND","detail": "Item variation with catalog object ID `FWUVMLQQTHDNP3IT32YNGL6U` not found.","category": "INVALID_REQUEST_ERROR"}]}

```

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [January 22, 2021, 11:52pm UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663/11 "2021-01-22T23:52:55Z")

</div>

Ah, that id is the item id, not the variation id. You need to pass the variation id. Also…there’s a few more issues with this request. If you’re passing `catalog_object_id`, you do not need the name nor the price, unless it’s variably priced. Also the `discounts` is missing the `scope` and the price or ID. This request actually fails for me due to the missing `scope` field, which is required in `discounts`.

---

<div class="post-metadata">

**Author:** ![rei](https://avatars.discourse-cdn.com/v4/letter/r/ecd19e/32.png) [@rei](https://developer.squareup.com/forums/u/rei)\
**Post date:** [January 23, 2021, 12:23am UTC](https://developer.squareup.com/forums/t/orders-api-mixed-usage-of-applied-adjustments-fields-with-deprecated-adjustments-fields-is-not-supported/1663/12 "2021-01-23T00:23:02Z")

</div>

Nice, that went through.

Thanks for all the help!
