POST login/users/:user id/mac addresses

From Social ID Developers
(Difference between revisions)
Jump to: navigation, search
 
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
#REDIRECT [[POST login/users/:user id/mac addresses PT-BR]]
+
{{DISPLAYTITLE:POST login/users/:user id/mac addresses}}
 +
== 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 ===
 +
 
 +
{|
 +
! align="left" width="200px" | user_id
 +
| width="200px" | required
 +
| user identifier.
 +
|}
 +
 
 +
=== JSON Parameters ===
 +
 
 +
{|
 +
! align="left" width="200px" | mac_address
 +
| width="200px" | 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 ===
 +
 
 +
{|
 +
! align="left" width="200px" | created (201)
 +
| The mac address was created successfully and associated with the user.
 +
|-
 +
! align="left" width="200px" | ok (200)
 +
| The mac address had already been associated with a user.
 +
|-
 +
! align="left" width="200px" | bad_request (400)
 +
| The parameter "mac_address" was not informed.
 +
|-
 +
! align="left" width="200px" | unauthorized (401)
 +
| The authentication is wrong. See [[Authentication]].
 +
|-
 +
! align="left" width="200px" | unprocessable_entity (422)
 +
| Validation error in the field "mac_address".
 +
|-
 +
! align="left" width="200px" | 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

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
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox