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.
Request
- Base URLhttps://wbsapi.withings.net
- Authnone declared
Query parameters
Service action name. Must take the string value createuserorder.
Id of the client
A random token used to prevent replay attacks (Cf. Signature v2 - Getnonce)
Hash of params (Cf. Signature hash protocol).
Specifies if customer accepted Withings commercial contacts.
Unix timestamp of user's birthdate
User measures (Cf. Measures model).
0: man, 1: woman
User language preference. Examples: en_EN / en_US / de_DE / es_ES / fr_FR / it_IT / ja_JA / ko_KR / nl_NL / pt_PT / ru_RU / zh_CN
Unit pref (cf. Unit preferences model).
User's email address
User's timezone. Examples: "Europe/Paris" / "America/New_York". A complete list of all possible timezones can be found on the "TZ database name" column of this page : https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
3 characters representing the end user (ex: for a user named Robert, you could set the shortname param to ROB). These characters will be displayed on device screens when used.<br>Shortname must respect the following regex: /^[a-zA-Z0-9]{3}$/ (either letters or numbers, special characters and spaces are not allowed).
Unique identifier used by the partner to identify the end-user.
Refer to Order model. The maximum number of orders is 10 per API request.
User's firstname (if not set, will take the same value as shortname)
User's lastname (if not set, will take the same value as shortname)
Phone number in E.164 format. End user will receive a verification code on this phone number for 2 factor authentication if they wish to securely access the data of their program in the withings app in the future (recommended)
Recovery code can be used by end user as a 2nd authentication factor in the withings app if they wish to securely access the data of their program in the future. You will be responsible of securely providing this recovery code to your user if he asks for it.
Goals (cf. Goals model).
If is set, it will create fake orders, and simulate the evolution of the orders status and sending of notifications.<br>1: SHIPPED sequence<br>2: TRASHED sequence<br>3: FAILED sequence<br>4: BACKHOLD sequence
Response
(Click to unfold)
Example response
{
"body": {
"user": {
"code": "490ed603fe9bd2ce10027bdba0c932069cd27085",
"external_id": "3b7a6db0-ec7e-479b-9675-2a3d8d6a7e51"
},
"orders": [
{
"order_id": "D12345678",
"customer_ref_id": "MOUVEMENTREFERENCE12345678",
"dropshipmentorderid": "32948634",
"status": "ADDRESS VERIFICATION",
"products": [
{
"ean": "3700546702518",
"partner_ref": "REF-12345",
"quantity": 3
}
]
}
],
"dropshipmentorderid": "4874687",
"invalid_address_customer_ref_ids": [
"MOUVEMENTREFERENCE12345678"
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.