Submitting Your First Order
In the previous guides you created an empty order and then populated it with a line item containing two of our Cotton T-shirt product.
Shipping Estimates
In a normal order checkout process, one would expect to provide a shipping address and thereby have a choice of shipping providers to choose from. This is what the Shipping Estimates integration is for and will be covered in later documentation.
Order Calculate
When a Shipper is selected or pre-configured by the application, at that point a Order Calculate would be run to update ShippingCost
and TaxCost
using a third party provider and elevated API roles. Again, this is beyond the scope of this guide and covered in later documentation.
Submitting the Order
Once you have an order with at least one Line Item, you are able to use the Order Submit endpoint to change the Order's status from Unsubmitted
to Open
. Wherein the seller perspective or automation would take over fulfillment.
1POST https://sandboxapi.ordercloud.io/v1/orders/Outgoing/INSERT_ORDER_ID_HERE/submit HTTP/1.12Authorization: Bearer INSERT_ACCESS_TOKEN_HERE3Content-Type: application/json; charset=UTF-8;
The response should look something like this:
1{2 "ID": "PKTiEFNEiEi9mEmC9cZCrw",3 "FromUser": {4 "ID": "BUYER_USER",5 "Username": "buyer01",6 "Password": null,7 "FirstName": "Buyer",8 "LastName": "User",9 "Email": "buyer@email.com",10 "Phone": null,11 "TermsAccepted": null,12 "Active": true,13 "xp": null,14 "AvailableRoles": null,15 "Locale": null,16 "DateCreated": "2021-02-08T23:09:14.82+00:00",17 "PasswordLastSetDate": "2021-02-08T23:10:00.56+00:00"18 },19 "FromCompanyID": "BUYER_ORGANIZATION",20 "ToCompanyID": "bClEeDV0f9GjjkGD",21 "FromUserID": "BUYER_USER",22 "BillingAddressID": null,23 "BillingAddress": null,24 "ShippingAddressID": null,25 "Comments": null,26 "LineItemCount": 1,27 "Status": "Open",28 "DateCreated": "2021-02-23T20:39:03.173+00:00",29 "DateSubmitted": "2021-03-01T22:37:59.267+00:00",30 "DateApproved": null,31 "DateDeclined": null,32 "DateCanceled": null,33 "DateCompleted": null,34 "LastUpdated": "2021-03-01T22:37:59.267+00:00",35 "Subtotal": 20,36 "ShippingCost": 0,37 "TaxCost": 0,38 "PromotionDiscount": 0,39 "Total": 20,40 "IsSubmitted": true,41 "LineItems": null,42 "xp": null43}
The order now has IsSubmitted
set to true, Status
is set to "Open", and the DateSubmitted
property has been set.
Congratulations on submitting your first OrderCloud order!
Still have questions?
Ask in our Community Channel