Orders API and the Order total issue

Hello, I’m building a small app to integrate to new orders API, I managed to create a deal then associate it to the order and also add line items.

My main issue is I can’t find anyway to fill in the fields for ‘Order Total’ like subtotal price, discount, tax and shipping

What API endpoint can i call to fill in these details?

Does the order has to have an invoice or quote so these details would show up?

Hey, @okasem :waving_hand: Are you looking to have these values updated as if they are calculated properties based on the associations? Or do you just want to add values when you create the Order programmatically? If it’s the second option, you can send them in the request body. You can find all the Order object properties by making a request to the Properties API.

Examples:
To get the properties for Orders

curl --request GET \
 --url 'https://api.hubapi.com/crm/v3/properties/orders?archived=false' \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

Request I sent to create a new Order:

{
 "associations": [
 {
 "to": {
 "id": 901
 },
 "types": [
 {
 "associationCategory": "HUBSPOT_DEFINED",
 "associationTypeId": 507
 }
 ]
 }
 ],
 "properties": {
 "hs_order_name": "Cat supplies 6",
 "hs_currency_code": "USD",
 "hs_source_store": "Cat Supply Co",
 "hs_fulfillment_status": "Packing",
 "hs_shipping_address_city": "Albuquerque",
 "hs_shipping_address_state": "New Mexico",
 "hs_shipping_address_street": "123 Fake Street",
 "hs_subtotal_price": "1000",
 "hs_order_discount": "25",
 "hs_shipping_cost": "100",
 "hs_total_price": "1076",
 "hs_tax": "1"
 }
}

Result

I hope this helps get you moving forward! — Jaycee

@Jaycee_Lewis Thanks a lot that really helped me :slightly_smiling_face:

I hope those would be included in the documentation here