Skip to content

REST API - Attribute option creation -> no ID returned #8810

Closed
@radoslavdodek

Description

@radoslavdodek

Preconditions

  1. Tested in Magento version: 2.1.4

Steps to reproduce

  1. Fresh install
  2. Make following REST request:

POST /rest/default/V1/products/attributes/manufacturer/options

with following Body:

{
  "option": {
    "label": "Manufacturer 1"
  }
}

Expected result

One of following:

  1. The response Body should contain the ID of newly created option
  2. The response Header should contain the ID of newly created option

The reason is that external systems will usually remember the ID so that it can be later referenced (for example when the external system needs to delete that option later).

Actual result

  1. The response body contains just following string:
    true

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: Framework/WebapiUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just CatalogIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasebug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions