Vous êtes sur la page 1sur 7

Strictly Confidential - CWS

Crownit Web Services


API

GoldVip Technology Solutions:


3rd Floor, Time Square Building , Sector 28 Gurgaon, 122002 India

Crownit Web Services


0

Strictly Confidential - CWS

Table of Contents:
OVERVIEW
1.
2.
3.
4.

Listing Available entities


Get Entity Details
Block Entity
Purchase Entity

Crownit Web Services


1

Strictly Confidential - CWS

OVERVIEW
This document describes the steps for technical integration process between client website and
CrownIt Web Services Apis for enabling online transactions. This document is covered in Single
section for all Apis

SECTION : CWS(Crownit Web Services) Apis


Please Collect your Client Id and Client Secret before using below set of Apis.
Common Request Headers
{
Content-Type:application/json,
Authorization: Basic base 64 encoding of ('client_id:client_secret')
}
Dev url: https://cws-dev.crownit.in

1. Listing Available entities(e.g. amazon vouchers, PVR vouchers etc)


URL: /entities/listing
Method: Get
There will be an image url in response of this Api. Image Size will be 800 X 350
Response 1:
{
"responseCode":1,
"errorMessage":"",
"response":{
"entities":[
{
"entity_id":26410,
"name":"PVR Delhi NCR",
"image":"http://outletimages.crownit.in/PVR.jpg"
},
{
"entity_id":24236,
"name":"Flipkart Gurgaon",
"image":"http://outletimages.crownit.in/PVR.jpg"
},
Crownit Web Services
2

Strictly Confidential - CWS

{
"entity_id":26257,
"name":"Flipkart",
"image":"http://outletimages.crownit.in/PVR.jpg"
}
]
}
}
Response 2:
{ responseCode:0, errorMessage: Some error }

2. Get Entity Details


Url : /entity/:id
Where id is the ID of the entity sent the API#1
E.g. /entity/26410

Method: Get
Response 1:
{
"responseCode":1,
"errorMessage":"",
"response":{
"packages":[
{
"name":"MovieTimeoutSale",
"price":100,
"type":135
}
]
}
}

Response 2:
{
"responseCode":0,
"errorMessage":"Some Error"
}
3. Block Entity
Crownit Web Services
3

Strictly Confidential - CWS

Url: /entity/block
Method: POST
Request:
{
"client_id" : 9283,
merchant_txn_id:<tnx id generated on client side>,
userDetails : { name:Akash Kansal, email:kansal.akash@gmail.com,
phone:9186464463 },
packages: [
{ count:2, type: 35, amount: 500} ,
{ count:1, type:36, amount:1000}
]
}
Response1: {
"responseCode": 1,
"errorMessage": "",
"result": {
"message": "Voucher blocked successfully",
"txnId": "7822a14c-4cf6-11e6-80b8-06c5bbdf6543"
}
}
Response 2: {
"responseCode": 0,
"errorMessage": "Some Error",
}

4. Purchase Entity
Url: /entity/purchase
Method: POST
Request
{
"txn_id": "54f396d9-49dc-11e6-afd8-06c5bbdf6543"
merchant_txn_id:<tnx id generated on client side>
}
Response 1:
Crownit Web Services
4

Strictly Confidential - CWS

{
"responseCode": 1,
"errorMessage": "",
"result": [
{
"voucher_code": "MyhJS0l94X8rjl064bgfa",
"voucher_key": "79757",
"voucher_value": 500,
"expiry_date": "2015-10-30"
}
]
}
Response 2: {
"responseCode": 0,
"errorMessage": "Some Error",
}
5. Track Transaction
URL : /transaction/:txnId
Method : GET

Response 1:
{
"responseCode": 1,
errorMessage :
response:SUCCESS
}
Response 2:
{
"responseCode": 1,
errorMessage :
response:PENDING
}
Response 3:
{
"responseCode": 1,
errorMessage :
Crownit Web Services
5

Strictly Confidential - CWS

response:BLOCKED
}
Response 4:
{ "responseCode": 0,errorMessage: Some error }

Crownit Web Services


6

Vous aimerez peut-être aussi