Skip to content

Permanent Redirect for old URL missing via API or no documentation #16789

Closed
@ghost

Description

Preconditions

  1. Magento 2.2.5
  2. PHP 7.0.30

Steps to reproduce

  1. POST a request for a product via REST API: V1/products/
    {"product":{"sku": "703","custom_attributes":[{"attribute_code":"url_key","value":"new-url"}, {"attribute_code":"url_key_create_redirect","value":1}, {"attribute_code":"save_rewrites_history","value":1}]}}

Expected result

  1. Product URL changes to domain/new-url
  2. Accessing the old url redirects to the new url

Actual result

  1. Product URL changes to domain/new-url
  2. Accessing the old url returns a 404 error page

I've been reading the Swagger documentation back can't find any information on creating 301 via REST when the product URL is changed.

Metadata

Metadata

Assignees

Labels

Component: CatalogComponent: CatalogUrlRewriteEvent: squashtoberfestIssue: 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.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions