Back

Search

Search

Methods

Inventory

Orders

Auth /GetApplicationProfileBySecretKey

Response: ApplicationProfileResponse



Returns current application subscription profile information for a given application for a specific user.
You can use this method to get the current application subscription after AuthorizedByApplication returned a session.
The session will contain Id, this is the UserId you need to supply in the call.
If there are no current subscriptions for the application for the user. The method will return null (nothing)

Parameters

NameTypeDescription
applicationIdGuidYour application Id
applicationSecretGuidYour application secret key
userIdGuidUser Id (Id field of the session)

HTTP Endpoint

Server /Auth / GetApplicationProfileBySecretKey

Permissions


Example Code

Example Request

The following request format is required for this method.

POST https://api.linnworks.net//api/Auth/GetApplicationProfileBySecretKey HTTP/1.1
Host: api.linnworks.net
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
Origin: https://www.linnworks.net
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.linnworks.net/
Accept-Encoding: gzip, deflate


applicationId=4a43494e-c1b6-49de-ba67-3d69e1bba82f&applicationSecret=71d033b3-8007-47e3-9e65-09162ef8e44e&userId=f414dec5-258e-4558-bc51-cfaba2bb0c26

Response

This is an example response. Results may vary depending on your data.

{
  "PlanTag": "sample string 1",
  "PlanName": "sample string 2",
  "ActivationDate": "2018-02-19T16:57:09.7680927+00:00",
  "LastPaymentDate": "2018-02-19T16:57:09.7680927+00:00",
  "NextPaymentDate": "2018-02-19T16:57:09.7680927+00:00",
  "ProfileExpires": "2018-02-19T16:57:09.7680927+00:00",
  "IsProfileActive": true
}