Dropshipment v2 - Createuserorder

POST {{base_url}}/v2/dropshipment

Dropshipment v2 - Createuserorder

Creates a Withings user, then creates a dropshipment order and links the devices shipped to the created user once the device is shipped. If a cellular device is listed in the order field, the service will activate this device's cellular service and invoicing.

If one of the orders has an invalid address, none of the orders will be created.

Please refer to the Access and refresh tokens section to learn how to use the authorization code you'll get in return of this service in order to fetch user data. The authorization code is only valid for 10 minutes.

This service is part of Withings Pro Solutions. You won't be able to use it if you did not sign a contract with Withings. Use this service only if you're integrating Withings Cellular Solutions with dropshipment.

Look at our API reference for more information

Request Body

[{"name"=>"action", "value"=>"createuserorder", "datatype"=>"string"}, {"name"=>"client_id", "value"=>"{{client_id}}", "datatype"=>"string"}, {"name"=>"nonce", "value"=>"{{nonce}}", "datatype"=>"string"}, {"name"=>"signature", "value"=>"{{signature}}", "datatype"=>"string"}, {"name"=>"mailingpref", "value"=>"1", "datatype"=>"number"}, {"name"=>"birthdate", "value"=>"848166152", "datatype"=>"number"}, {"name"=>"measures", "value"=>"[{\"value\":190,\"unit\":-2,\"type\":4},{\"value\":90,\"unit\":0,\"type\":1}]", "datatype"=>"string"}, {"name"=>"gender", "value"=>"0", "datatype"=>"number"}, {"name"=>"preflang", "value"=>"en_US", "datatype"=>"string"}, {"name"=>"unit_pref", "value"=>"{\"weight\":1,\"height\":6,\"distance\":6,\"temperature\":11}", "datatype"=>"string"}, {"name"=>"email", "value"=>"john.doe@example.com", "datatype"=>"string"}, {"name"=>"timezone", "value"=>"America/New_York", "datatype"=>"string"}, {"name"=>"shortname", "value"=>"JDE", "datatype"=>"string"}, {"name"=>"external_id", "value"=>"my-external-id", "datatype"=>"string"}, {"name"=>"order", "value"=>"[{\"customer_ref_id\": \"customer_orderid2132113\", \"address\": { \"name\": \"John Doe\", \"email\": \"john.doe@example.com\", \"address1\": \"1357 Woodhill Avenue\", \"city\": \"Crofton\", \"zip\": \"21114\", \"state\": \"Maryland\", \"country\": \"US\" }, \"products\": [{ \"ean\": \"3700546707100\", \"quantity\": 1 }], \"force_address\": true }]", "datatype"=>"string"}, {"name"=>"firstname", "value"=>"John", "datatype"=>"string"}, {"name"=>"lastname", "value"=>"Doe", "datatype"=>"string"}, {"name"=>"phonenumber", "value"=>"+19159969739", "datatype"=>"string"}, {"name"=>"recovery_code", "value"=>"f8372tgf9e2g7gf", "datatype"=>"string"}, {"name"=>"goals", "value"=>"{\"steps\": 10000, \"sleep\": 28800, \"weight\": {\"value\": 70500, \"unit\": -3 }}", "datatype"=>"string"}]

RESPONSES

status: OK

{"status":503,"body":{},"error":"Invalid Params wrong HEIGHT value : out of range"}