question

Ward avatar image
Ward asked bryanvargas commented

Json payload succeeds to checkouts endpoint, fails to orders

I can't figure out what I am doing wrong. Using atomic_order/checkouts, my json payload succeeds, but the same payload fails at the /orders endpoint. I am using RestSharp:

var rootSerial = JsonConvert.SerializeObject(myOrderCartObject);
request.AddStringBody(rootSerial, ContentType.Json);

Payload:

{"orderCart":{"discounts":null,"lineItems":{"elements":[{"item":{"id":"3282V1W6NKDRY"},"alternateName":null,"discounts":null,"exchanged":false,"modifications":{"elements":[{"item":null,"alternateName":null,"discounts":null,"exchanged":false,"modifications":null,"modifier":{"id":"HWXM6GTYF1CGG"},"id":null,"name":null,"modifierIds":null,"modifierGroup":null}]},"modifier":null,"id":null,"name":null,"modifierIds":null,"modifierGroup":null}]}},"name":null,"price":0,"modifierGroups":null,"elements":null,"href":null}

Grateful for any help. Thanks.


Orders
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bryanvargas avatar image bryanvargas ♦♦ commented ·
I used your same code and did not run into any problems. I would suggest double-checking your code or seeing what the exact error message is.
1 Like 1 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community