cancel
Showing results for 
Search instead for 
Did you mean: 

Error while Creating order using cart

Former Member
0 Kudos

Hi Experts,

I am able to create cnd add products to the cart using REST API (https://wiki.hybris.com/display/release5/API+Usage+Examples#APIUsageExamples-Carts,Cart,CartEntriesa...)

However when i try to create order using cart its giving following error.

Error creating resource with PUT cannot assign partOf item AbstractOrderEntry( calc=true product=Product '29925' (8796101935105) info=product "29925" with name "VCT-D580RM Remote Control Tripod" qtd=10 unit=Unit 'pieces' type 'pieces' (8796093054986) bp=115.0 total=1150.0 taxes=[] discounts=[] ) to testuser3@test.com0.3862228899290433(8796126969901) since it already belongs to testuser3@test.com0.3862228899290433(8796126773291) [ModelSavingException] cannot assign partOf item AbstractOrderEntry( calc=true product=Product '29925' (8796101935105) info=product "29925" with name "VCT-D580RM Remote Control Tripod" qtd=10 unit=Unit 'pieces' type 'pieces' (8796093054986) bp=115.0 total=1150.0 taxes=[] discounts=[] ) to testuser3@test.com0.3862228899290433(8796126969901) since it already belongs to testuser3@test.com0.3862228899290433(8796126773291) [JaloInvalidParameterException]

My cart entry is as follows link text

XML which i am posting to create order is link text

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I think one problem is that you are specifying a code in your PUT (which is identical to the cart code). I think for creating an order you need to remove the code, the call will create the code and return it to you.

Also I am wondering why you are using the web services to create an order? Why don't you use the commerce API they provide all server side logic for it (like choosing BaseStore config, active catalog for a user etc.etc.), while with platform webservices you need to resolve all dependencies yourself.

https://download.hybris.com/api/5.5.0/occ_documentation/main.html https://wiki.hybris.com/display/release5/Omni+Commerce+Connect+5.0

There is sample journeys in the Wiki.