Documentation Sweet Pricing API

GET / users / :userId

This endpoint gets the details and settings for an existing user. It includes email, name, phone number and last password change date.

URL

https://api.sweetpricing.com/v1.0/users/:userId

Header

Field Type Description
Authorization String

Header of form api-key <API key>

Authorization: api-key <API Key>

Parameters

Field Type Description
:userId Number

ID of the user.

200

Field Type Description
id Number

ID of the user.

created String

ISO 8601 date of account creation.

email String

Email address of user.

passwordLastChanged String

ISO 8601 date password last changed.

firstName String

User's first name.

lastName String

User's last name.

subscribeWelcome Boolean

Email preference

subscribeBlog Boolean

Email preference

subscribeHowto Boolean

Email preference

subscribeOnboarding Boolean

Email preference

phoneCountry Object
phoneCountry.id Number

ID of the phone country.

phoneCountry.name String

Name of the country code.

phoneCountry.dialCode String

Dial code for the country.

phoneNumber String

User's phone number.

phoneExtension Mixed

String|null. User's phone extension.

timezone String

User's timezone.

{
	"id": 1,
	"created": "2016-02-17T16:40:06+00:00",
	"email": "test@example.com",
	"passwordLastChanged": "2016-02-17T16:40:06+00:00",
	"firstName": "Joe",
	"lastName": "Bloggs",
	"phoneCountry": {
		"id": 1,
		"name": "United Kingdom (+44)",
		"dialCode": "+44"
	},
	"phoneNumber": "7000000000",
	"subscribeWelcome": true,
	"subscribeBlog": true,
	"subscribeHowto": true,
	"subscribeOnboarding": true,
	"timezone": "Europe/London"
}

401

Name Description
401

You are not authenticated to perform the request.

403

Name Description
403

You are not allowed to view/modify this resource.

404

Name Description
404

Resource not found.