Andriy
September 19, 2017, 3:06pm
1
Hello there again, I’m trying to create order with employee notes in following way
{:order=>
{:channel_id=>47924,
:customer_id=>10289207,
:delivery_method_id=>174878,
:number=>"IN1001",
:deliver_to_attributes=>
{:first_name=>"Test",
:last_name=>"Test",
:address1=>"Test",
:address2=>"",
:city=>"Test",
:country=>"GB",
:zip=>"57 654",
:customer_id=>10289207},
:line_items_attributes=>
[{:price_per_unit=>"95.00",
:tax_rate=>0.0,
:quantity=>15,
:sellable_id=>13481339}],
:payment_attributes=>
{:payment_type=>"offline",
:reference_number=>""},
:employee_note_attributes=>
[{:note=>"Some of customer comments"}],
:customer_note_attributes=>{:text=>""}}}
But I get 500 error. Excluding customer_note_attributes it also gives me 500 error. Error disappears only if I remove employee_note_attributes out.
Can you help me to find out, what exactly is wrong in that request?
Andriy
September 19, 2017, 3:07pm
2
Oh, it possibly should be employee_notes not employee_note. Crap
Andriy
September 19, 2017, 3:35pm
3
But still, after I add employee_notes_attributes, they do not appear in order body.
Request body:
{:order=>
{:channel_id=>47924,
:customer_id=>10289443,
:delivery_method_id=>174895,
:number=>"IN1001",
:deliver_to_attributes=>
{:first_name=>"Test",
:last_name=>"Test",
:address1=>"Test",
:address2=>"",
:city=>"Test",
:country=>"GB",
:zip=>"57 654",
:customer_id=>10289443},
:line_items_attributes=>
[{:price_per_unit=>"95.00",
:tax_rate=>0.0,
:quantity=>15,
:sellable_id=>13481339}],
:payment_attributes=>
{:payment_type=>"offline",
:reference_number=>""},
:employee_notes_attributes=>
[{:note=>"Some of customer comments"}],
:customer_note_attributes=>{:text=>""}}}
And also I would like to know, in which way can I update those notes through api. Thanx a lot
phil
September 20, 2017, 9:19am
4
Hi, sorry about the slow reply, did you manage to fix this?
Andriy
September 20, 2017, 9:21am
5
No, I have order successfully cerated, but without employee_notes. I can’t manage this. On get response I get:
:employee_notes_attributes=>[]
phil
September 20, 2017, 9:41am
6
in the PUT request for order we ignore employee notes. You can update them from the order notes end point.
http://developer.veeqo.com/docs#/reference/orders/order-notes/create-a-new-order-note
Andriy
September 20, 2017, 9:57am
7
Maybe check logs of Misha’s account.
It was approximately 19-20 hours ago from now.
phil
September 20, 2017, 10:04am
8
is this in reference to the other thread?