MageSmith
POSTCatalog · Magento 2.4.9 Admin · Magento_Catalog::sets

POST /V1/products/attribute-sets/attributes

POST /V1/products/attribute-sets/attributes is a Magento 2 REST endpoint in the Catalog module. Assign attribute to attribute set. Requires an admin Bearer token with ACL Magento_Catalog::sets.

Last verified: against Magento 2.4.9.

Returns

int

Service contract

Magento\Catalog\Api\ProductAttributeManagementInterface::assign

Authorization

Admin Bearer token with ACL:

  • Magento_Catalog::sets

Body parameters

attributeSetId int Required
attributeGroupId int Required
attributeCode string Required
sortOrder int Required

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_Catalog::sets

Path

/V1/products/attribute-sets/attributes

Body

{
  "attributeCode": "",
  "attributeGroupId": 0,
  "attributeSetId": 0,
  "sortOrder": 0
}

Every Magento dev tool, in one hosted workspace.

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