Documentation Sweet Pricing API

POST / sessions

This endpoint creates a new session with an email address and password. You must pass the returned token to any endpoints that require authentication.

URL

https://api.sweetpricing.com/v1.0/sessions

Body

Field Type Description
email String

Email address

Size: ..255

password String

Password

{
	"email": "test@example.com",
	"password": "p@$$w0rd"
}

200

Field Type Description
id Number

Session ID (not used for authentication)

created String

ISO 8601 date of session creation.

token String

Session Key

Size: 32

clientId Mixed

Number|null ID of the client that session corresponds to.

userId Mixed

Number|null ID of the user that session corresponds to.

endDate Mixed

String|null ISO 8601 date of session expiration.

{
	"created": "2016-02-17T16:40:06+00:00",
	"token": "1c6c82356fb8ee322502bc0cfb1da647",
	"clientId": 1,
	"userId": 1,
	"endDate": "2016-02-18T16:40:06+00:00"
}

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.