PATCH
/
api
/
v2
/
platform
/
adjustments
/
{id}
curl --request PATCH \
  --url http://{defaultHost}/api/v2/platform/adjustments/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "adjustment": {
    "order_id": "<string>",
    "label": "Shipping costs",
    "adjustable_id": "<string>",
    "adjustable_type": "Spree::LineItem",
    "source_id": "<string>",
    "source_type": "Spree::TaxRate",
    "amount": 10.9,
    "mandatory": true,
    "eligible": true,
    "state": "closed",
    "included": true
  }
}'
{
  "data": {
    "id": "8",
    "type": "adjustment",
    "attributes": {
      "source_type": "Spree::TaxRate",
      "adjustable_type": "Spree::LineItem",
      "amount": "15.0",
      "label": "New label",
      "mandatory": null,
      "eligible": true,
      "created_at": "2022-11-08T19:33:55.540Z",
      "updated_at": "2022-11-08T19:33:55.775Z",
      "state": "open",
      "included": false,
      "display_amount": "$15.00"
    },
    "relationships": {
      "order": {
        "data": {
          "id": "10",
          "type": "order"
        }
      },
      "adjustable": {
        "data": {
          "id": "4",
          "type": "line_item"
        }
      },
      "source": {
        "data": {
          "id": "7",
          "type": "tax_rate"
        }
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Query Parameters

include
string

Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>

Body

application/json
adjustment
object
required

Response

200
application/vnd.api+json
Record updated
data
object
required