0
Answered

Smart Quote API fails with Can not deserialize instance of eu.xtrf.api.v2.dto.quote.QuoteCreateDTO

Mike MacKechnie 4 years ago in API updated by Bogusław Reich (XTRF Product Owner) 4 years ago 5

The full message is 

Can not deserialize instance of eu.xtrf.api.v2.dto.quote.QuoteCreateDTO out of START_ARRAY token
at [Source: org.glassfish.jersey.message.internal.EntityInputStream@2567c2c6; line: 1, column: 1]

The URI is POST https://xxxxx.xxxxxx.com/home-api/v2/quotes

The body is [
{
"clientId": 3315,
"name": "Test Smart Quote",
"serviceId": 115,
"opportunityOfferId": ""
}
]

Answer

+1
Answer

Remove square brackets at the begining and at the end of the body. Your request should look like:

{
"clientId": 3315,
"name": "Test Smart Quote",
"serviceId": 115,
"opportunityOfferId": ""
}

Cheers!

GOOD, I'M SATISFIED
Satisfaction mark by Mike MacKechnie 4 years ago

Even if the solution is obvious, I'd appreciate some help as I'm not an XTRF expert by any means. 

Implementation version 8.0.12 Build version Version d89aa5d779f5f837cd723f4d59ac2352df012c30, Date 2018-07-23 12:36 Database version 8.0.7

+1
Answer

Remove square brackets at the begining and at the end of the body. Your request should look like:

{
"clientId": 3315,
"name": "Test Smart Quote",
"serviceId": 115,
"opportunityOfferId": ""
}

Cheers!

That was the problem. I am such a dweeb. Thank you Ejamka.