SageMain Test Posted June 27, 2023 Posted June 27, 2023 Hi, what is this error about? It's the response to a PUT request to contacts endpoint. [{\"$severity\":\"error\",\"$dataCode\":\"RecordInvalid\",\"$message\":\"This field is required.\",\"$source\":\"addresses.address_type_form_proxy_id\"}] "CorrelationId":"80000c11-0003-df00-b63f-84710c7967bb" Thanks, Marco
Steel, Mark Posted June 27, 2023 Posted June 27, 2023 Hi Marco, Thanks for your question. Can you provide the body params of the PUT request together with the country of the business you're sending it to please. Thanks Mark
SageMain Test Posted June 27, 2023 Author Posted June 27, 2023 Hey Mark, Here it is: "Request":"{\"contact\":{\"name\":\"Win....\",\"contact_type_ids\":[\"CUSTOMER\"],\"main_address\":{\"address_line_1\":\"81-83 High...\",\"city\":\"Knares...\",\"region\":\"England\"},\"delivery_address\":{\"address_line_1\":\"81-83 High...\",\"city\":\"Knares...\",\"name\":\"Physical Address\",\"region\":\"England\"},\"main_contact_person\":{\"telephone\":\"\",\"mobile\":\"\",\"email\":\"jemma@...\"}}}" The region of the business is UK Thanks, Marco
Steel, Mark Posted June 28, 2023 Posted June 28, 2023 Thanks Marco, The first thing of note is that you're attempting to set the type of the contact in the PUT request. This should be a constant for the contact record after creation and is not required for a PUT request. I can't make out the majority of the values you've provided but i've included the body params of a working PUT request. Let me know how you get on. { "contact": { "name": "Win", "main_address": { "address_name": "ACCOUNTS", "address_line_1": "24-26 Gibraltar Row", "address_city": "Liverpool", "address_post_code": "LV23 7RA", "address_country_id": "GB" }, "main_contact_person": { "contact_name": "Michael Smith Editied", "contact_email": "email edited", "contact_telephone": "tel edited", "contact_mobile": "mo edited", "contact_fax": "fax edited" } } } Thanks Mark
SageMain Test Posted June 28, 2023 Author Posted June 28, 2023 Hey Mark, I've reported the fields of the request that fails. They are the same we use for any request. I acknowledge that contact_type is not requested but I doubt it could be the cause of the error since it's included in all our successful requests. { "contact": { "name": "Windsor", "contact_type_ids": [ "CUSTOMER" ], "main_address": { "address_line_1": "81-83 Street", "city": "London", "region": "England" }, "delivery_address": { "address_line_1": "81-83 Street", "city": "London", "name": "Physical Address", "region": "England" }, "main_contact_person": { "telephone": "", "mobile": "", "email": "[email protected]" } } } Here is a request successfully sent right now to my test account: { "contact": { "name": "1Cust", "contact_type_ids": [ "CUSTOMER" ], "main_address": { "address_line_1": "16 Downing Street", "city": "London", "region": "England" }, "delivery_address": { "address_line_1": "12 Downing Street", "city": "London", "name": "Physical Address", "region": "England" }, "main_contact_person": { "email": "[email protected]" } } } Do you know how we could fix the error? Thanks, Marco
Steel, Mark Posted June 29, 2023 Posted June 29, 2023 Thanks Marco, It looks as if this one is going to be business specific. Could you send me directly the X-Business guid of the business and your client_id please and i'll take a look in to it. Thanks Mark
Steel, Mark Posted June 30, 2023 Posted June 30, 2023 Hi Marco, Thanks for the info. I've been able to replicate the issue and it looks to be related to the main address not having an associated country. The resolution is to add a country to the main address of this contact. I need to look into why the API is not handling this error and returning a more meaningful message. Thanks Mark
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now