APIs & Integrations

BJS
Participant | Platinum Partner
Participant | Platinum Partner

Quotes API Line Items not appearing on PDF

SOLVE

Hey there!

 

Having some issues with building quotes via the API.

 

I am able to successfully build the quote, add line items, and publish the quote. However, when I view the quote from the url that is sent back -- no line items are attached. It does however have the correct amount. 

 

If I ping the quote via the API to check for associated line items the correct line items do come back with the respose. 

 

Furthermore, if I manually unpublish the quote and then rebupulish the quote without editing anything (simply clicking the next button throught the whole process) the quote will publish and all line items will then show up. 

 

I've been bashing my head against a wall with this for some time. Any help would be appreciated. 

 

-- BJ

0 Upvotes
1 Accepted solution
BJS
Solution
Participant | Platinum Partner
Participant | Platinum Partner

Quotes API Line Items not appearing on PDF

SOLVE

I figured out my issue. It seems a bit unrelated but maybe it would help.

 

For me, I was missing the line item position property. So it actually worked fine with a single line item but if I added multiple line items then it didnt work. 

 

Adding that line item position property to the line item creation process via the api worked like a charm.

 

I also recomend using graphql sandbox to return all values/properties for quotes and line items as the docs on this are pretty darn sparce.

 

-- BJ

View solution in original post

0 Upvotes
2 Replies 2
BJS
Solution
Participant | Platinum Partner
Participant | Platinum Partner

Quotes API Line Items not appearing on PDF

SOLVE

I figured out my issue. It seems a bit unrelated but maybe it would help.

 

For me, I was missing the line item position property. So it actually worked fine with a single line item but if I added multiple line items then it didnt work. 

 

Adding that line item position property to the line item creation process via the api worked like a charm.

 

I also recomend using graphql sandbox to return all values/properties for quotes and line items as the docs on this are pretty darn sparce.

 

-- BJ

0 Upvotes
Juan53409
Member | Elite Partner
Member | Elite Partner

Quotes API Line Items not appearing on PDF

SOLVE

Hello, I have the same problem, I did not find an API solution, then I modified the template of quotes, for some reason it does not load the line items but I added a variable of HubL LINE_ITEMS and it worked, I show you an image of the code, but you would have to comment the line where the table of line items is imported by default in the template.

In the image of the quotation the pdf is shown without the Line Items that comes by default only the total price appears and below with the implementation of the code the Line Items appear. 

 


templateQuote.PNG

QuoteReview.PNG

0 Upvotes