POST login/users/:user id/mac addresses

(Difference between revisions)
Jump to: navigation, search
(Response Status)
(Response Status)
Line 39: Line 39:
 
|-
 
|-
 
! align="left" width="200px" | ok (200)
 
! align="left" width="200px" | ok (200)
| The mac address had already been associated with the user.
+
| The mac address had already been associated with a user.
 
|-
 
|-
 
! align="left" width="200px" | bad_request (400)
 
! align="left" width="200px" | bad_request (400)

Revision as of 18:54, 23 May 2017

Contents

Description

Creates a new mac address associated with an user.

Resource URL

  POST https://api.socialidnow.com/v1/marketing/login/users/:user_id/mac_addresses

Parameters

URL Parameters

user_id required user identifier.

JSON Parameters

mac_address required mac_address formatted as a string with 6 pairs of hexadecimal numbers (uppercase or lowercase) joined by ":" or "-".

Authentication

This API requires Social Login App authentication. See Authentication.

Response

Response Status

created (201) The mac address was created successfully and associated with the user.
ok (200) The mac address had already been associated with a user.
bad_request (400) The parameter "mac_address" was not informed.
unauthorized (401) The authentication is wrong. See Authentication.
forbidden (403) The user does not belong to the Social Login App.
unprocessable_entity (422) Validation error in the field "mac_address".
internal_server_error (500) An unknown error happened.

Examples

Request

Creates a new mac address with value "0a:1b:2c:3d:4e:5f" and associates it with the user "180".

curl -iX POST 'https://api.socialidnow.com/v1/marketing/login/users/180/mac_addresses' \
 -d '{"mac_address": "0a:1b:2c:3d:4e:5f" }' \
 -H 'Content-type: application/json' \
 --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf

Response

Response Headers

HTTP/1.1 201 Created
Status: 201
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox