Adjustments
Update an Adjustment
Storefront API
- Authentication
- Account
- Account / Address
- Account / Credit Cards
- Account / Orders
- Order Status
- Cart
- Cart / Line Items
- Cart / Other
- Cart / Coupons
- Checkout
- Checkout / State
- Checkout / Shipments
- Checkout / Payments
- Checkout / Store Credit
- Products
- Stores
- Taxons
- Countries
- CMS Pages
- Menus
- Wishlists
- Wishlists / Wished Items
- Digital Downloads
Platform API
- Authentication
- Addresses
- Adjustments
- Classifications
- CMS Pages
- CMS Sections
- Countries
- Data Feeds
- Digital Links
- Digital Assets
- Line Items
- Menu Items
- Menus
- Option Types
- Option Values
- Orders
- Payment Methods
- Payments
- Products
- Promotion Actions
- Promotion Categories
- Promotion Rules
- Promotions
- Roles
- Shipments
- Shipping Categories
- Shipping Methods
- States
- Stock Items
- Stock Locations
- Store Credit Categories
- Store Credit Types
- Store Credits
- Tax Categories
- Tax Rates
- Taxonomies
- Taxons
- Users
- Variants
- Webhook Events
- Webhook Subscribers
- Wished Items
- Wishlists
- Zones
Adjustments
Update an Adjustment
Updates an Adjustment
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
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Query Parameters
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
Available options:
closed
, open
Was this page helpful?
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"
}
}
}
}
}