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.

posthttps://wbsapi.withings.net/v2/dropshipment

Request

  • Base URL
    https://wbsapi.withings.net
  • Auth
    none declared

Query parameters

actionstring required

Service action name. Must take the string value createuserorder.

client_idstring required

Id of the client

noncestring required

A random token used to prevent replay attacks (Cf. Signature v2 - Getnonce)

signaturestring required

Hash of params (Cf. Signature hash protocol).

mailingprefboolean required

Specifies if customer accepted Withings commercial contacts.

birthdateinteger required

Unix timestamp of user's birthdate

measuresunknown required

User measures (Cf. Measures model).

genderinteger required

0: man, 1: woman

preflangstring required

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_prefunknown required

Unit pref (cf. Unit preferences model).

emailunknown required

User's email address

timezoneunknown required

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

shortnamestring required

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).

external_idstring required

Unique identifier used by the partner to identify the end-user.

orderunknown required

Refer to Order model. The maximum number of orders is 10 per API request.

firstnamestring

User's firstname (if not set, will take the same value as shortname)

lastnamestring

User's lastname (if not set, will take the same value as shortname)

phonenumberstring

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_codestring

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.

goalsunknown

Goals (cf. Goals model).

testmodeinteger

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)

statusinteger

Response status. See <a href='#tag/response_status'>Status</a> section for details.

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.