Create a user address
POST {{baseUrl}}/api/users/:id/addresses
Create a new address for a specific user. You obtain the authorization token needed to execute the request using POST /auth/login; you pass the authorization token in the request header. You identify the user by specifying the user ID in the path of the request; you obtain the user ID using GET /users. You provide the information used to create the new user address in the body parameter of the request - including the name and actual value for the address, whether it is the default address, and the type of delivery and content style.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
fields | string | Comma-separated, top-level field whitelist that allows the client to selectively retrieve part of the response model. If specified, extra filtering is applied, and for top-level object (if root model is an array, each array element), only the listed fields are kept in the response. For example, "id,elements" keeps only the "id" field and whole "elements" array field, omitting all other fields in the top-level response model. |
Request Body
{"name"=>"email address", "value"=>"testuser@bigcompany.com", "deliveryMode"=>"EMAIL", "device"=>"GENERIC_EMAIL", "isDefault"=>true, "default"=>false}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-MSTR-AuthToken | string | (Required) Authorization token | |
Content-Type | string |