Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WEBAPI: bug customer is created although you receive an error in address section #2914

Closed
ericahoekerd opened this issue Jan 7, 2016 · 6 comments
Labels
bug report Component: Framework/Webapi USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just Catalog Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update

Comments

@ericahoekerd
Copy link

Usage of this method customerCustomerRepositoryV1SaveRequest results in error if you miss some required parameters in the address section (addresses/item), eg lastname, firstname.

But the customer account is created and get his own Id!

This should not happen, the complete message should be rejected and not 1 part should be processed.

@vrann
Copy link
Contributor

vrann commented Jan 13, 2016

Internal ticket is created MAGETWO-47850

@victorgugo victorgugo added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jan 14, 2016
@okorshenko
Copy link
Contributor

Hi @tinxit . Thank you for reporting the issue. Unfortunately, I can't reproduce this issue using this test data:

POST:  http://magento.dev/rest/V1/customers

{
"customer":     {
        "id": null,
        "group_id": 1,
        "default_billing": null,
        "default_shipping": null,
        "created_at": null,
        "updated_at": "2016-01-20 19:59:36",
        "created_in": "Default Store View",
        "email": "user2@example.com",
        "firstname": "First",
        "lastname": "Last",
        "prefix": "test",
        "gender": 1,
        "store_id": 1,
        "website_id": 1,
        "addresses":
        [
            {
                "id": null,
                "customer_id": null,
                "region":
                {
                    "region_code": "TX",
                    "region": "Texas",
                    "region_id": 57
                },
                "region_id": 57,
                "country_id": "US",
                "street":
                [
                    "7700 W Parmer Lane"
                ],
                "company": "Magento",
                "telephone": "1112223344",
                "postcode": "12345",
                "city": "Aystin",
                "firstname": null,
                "lastname": null,
                "default_shipping": true,
                "default_billing": true
            }
        ],
        "disable_auto_group_change": 0
    }
}

Response:

Status Code: 400 Bad Request

    "message": "One or more input exceptions have occurred.",
    "errors":
    [
        {
            "message": "%fieldName is a required field.",
            "parameters":
            {
                "fieldName": "firstname"
            }
        },
        {
            "message": "%fieldName is a required field.",
            "parameters":
            {
                "fieldName": "lastname"
            }
        }
    ]
}

Could you please provide steps to reproduce and test data?
Thank you

@ericahoekerd
Copy link
Author

that is because we are using SOAP api not REST

@mazhalai
Copy link
Contributor

mazhalai commented May 9, 2016

@tinxit this has been resolved in commit 73ef9f5 and b5078f0, hence closing this issue.

@mazhalai mazhalai closed this as completed May 9, 2016
@ericahoekerd
Copy link
Author

was this part of release 2.05? because in 2.05 I still have the same issue

@maksek maksek added the Component: Framework/Webapi USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just Catalog label May 12, 2016
@maksek
Copy link
Contributor

maksek commented May 12, 2016

@tinxit, no - currently it is planned only for 2.1.0, and can be found in develop branch.
@elenleonova can you address patch release possibility for API?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Framework/Webapi USE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just Catalog Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update
Projects
None yet
Development

No branches or pull requests

6 participants