POST login/users/:user id/mac addresses
From Social ID Developers
(Difference between revisions)
(→Response Status) |
|||
(2 intermediate revisions by one user not shown) | |||
Line 28: | Line 28: | ||
== Authentication == | == Authentication == | ||
− | This API requires | + | This API requires Login App authentication. See [[Authentication]]. |
== Response == | == Response == | ||
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 mac address had already been associated with a user. |
|- | |- | ||
! align="left" width="200px" | bad_request (400) | ! align="left" width="200px" | bad_request (400) | ||
Line 46: | Line 46: | ||
! align="left" width="200px" | unauthorized (401) | ! align="left" width="200px" | unauthorized (401) | ||
| The authentication is wrong. See [[Authentication]]. | | The authentication is wrong. See [[Authentication]]. | ||
− | |||
− | |||
− | |||
|- | |- | ||
! align="left" width="200px" | unprocessable_entity (422) | ! align="left" width="200px" | unprocessable_entity (422) |
Latest revision as of 16:50, 30 December 2021
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 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. |
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