openapi: 3.0.3 info: version: '2.0' title: Withings developer documentation answers dropshipment API description: These webservices allows you to get user's answers from surveys servers: - url: https://wbsapi.withings.net/ tags: - name: dropshipment x-displayName: Dropshipment description: 'The following services are part of the Logistics APIs. Refer to [this section](/developer-guide/v3/integration-guide/dropship-only/logistics-api/overview-create-order) for more information. The Logistics APIs allows partners to dropship devices directly to their program members. **Important**: To receive automatic notification on order status, please fill a dropshipment notify URI for your API application in your [Developer Dashboard](https://developer.withings.com/dashboard/).' paths: https://wbsapi.withings.net/v2/dropshipment: post: tags: - dropshipment description: 'Creates a dropshipment order. If one of the orders has an invalid address, none of the orders will be created. *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.* *Do not use this service if you''re integrating Withings Cellular Solutions with dropshipment. In that case, please use the createuserorder action*' summary: Dropshipment v2 - Createorder operationId: dropshipmentv2-createorder parameters: - name: action in: query required: true schema: type: string description: Service action name. Must take the string value ```createorder```. - name: client_id in: query required: true schema: type: string description: Id of the client - name: nonce in: query required: true schema: type: string description: A random token used to prevent replay attacks (Cf. [Signature v2 - Getnonce](#operation/signaturev2-getnonce)) - name: signature in: query required: true schema: type: string description: Hash of params (Cf. [Signature hash protocol](/developer-guide/v3/get-access/sign-your-requests)). - name: order in: query required: true schema: type: json_array description: Refer to [Order model](#tag/models/Order). The maximum number of orders is 10 per API request. - name: customerid in: query required: false schema: type: string description: Your dropshipment billing ID. If you don't know it, ignore this parameter. - name: testmode in: query required: false schema: type: integer description: 'If is set, it will create fake orders, and simulate the evolution of the orders status and sending of notifications.
```1```: ```SHIPPED``` sequence
```2```: ```TRASHED``` sequence
```3```: ```FAILED``` sequence
```4```: ```BACKHOLD``` sequence' - name: platformid in: query required: false schema: type: id16 description: The platform ID responses: 200: description: ' (Click to unfold)' content: application/json: schema: type: object properties: status: type: integer description: Response status. See Status section for details. body: type: object description: Response data. properties: orders: type: array description: List of created orders. *(Only if orders were successfully created)* items: $ref: '#/components/schemas/dropshipment_create_order_object' dropshipmentorderid: type: string description: Unique identifier of the dropshipment order. example: '4874687' invalid_address_customer_ref_ids: type: array description: References of the orders with invalid address. *(Only if at least one order has an invalid address)* items: type: string examples: OK: value: status: 0 body: orders: - order_id: D12345678 customer_ref_id: MOUVEMENTREFERENCE12345678 status: VERIFIED products: - ean: '3700546702518' quantity: 3 dropshipmentorderid: '4874687' AddressError: value: status: 503 body: invalid_address_customer_ref_ids: - MOUVEMENTREFERENCE12345678 x-codeSamples: - lang: PHP source: " 'createorder',\n\t'client_id' => 'client_id',\n\t'nonce' => 'string',\n\t'signature' => 'signature',\n\t'order' => 'order',\n\t'customerid' => 'customerid',\n\t'testmode' => 0,\n\t'platformid' => 'id16'\n]));\n\n$rsp = curl_exec($ch);\ncurl_close($ch);\n\nvar_dump($rsp);\n\n?>" - lang: CURL source: curl --data "action=createorder&client_id=client_id&nonce=string&signature=signature&order=order&customerid=customerid&testmode=0&platformid=id16" 'https://wbsapi.withings.net/v2/dropshipment' 'https://wbsapi.withings.net/v2/dropshipment ': post: tags: - dropshipment description: '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](/developer-guide/v3/integration-guide/dropship-cellular/get-access/access-and-refresh-tokens) 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.*' summary: Dropshipment v2 - Createuserorder operationId: dropshipmentv2-createuserorder parameters: - name: action in: query required: true schema: type: string description: Service action name. Must take the string value ```createuserorder```. - name: client_id in: query required: true schema: type: string description: Id of the client - name: nonce in: query required: true schema: type: string description: A random token used to prevent replay attacks (Cf. [Signature v2 - Getnonce](#operation/signaturev2-getnonce)) - name: signature in: query required: true schema: type: string description: Hash of params (Cf. [Signature hash protocol](/developer-guide/v3/get-access/sign-your-requests)). - name: mailingpref in: query required: true schema: type: boolean description: Specifies if customer accepted Withings commercial contacts. - name: birthdate in: query required: true schema: type: integer description: Unix timestamp of user's birthdate - name: measures in: query required: true schema: type: json_string description: User measures (Cf. [Measures](#tag/models/Measures) model). - name: gender in: query required: true schema: type: integer description: '0: man, 1: woman' - name: preflang in: query required: true schema: type: string description: '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' - name: unit_pref in: query required: true schema: type: json description: Unit pref (cf. [Unit preferences](#tag/models/Unit-preferences) model). - name: email in: query required: true schema: type: email description: User's email address - name: timezone in: query required: true schema: type: timezone description: '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' - name: shortname in: query required: true schema: type: string description: '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.
Shortname must respect the following regex: /^[a-zA-Z0-9]{3}$/ (either letters or numbers, special characters and spaces are not allowed).' - name: external_id in: query required: true schema: type: string description: Unique identifier used by the partner to identify the end-user. - name: order in: query required: true schema: type: json_array description: Refer to [Order model](#tag/models/Order). The maximum number of orders is 10 per API request. - name: firstname in: query required: false schema: type: string description: User's firstname (if not set, will take the same value as shortname) - name: lastname in: query required: false schema: type: string description: User's lastname (if not set, will take the same value as shortname) - name: phonenumber in: query required: false schema: type: string description: 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) - name: recovery_code in: query required: false schema: type: string description: 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. - name: goals in: query required: false schema: type: json description: Goals (cf. [Goals](#tag/models/Goals) model). - name: testmode in: query required: false schema: type: integer description: 'If is set, it will create fake orders, and simulate the evolution of the orders status and sending of notifications.
```1```: ```SHIPPED``` sequence
```2```: ```TRASHED``` sequence
```3```: ```FAILED``` sequence
```4```: ```BACKHOLD``` sequence' responses: 200: description: ' (Click to unfold)' content: application/json: schema: type: object properties: status: type: integer description: Response status. See Status section for details. body: type: object description: Response data. properties: user: type: object properties: code: type: string description: Authorization Code that must be used to retrieve access_token and refresh_token. (Read the "Get access to your user's data" section of your [integration guide](/developer-guide/v3/withings-solutions/integration-guides) to learn more about how to get this parameter.) example: 490ed603fe9bd2ce10027bdba0c932069cd27085 external_id: type: string description: Unique identifier used by partner to identify the end-user. example: 3b7a6db0-ec7e-479b-9675-2a3d8d6a7e51 orders: type: array description: List of created orders. *(Only if orders were successfully created)* items: $ref: '#/components/schemas/dropshipment_create_order_object' dropshipmentorderid: type: string description: Unique identifier of the dropshipment order. example: '4874687' invalid_address_customer_ref_ids: type: array description: References of the orders with invalid address. *(Only if at least one order has an invalid address)* example: - MOUVEMENTREFERENCE12345678 items: type: string examples: OK: value: status: 0 body: user: code: 490ed603fe9bd2ce10027bdba0c932069cd27085 external_id: 3b7a6db0-ec7e-479b-9675-2a3d8d6a7e51 orders: - order_id: D12345678 customer_ref_id: MOUVEMENTREFERENCE12345678 status: VERIFIED products: - ean: '3700546702518' quantity: 3 dropshipmentorderid: '4874687' AddressError: value: status: 503 body: invalid_address_customer_ref_ids: - MOUVEMENTREFERENCE12345678 x-codeSamples: - lang: PHP source: " 'createuserorder',\n\t'client_id' => 'client_id',\n\t'nonce' => 'string',\n\t'signature' => 'signature',\n\t'mailingpref' => 'mailingpref',\n\t'birthdate' => 1563746400,\n\t'measures' => 'measures',\n\t'gender' => 'int',\n\t'preflang' => 'en_EN',\n\t'unit_pref' => 'unit_pref',\n\t'email' => 'email',\n\t'timezone' => 'Europe/Paris',\n\t'shortname' => 'shortname',\n\t'external_id' => 'external_id',\n\t'order' => 'order',\n\t'firstname' => 'firstname',\n\t'lastname' => 'lastname',\n\t'phonenumber' => 'string',\n\t'recovery_code' => 'string',\n\t'goals' => 'json',\n\t'testmode' => 0\n]));\n\n$rsp = curl_exec($ch);\ncurl_close($ch);\n\nvar_dump($rsp);\n\n?>" - lang: CURL source: curl --data "action=createuserorder&client_id=client_id&nonce=string&signature=signature&mailingpref=mailingpref&birthdate=1563746400&measures=measures&gender=int&preflang=en_EN&unit_pref=unit_pref&email=email&timezone=Europe/Paris&shortname=shortname&external_id=external_id&order=order&firstname=firstname&lastname=lastname&phonenumber=string&recovery_code=string&goals=json&testmode=0" 'https://wbsapi.withings.net/v2/dropshipment ' 'https://wbsapi.withings.net/v2/dropshipment ': post: tags: - dropshipment description: 'Cancels a dropshipment order. Only orders that haven''t been shipped can be cancelled. Note that there can be a latency between the shipping of the parcel and the update of the shipping status to *SHIPPED*. Trying to cancel an order that was already shipped will result in a error with error code 277. *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.*' summary: Dropshipment v2 - Delete operationId: dropshipmentv2-delete parameters: - name: action in: query required: true schema: type: string description: Service action name. Must take the string value ```delete```. - name: client_id in: query required: true schema: type: string description: Id of the client - name: signature in: query required: true schema: type: string description: Hash of params (Cf. [Signature hash protocol](/developer-guide/v3/get-access/sign-your-requests)). - name: nonce in: query required: true schema: type: string description: A random token used to prevent replay attacks (Cf. [Signature v2 - Getnonce](#operation/signaturev2-getnonce)) - name: order_id in: query required: true schema: type: string description: Withings generated identifier used to track your order. responses: 200: description: ' (Click to unfold)' content: application/json: schema: type: object properties: status: type: integer description: Response status. See Status section for details. body: type: object description: Response data. properties: [] x-codeSamples: - lang: PHP source: " 'delete',\n\t'client_id' => 'client_id',\n\t'signature' => 'signature',\n\t'nonce' => 'string',\n\t'order_id' => 'string'\n]));\n\n$rsp = curl_exec($ch);\ncurl_close($ch);\n\nvar_dump($rsp);\n\n?>" - lang: CURL source: curl --data "action=delete&client_id=client_id&signature=signature&nonce=string&order_id=string" 'https://wbsapi.withings.net/v2/dropshipment ' 'https://wbsapi.withings.net/v2/dropshipment ': post: tags: - dropshipment description: '**This service is deprecated. Please use [Order v2 - Getdetail instead](#operation/orderv2-getdetail)** Returns dropshipment order information. *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.*' summary: Dropshipment v2 - Getorderstatus operationId: dropshipmentv2-getorderstatus parameters: - name: action in: query required: true schema: type: string description: Service action name. Must take the string value ```getorderstatus```. - name: client_id in: query required: true schema: type: string description: Id of the client - name: signature in: query required: true schema: type: string description: Hash of params (Cf. [Signature hash protocol](/developer-guide/v3/get-access/sign-your-requests)). - name: nonce in: query required: true schema: type: string description: A random token used to prevent replay attacks (Cf. [Signature v2 - Getnonce](#operation/signaturev2-getnonce)) - name: order_ids in: query required: true schema: type: json description: 'DO NOT USE WITH FOLLOWING PARAMS: [customer_ref_ids]
List of order_id' - name: customer_ref_ids in: query required: true schema: type: json description: 'DO NOT USE WITH FOLLOWING PARAMS: [order_ids]
Movement reference number of dropshipment orderlines' - name: customerid in: query required: false schema: type: string description: Your dropshipment billing ID. If you don't know it, ignore this parameter. - name: enrich in: query required: false schema: type: pgboolean description: Enable advanced features if set to 't' responses: 200: description: ' (Click to unfold)' content: application/json: schema: type: object properties: status: type: integer description: Response status. See Status section for details. body: type: object description: Response data. properties: orders: type: array items: $ref: '#/components/schemas/dropshipment_get_order_status_object' x-codeSamples: - lang: PHP source: " 'getorderstatus',\n\t'client_id' => 'client_id',\n\t'signature' => 'signature',\n\t'nonce' => 'string',\n\t'order_ids' => 'json',\n\t'customer_ref_ids' => 'json',\n\t'customerid' => 'customerid',\n\t'enrich' => 'pgboolean'\n]));\n\n$rsp = curl_exec($ch);\ncurl_close($ch);\n\nvar_dump($rsp);\n\n?>" - lang: CURL source: curl --data "action=getorderstatus&client_id=client_id&signature=signature&nonce=string&order_ids=json&customer_ref_ids=json&customerid=customerid&enrich=pgboolean" 'https://wbsapi.withings.net/v2/dropshipment ' 'https://wbsapi.withings.net/v2/dropshipment ': post: tags: - dropshipment description: 'Updates a dropshipment order. *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.*' summary: Dropshipment v2 - Update operationId: dropshipmentv2-update parameters: - name: action in: query required: true schema: type: string description: Service action name. Must take the string value ```update```. - name: client_id in: query required: true schema: type: string description: Id of the client - name: signature in: query required: true schema: type: string description: Hash of params (Cf. [Signature hash protocol](/developer-guide/v3/get-access/sign-your-requests)). - name: nonce in: query required: true schema: type: string description: A random token used to prevent replay attacks (Cf. [Signature v2 - Getnonce](#operation/signaturev2-getnonce)) - name: order_id in: query required: true schema: type: string description: Withings generated identifier used to track your order. - name: order in: query required: true schema: type: json_array description: Refer to [Order model](#tag/models/Order). Restricted to one order only. responses: 200: description: ' (Click to unfold)' content: application/json: schema: type: object properties: status: type: integer description: Response status. See Status section for details. body: type: object description: Response data. properties: orders: type: array items: $ref: '#/components/schemas/dropshipment_create_order_object' x-codeSamples: - lang: PHP source: " 'update',\n\t'client_id' => 'client_id',\n\t'signature' => 'signature',\n\t'nonce' => 'string',\n\t'order_id' => 'string',\n\t'order' => 'order'\n]));\n\n$rsp = curl_exec($ch);\ncurl_close($ch);\n\nvar_dump($rsp);\n\n?>" - lang: CURL source: curl --data "action=update&client_id=client_id&signature=signature&nonce=string&order_id=string&order=order" 'https://wbsapi.withings.net/v2/dropshipment ' components: schemas: dropshipment_get_order_status_product_object: type: object properties: ean: type: string description: EAN of the product. example: '3700546702518' partner_ref: type: string example: REF-12345 devices: type: array items: $ref: '#/components/schemas/dropshipment_get_order_status_product_device_object' quantity: type: integer description: Quantity of products. example: 3 mac_addresses: type: array description: List of device MAC addresses. *(Only if order has been shipped)* example: - 00:24:e4:xx:xx:xx - 00:24:e4:xx:xx:xx - 00:24:e4:xx:xx:xx items: type: macaddress hash_deviceids: type: array example: - 892359876fd8805ac45bab078c4828692f0276b1 - a1b2c3d4e5f6 serial_numbers: type: array example: - SN-001122334455 - SN-001122334456 dropshipment_create_order_object: type: object properties: order_id: type: string description: Withings generated identifier used to track your order. example: D12345678 customer_ref_id: type: string description: Random identifier you must provide in input parameters. It is used to track your order and must be unique. example: MOUVEMENTREFERENCE12345678 dropshipmentorderid: type: string description: Unique identifier of the dropshipment order. example: '32948634' status: type: string description: 'Status of the order. Value can be: | Value| |---| |CREATED| |ADDRESS VERIFICATION| |ADDRESS ERROR| |VERIFIED| |PROCESSING| |FAILED| |OPEN| |SHIPPED| |TRASHED| |BACKHOLD| ' example: ADDRESS VERIFICATION products: type: array items: $ref: '#/components/schemas/dropshipment_create_order_product_object' dropshipment_get_order_status_object: type: object properties: order_id: type: string description: Withings generated identifier used to track your order. example: D12345678 customer_ref_id: type: string description: Random identifier you must provide in input parameters. It is used to track your order and must be unique. example: MOUVEMENTREFERENCE12345678 status: type: string description: 'Status of the order. Value can be: | Value| |---| |CREATED| |ADDRESS VERIFICATION| |ADDRESS ERROR| |VERIFIED| |PROCESSING| |FAILED| |OPEN| |SHIPPED| |TRASHED| |BACKHOLD| ' example: SHIPPED products: type: array items: $ref: '#/components/schemas/dropshipment_get_order_status_product_object' carrier: type: string description: Carrier. *(Only if order has been shipped)* example: UPS Parcel carrier_service: type: string description: Carrier service. *(Only if order has been shipped)* example: Next Day Air tracking_number: type: string description: Tracking number. *(Only if order has been shipped)* example: 1ZY1111111 parcel_status: type: string description: 'Status of the parcel. *(Only if order has been shipped)* Value can be: | Value| |---| |pending| |info_received| |in_transit| |failed_attempt| |exception| |delayed| |pickup| |delivered| |return| |expired| ' example: in_transit ship_date: type: string description: 'Date on which the order was shipped (format: YYYY-MM-DD).' example: '2024-03-15' is_replacement: type: boolean description: Indicates whether this order is a replacement for a previous order. original_customer_ref: type: string description: The customer reference of the original order this replacement was created for. example: MOUVEMENTREFERENCE00000001 dropshipment_get_order_status_product_device_object: type: object properties: serial_number: type: string description: Serial number of the device. example: 00:24:e4:xx:xx:xx mac_address: type: string description: Mac address of the device. example: 00:24:e4:xx:xx:xx hash_deviceid: type: string description: ID of the device. This ID is returned in other services to know which device tracked a data. Then device's model or type can be known using this information. example: 892359876fd8805ac45bab078c4828692f0276b1 model: type: string description: 'Device model. Value can be: | Value | Description| |---|---| |Withings WBS01 | Scale| |WS30 | Scale| |Kid Scale | Scale| |Smart Body Analyzer | Scale| |Body+ | Scale| |Body Cardio | Scale| |Body | Scale| |Body Scan | Scale| |Body Pro | Scale| |WBS10 | Scale| |WBS11 | Scale| |Body Comp | Scale| |Smart Baby Monitor | Babyphone| |Withings Home | Babyphone| |Withings Blood Pressure Monitor V1 | Blood Pressure Monitor| |Withings Blood Pressure Monitor V2 | Blood Pressure Monitor| |Withings Blood Pressure Monitor V3 | Blood Pressure Monitor| |BPM Core | Blood Pressure Monitor| |BPM Connect | Blood Pressure Monitor| |BPM Connect Pro | Blood Pressure Monitor| |BPM Pro 2 | Blood Pressure Monitor| |BPM Vision | Blood Pressure Monitor| |Pulse | Activity Tracker| |Activite | Activity Tracker| |Activite (Pop, Steel) | Activity Tracker| |Withings Go | Activity Tracker| |Activite Steel HR | Activity Tracker| |Activite Steel HR Sport Edition | Activity Tracker| |Pulse HR | Activity Tracker| |Move | Activity Tracker| |Move ECG | Activity Tracker| |ScanWatch | Activity Tracker| |ScanWatch 2 | Activity Tracker| |ScanWatch Light | Activity Tracker| |Aura Dock | Sleep Monitor| |Aura Sensor | Sleep Monitor| |Aura Sensor V2 | Sleep Monitor| |Thermo | Smart Connected Thermometer| |BeamO | Smart Connected Thermometer| |WUP01 | Gateway| |Iglucose glucometer | iGlucose| |iOS step tracker | HealthKit Apple| |HealthKit step iPhone tracker | HealthKit Apple| |HealthKit step Apple Watch tracker | HealthKit Apple| |HealthKit other step tracker | HealthKit Apple| |Android step tracker | HealthKit Google| |GoogleFit tracker | HealthKit Google| |Samsung Health tracker | HealthKit Google| |Google Health Connect | HealthKit Google| |Huawei tracker | HealthKit Huawei| |Lingo Sensor | Lingo| ' example: Pulse model_id: type: integer description: ' | Value | Description| |---|---| |1 | Withings WBS01| |2 | WS30| |3 | Kid Scale| |4 | Smart Body Analyzer| |5 | Body+| |6 | Body Cardio| |7 | Body| |10 | Body Scan| |9 | Body Pro| |11 | WBS10| |12 | WBS11| |18 | Body Comp| |21 | Smart Baby Monitor| |22 | Withings Home| |41 | Withings Blood Pressure Monitor V1| |42 | Withings Blood Pressure Monitor V2| |43 | Withings Blood Pressure Monitor V3| |44 | BPM Core| |45 | BPM Connect| |46 | BPM Connect Pro| |47 | BPM Pro 2| |48 | BPM Vision| |51 | Pulse| |52 | Activite| |53 | Activite (Pop, Steel)| |54 | Withings Go| |55 | Activite Steel HR| |59 | Activite Steel HR Sport Edition| |58 | Pulse HR| |90 | Move| |91 | Move ECG| |92 | Move ECG| |93 | ScanWatch| |94 | ScanWatch 2| |95 | ScanWatch Light| |60 | Aura Dock| |61 | Aura Sensor| |63 | Aura Sensor V2| |70 | Thermo| |71 | BeamO| |100 | WUP01| |1061 | Iglucose glucometer| |1051 | iOS step tracker| |1052 | iOS step tracker| |1057 | HealthKit step iPhone tracker| |1058 | HealthKit step Apple Watch tracker| |1059 | HealthKit other step tracker| |1053 | Android step tracker| |1054 | Android step tracker| |1055 | GoogleFit tracker| |1056 | Samsung Health tracker| |1060 | Google Health Connect| |1062 | Huawei tracker| |1063 | Lingo Sensor| ' example: 51 dropshipment_create_order_product_object: type: object properties: ean: type: string description: EAN of the product. example: '3700546702518' partner_ref: type: string example: REF-12345 quantity: type: integer description: Quantity of products. example: 3 x-tagGroups: - name: Api Reference Content tags: - oauth2 - dropshipment - order - user - measure - heart - stetho - sleep - notify - survey - answers - signature - rawdata - device - models - response_status - Glossary - nudge - nudgecampaign