MageSmith
POSTGiftMessage · Magento 2.4.9 Admin · Magento_Sales::create

POST /V1/carts/:cartId/gift-message

POST /V1/carts/:cartId/gift-message is a Magento 2 REST endpoint in the GiftMessage module. Set the gift message for an entire order. Requires an admin Bearer token with ACL Magento_Sales::create.

Last verified: against Magento 2.4.9.

Returns

bool

Service contract

Magento\GiftMessage\Api\CartRepositoryInterface::save

Authorization

Admin Bearer token with ACL:

  • Magento_Sales::create

Path parameters

cartId int Required

The cart ID.

Body parameters

giftMessage Magento\GiftMessage\Api\Data\MessageInterface Required

The gift message.

Example request

Auto-generated from the service contract — paste-ready against your store's /rest/default base. Replace the host, store code, ACL token, and any required values before running.

Headers

Accept
application/json
Content-Type
application/json
Authorization
Bearer <ACCESS_TOKEN> admin token with ACL: Magento_Sales::create

Path

/V1/carts/{cartId}/gift-message

Body

{
  "giftMessage": {
    "customer_id": 0,
    "extension_attributes": {},
    "gift_message_id": 0,
    "message": "",
    "recipient": "",
    "sender": ""
  }
}

Every Magento dev tool, in one hosted workspace.

Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.