Skip to content

Magento 2.2.7 - Unable to add tier price with 0 value via API #22237

Closed
@andrewbgittus

Description

@andrewbgittus

Preconditions (*)

  1. Magento version 2.2.7

Steps to reproduce (*)

  1. Send an API request with a tier price value of 0.

POST http://xxx.xxxx.com/magentov2/index.php/rest/V1/products/TEST/group-prices/1/tiers/20/price/0 HTTP/1.1
Authorization: Bearer xx0xxx0x0xx0xx00xxx00xx0x0xxxx0x
Accept: application/json, text/json, text/x-json, text/javascript
User-Agent: RestSharp/100.0.0.0
Host: dev.zynk.com
Content-Length: 0
Accept-Encoding: gzip, deflate
Connection: Close

Expected result (*)

  1. Within the Magento UI it is possible to set a tier price value to 0 so I would have expected the API to allow the same and return a successful response.

Actual result (*)

HTTP/1.1 400 Bad Request
Date: Tue, 09 Apr 2019 08:30:45 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 39
Connection: close
Cache-Control: public, max-age=31536000
Expires: Wed, 08 Apr 2020 08:30:45 GMT
Vary: User-Agent
X-UA-Compatible: IE=edge
X-Turbo-Charged-By: LiteSpeed
Server: cloudflare
CF-RAY: 4c4b1eec6d3a6aa9-LHR

{"message":"Please provide valid data"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Format is validGate 1 Passed. Automatic verification of issue format passed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions