Create/Update orders in batch

POST {{baseUrl}}/orders

Note that this section describes a beta version of the Orders API. This means currently only Sendcloud API integrations are supported. Make a request to insert orders into Sendcloud API integrations. You can use multiple Sendcloud API Integrations within the same call. This is an upsert endpoint, which means that it will update an order when you have the combination of Order ID with Integration ID fields in your request. If not, it will create a new order.

Request Body

{"0"=>{"order_id"=>"<string>", "order_number"=>"<string>", "order_details"=>{"integration"=>{"id"=>"<integer>"}, "status"=>{"code"=>"<string>", "message"=>"<string>"}, "order_created_at"=>"<dateTime>", "order_items"=>[{"name"=>"<string>", "quantity"=>"<integer>", "total_price"=>{"value"=>"<number>", "currency"=>"GBP"}, "item_id"=>"<string>", "product_id"=>"<string>", "variant_id"=>"<string>", "image_url"=>"<string>", "description"=>"<string>", "sku"=>"<string>", "hs_code"=>"<string>", "country_of_origin"=>"<string>", "properties"=>{"inb"=>-37549304, "irured"=>-62170885}, "unit_price"=>{"value"=>"<number>", "currency"=>"EUR"}, "measurement"=>{"dimension"=>{"length"=>"<number>", "width"=>"<number>", "height"=>"<number>", "unit"=>"ft"}, "weight"=>{"value"=>"<number>", "unit"=>"kg"}, "volume"=>{"value"=>"<integer>", "unit"=>"ml"}}, "ean"=>"<string>", "delivery_dates"=>nil, "mid_code"=>"<string,null>", "material_content"=>"<string,null>", "intended_use"=>"<string,null>"}, {"name"=>"<string>", "quantity"=>"<integer>", "total_price"=>{"value"=>"<number>", "currency"=>"EUR"}, "item_id"=>"<string>", "product_id"=>"<string>", "variant_id"=>"<string>", "image_url"=>"<string>", "description"=>"<string>", "sku"=>"<string>", "hs_code"=>"<string>", "country_of_origin"=>"<string>", "properties"=>{"suntf"=>-81215729, "temporc5"=>false}, "unit_price"=>{"value"=>"<number>", "currency"=>"USD"}, "measurement"=>{"dimension"=>{"length"=>"<number>", "width"=>"<number>", "height"=>"<number>", "unit"=>"mm"}, "weight"=>{"value"=>"<number>", "unit"=>"oz"}, "volume"=>{"value"=>"<integer>", "unit"=>"m3"}}, "ean"=>"<string>", "delivery_dates"=>{"handover_at"=>"<dateTime>"}, "mid_code"=>"<string,null>", "material_content"=>"<string,null>", "intended_use"=>"<string,null>"}], "order_updated_at"=>"<dateTime>", "notes"=>"<string>"}, "payment_details"=>{"total_price"=>{"value"=>"<number>", "currency"=>"EUR"}, "status"=>{"code"=>"<string>", "message"=>"<string>"}, "is_cash_on_delivery"=>"<boolean,null>", "subtotal_price"=>{"value"=>"<number>", "currency"=>"GBP"}, "estimated_shipping_price"=>{"value"=>"<number>", "currency"=>"EUR"}, "estimated_tax_price"=>{"value"=>"<number>", "currency"=>"EUR"}, "invoice_date"=>"<string,null>", "discount_granted"=>{"value"=>"735.0565319", "currency"=>"<string,null>"}, "insurance_costs"=>{"value"=>"344227819", "currency"=>"<string,null>"}, "freight_costs"=>{"value"=>"32179747539", "currency"=>"<string,null>"}, "other_costs"=>{"value"=>"5", "currency"=>"<string,null>"}}, "id"=>"<string>", "created_at"=>"<dateTime>", "modified_at"=>"<dateTime>", "customs_details"=>nil, "customer_details"=>{"name"=>"<string>", "phone_number"=>"<string>", "email"=>"<string>"}, "billing_address"=>{"name"=>"<string>", "company_name"=>"<string>", "address_line_1"=>"<string>", "house_number"=>"<string>", "address_line_2"=>"<string>", "postal_code"=>"<string>", "city"=>"<string>", "po_box"=>"<string,null>", "state_province_code"=>"<string>", "country_code"=>"<string>", "email"=>"<email>", "phone_number"=>"<string>"}, "shipping_address"=>{"name"=>"<string>", "company_name"=>"<string>", "address_line_1"=>"<string>", "house_number"=>"<string>", "address_line_2"=>"<string>", "postal_code"=>"<string>", "city"=>"<string>", "po_box"=>"<string,null>", "state_province_code"=>"<string>", "country_code"=>"<string>", "email"=>"<email>", "phone_number"=>"<string>"}, "shipping_details"=>{"is_local_pickup"=>"<boolean,null>", "delivery_indicator"=>"<string>", "measurement"=>{"dimension"=>{"length"=>"<number>", "width"=>"<number>", "height"=>"<number>", "unit"=>"ft"}, "weight"=>{"value"=>"<number>", "unit"=>"oz"}, "volume"=>{"value"=>"<integer>", "unit"=>"m3"}}}, "service_point_details"=>{"id"=>"<string>", "post_number"=>"<string>", "latitude"=>"<string>", "longitude"=>"<string>", "type"=>"<string>", "extra_data"=>{"dolore_5"=>true, "laboris_941"=>true, "qui_b"=>-30266258}}}, "1"=>{"order_id"=>"<string>", "order_number"=>"<string>", "order_details"=>{"integration"=>{"id"=>"<integer>"}, "status"=>{"code"=>"<string>", "message"=>"<string>"}, "order_created_at"=>"<dateTime>", "order_items"=>[{"name"=>"<string>", "quantity"=>"<integer>", "total_price"=>{"value"=>"<number>", "currency"=>"EUR"}, "item_id"=>"<string>", "product_id"=>"<string>", "variant_id"=>"<string>", "image_url"=>"<string>", "description"=>"<string>", "sku"=>"<string>", "hs_code"=>"<string>", "country_of_origin"=>"<string>", "properties"=>{"commodo_215"=>18489331.962707877, "ut74d"=>"enim", "Duis_0a"=>true, "occaecat_4"=>-1808022}, "unit_price"=>{"value"=>"<number>", "currency"=>"EUR"}, "measurement"=>{"dimension"=>{"length"=>"<number>", "width"=>"<number>", "height"=>"<number>", "unit"=>"cm"}, "weight"=>{"value"=>"<number>", "unit"=>"g"}, "volume"=>{"value"=>"<integer>", "unit"=>"ml"}}, "ean"=>"<string>", "delivery_dates"=>nil, "mid_code"=>"<string,null>", "material_content"=>"<string,null>", "intended_use"=>"<string,null>"}, {"name"=>"<string>", "quantity"=>"<integer>", "total_price"=>{"value"=>"<number>", "currency"=>"USD"}, "item_id"=>"<string>", "product_id"=>"<string>", "variant_id"=>"<string>", "image_url"=>"<string>", "description"=>"<string>", "sku"=>"<string>", "hs_code"=>"<string>", "country_of_origin"=>"<string>", "properties"=>{"labore_282"=>-59177720.14499056, "pariatur_8"=>"anim aute", "adc_"=>"reprehenderit aliqua sit"}, "unit_price"=>{"value"=>"<number>", "currency"=>"EUR"}, "measurement"=>{"dimension"=>{"length"=>"<number>", "width"=>"<number>", "height"=>"<number>", "unit"=>"in"}, "weight"=>{"value"=>"<number>", "unit"=>"g"}, "volume"=>{"value"=>"<integer>", "unit"=>"cm3"}}, "ean"=>"<string>", "delivery_dates"=>{"handover_at"=>"<dateTime>"}, "mid_code"=>"<string,null>", "material_content"=>"<string,null>", "intended_use"=>"<string,null>"}], "order_updated_at"=>"<dateTime>", "notes"=>"<string>"}, "payment_details"=>{"total_price"=>{"value"=>"<number>", "currency"=>"GBP"}, "status"=>{"code"=>"<string>", "message"=>"<string>"}, "is_cash_on_delivery"=>"<boolean,null>", "subtotal_price"=>{"value"=>"<number>", "currency"=>"USD"}, "estimated_shipping_price"=>{"value"=>"<number>", "currency"=>"USD"}, "estimated_tax_price"=>{"value"=>"<number>", "currency"=>"USD"}, "invoice_date"=>"<string,null>", "discount_granted"=>{"value"=>"2796441", "currency"=>"<string,null>"}, "insurance_costs"=>{"value"=>"5910169", "currency"=>"<string,null>"}, "freight_costs"=>{"value"=>"3506513522", "currency"=>"<string,null>"}, "other_costs"=>{"value"=>"7645.5", "currency"=>"<string,null>"}}, "id"=>"<string>", "created_at"=>"<dateTime>", "modified_at"=>"<dateTime>", "customs_details"=>nil, "customer_details"=>{"name"=>"<string>", "phone_number"=>"<string>", "email"=>"<string>"}, "billing_address"=>{"name"=>"<string>", "company_name"=>"<string>", "address_line_1"=>"<string>", "house_number"=>"<string>", "address_line_2"=>"<string>", "postal_code"=>"<string>", "city"=>"<string>", "po_box"=>"<string,null>", "state_province_code"=>"<string>", "country_code"=>"<string>", "email"=>"<email>", "phone_number"=>"<string>"}, "shipping_address"=>{"name"=>"<string>", "company_name"=>"<string>", "address_line_1"=>"<string>", "house_number"=>"<string>", "address_line_2"=>"<string>", "postal_code"=>"<string>", "city"=>"<string>", "po_box"=>"<string,null>", "state_province_code"=>"<string>", "country_code"=>"<string>", "email"=>"<email>", "phone_number"=>"<string>"}, "shipping_details"=>{"is_local_pickup"=>"<boolean,null>", "delivery_indicator"=>"<string>", "measurement"=>{"dimension"=>{"length"=>"<number>", "width"=>"<number>", "height"=>"<number>", "unit"=>"in"}, "weight"=>{"value"=>"<number>", "unit"=>"lbs"}, "volume"=>{"value"=>"<integer>", "unit"=>"gal"}}}, "service_point_details"=>{"id"=>"<string>", "post_number"=>"<string>", "latitude"=>"<string>", "longitude"=>"<string>", "type"=>"<string>", "extra_data"=>{"incididuntb8"=>"aliqua cillum ut ad velit", "labore_b"=>false, "reprehenderit_f"=>"Lorem in officia", "fugiat_8"=>55884274}}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;data&quot;:[{&quot;id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;order_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;order_number&quot;:&quot;\u003cstring\u003e&quot;},{&quot;id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;order_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;order_number&quot;:&quot;\u003cstring\u003e&quot;}]}