POST login/users/:user id/mac addresses
From Social ID Developers
Revision as of 00:08, 4 November 2014 by Gabriel.prado (Talk | contribs)
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 the user. |
bad_request (400) | The parameter "mac_address" was not informed. |
unauthorized (401) | The authentication is wrong. See Authentication. |
unprocessable_entity (422) | Validation error in the field "mac_address". |
forbidden (403) | The user does not belong to the Social Login App. |
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