Subscription API
This document is currently being revised
Subscription Panel application loads.
User clicks on either landing or the Subscription Panel calls GET
/Offers. SendsofferGroupIdand postal code to fetch details.Subscription Panel then calls POST
/subscriptionCostto fetch current taxes and cost.Subscription Panel calls GET
/userto check whether the user already exists. If the user does not already exist, it calls creates the user via POST/user.User enters the address information. Then, Subscription Panel calls GET/address/standardization to standardize the current address.
Subscription Panel calls POST
/Subscriptions/ActiveCheckto check whether this user already has an active subscription. If an active subscription exists, it returns an error.Subscription Panel renders iframe with the edgil Javascript, which in turn calls:
POST/
Billing/PaymentSession/StartPaymentSession- opens the iframe and generates a tokenPOST
/Billing/PaymentSession/EndPaymentSession- saves credit card information and payment system
User clicks submit in Subscription Panel, and the Subscription Panel calls POST
/Subscriptionsto create the new subscription.
Offers
Parameters
Parameter Type
Parameter
Data Type
Required?
Description
Header
X-MediaGroupCode
string
Y
Code that designates the circulation system.
Header
X-ClientCode
string
Y
Code that designates the client.
Header
X-PaperCode
string
Y
Code that designates the newspaper.
Header
X-SourceSystem
string
Y
Code that designates the application.
Header
Authorization
string
Y
Authorization token.
Header
X-RequestId
integer
Y
Defines where to look for the user. 1 = User Provider; 2 = Naviga's database; 0 User provider and Naviga's database (recommended)
Query string
postalCode
integer
Y
Postal code
Query string
request.offerGroupId
integer
Y
Offer Group ID
Request example
The following is a cURL request example:
Response example
The following is a json example response from the /Offers endpoint.
Subscription cost
Parameters
Parameter Type
Parameter
Data Type
Required?
Description
Header
X-MediaGroupCode
string
Y
Code that designates the circulation system.
Header
X-ClientCode
string
Y
Code that designates the client.
Header
X-PaperCode
string
Y
Code that designates the newspaper.
Header
X-SourceSystem
string
Y
Code that designates the application.
Header
Authorization
string
Y
Authorization token.
Header
X-RequestId
integer
Y
Defines where to look for the user. 1 = User Provider; 2 = Naviga's database; 0 User provider and Naviga's database (recommended)
Request body
integer
Y
JSON object (see request example below).
Request example
The following is a cURL request example:
Response example
The following is a json example response from the Subscriptions/Cost endpoint:
User information
Parameters
Parameter Type
Parameter
Data Type
Required?
Description
Header
X-MediaGroupCode
string
Y
Code that designates the circulation system.
Header
X-ClientCode
string
Y
Code that designates the client.
Header
X-PaperCode
string
Y
Code that designates the newspaper.
Header
X-SourceSystem
string
Y
Code that designates the application.
Header
Authorization
string
Y
Authorization token.
Header
X-RequestId
integer
Y
Defines where to look for the user. 1 = User Provider; 2 = Naviga's database; 0 User provider and Naviga's database (recommended)
Query string
request.email
string
Y
Email address that is checked.
Query string
request.onlyActive
boolean
Y
If TRUE, only checks active subscriptions. If FALSE, checks both active and inactive subscriptions.
Request
The following is a cURL request example:
Response
The following is a json example response from the /user endpoint:
Create user
Parameters
Parameter Type
Parameter
Data Type
Required?
Description
Header
X-MediaGroupCode
string
Y
Code that designates the circulation system.
Header
X-ClientCode
string
Y
Code that designates the client.
Header
X-PaperCode
string
Y
Code that designates the newspaper.
Header
X-SourceSystem
string
Y
Code that designates the application.
Header
Authorization
string
Y
Authorization token.
Header
X-RequestId
integer
Y
Defines where to look for the user. 1 = User Provider; 2 = Naviga's database; 0 User provider and Naviga's database (recommended)
Request body
integer
Y
JSON object (see request example below).
Request example
The following is a cURL request example:
Response example
The following is a json example response from the /User endpoint:
Address standardization
Parameters
Parameter Type
Parameter
Data Type
Required?
Description
Header
X-MediaGroupCode
string
Y
Code that designates the circulation system.
Header
X-ClientCode
string
Y
Code that designates the client.
Header
X-PaperCode
string
Y
Code that designates the newspaper.
Header
X-SourceSystem
string
Y
Code that designates the application.
Header
Authorization
string
Y
Authorization token.
Header
X-RequestId
integer
Y
Defines where to look for the user. 1 = User Provider; 2 = Naviga's database; 0 User provider and Naviga's database (recommended)
Query string
request.address.address
string
Y
Street address that is checked.
Query string
request.city
string
Y
City of address that is checked.
Query string
request.state
string
Y
State of address that is checked.
Query string
request.postalCode
number
Y
Postal code of address that is checked.
Request example
The following is a cURL request example:
Response example
The following is a json example response from the /Address/Standardization endpoint:
Active check
Parameters
Parameter Type
Parameter
Data Type
Required?
Description
Header
X-MediaGroupCode
string
Y
Code that designates the circulation system.
Header
X-ClientCode
string
Y
Code that designates the client.
Header
X-PaperCode
string
Y
Code that designates the newspaper.
Header
X-SourceSystem
string
Y
Code that designates the application.
Header
Authorization
string
Y
Authorization token.
Header
X-RequestId
integer
Y
Defines where to look for the user. 1 = User Provider; 2 = Naviga's database; 0 User provider and Naviga's database (recommended)
Request body
integer
Y
JSON object (see request example below).
Request example
The following is a cURL request example:
Response example
The following is a json example response from the Subscriptions/ActiveCheck endpoint:
Start payment session
Parameters
Parameter Type
Parameter
Data Type
Required?
Description
Header
X-MediaGroupCode
string
Y
Code that designates the circulation system.
Header
X-ClientCode
string
Y
Code that designates the client.
Header
X-PaperCode
string
Y
Code that designates the newspaper.
Header
X-SourceSystem
string
Y
Code that designates the application.
Header
Authorization
string
Y
Authorization token.
Header
X-RequestId
integer
Y
Defines where to look for the user. 1 = User Provider; 2 = Naviga's database; 0 User provider and Naviga's database (recommended)
Request body
integer
Y
JSON object (see request example below).
Request example
The following is a cURL request example:
Response example
The following is a json example response from the /Billing/PaymentSession/StartPaymentSession endpoint:
End payment session
Parameters
Parameter Type
Parameter
Data Type
Required?
Description
Header
X-MediaGroupCode
string
Y
Code that designates the circulation system.
Header
X-ClientCode
string
Y
Code that designates the client.
Header
X-PaperCode
string
Y
Code that designates the newspaper.
Header
X-SourceSystem
string
Y
Code that designates the application.
Header
Authorization
string
Y
Authorization token.
Header
X-RequestId
integer
Y
Defines where to look for the user. 1 = User Provider; 2 = Naviga's database; 0 User provider and Naviga's database (recommended)
Request body
integer
Y
JSON object (see request example below).
Request example
The following is a cURL request example:
Response example
The following is a json example response from the /Billing/PaymentSession/EndPaymentSession endpoint:
Create subscription
Parameters
Parameter Type
Parameter
Data Type
Required?
Description
Header
X-MediaGroupCode
string
Y
Code that designates the circulation system.
Header
X-ClientCode
string
Y
Code that designates the client.
Header
X-PaperCode
string
Y
Code that designates the newspaper.
Header
X-SourceSystem
string
Y
Code that designates the application.
Header
Authorization
string
Y
Authorization token.
Header
X-RequestId
integer
Y
Defines where to look for the user. 1 = User Provider; 2 = Naviga's database; 0 User provider and Naviga's database (recommended)
Request body
integer
Y
JSON object (see request example below).
Request example
The following is a cURL request example:
Response example
The following is a json example response from the /Subscriptions endpoint:
Last updated
Was this helpful?