You are on page 1of 9

{

"swagger": "2.0",
"info": {
"description": "The initial implementation (v1.0) of the wall to wall count
service will respond with the list of the wall to wall counts as per the search
criteria provided in the query parameters.\n",
"version": "1.0.0",
"title": "Wall-to-wall-count v1 Service",
"contact": {
"name": "nishant.1.verma@morrisonsplc.co.uk"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"host": "api.morrisons.com",
"basePath": "/walltowallcount/v1",
"schemes": [
"http"
],
"paths": {
"/counts": {
"get": {
"tags": [
"Wall to wall count V1 API"
],
"summary": "Counts service will provide Wall to wall count list",
"description": "Retrieve all wall to wall counts for the given
criteria.",
"operationId": "getCounts",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "apikey",
"description": "Application identifying api key. This is
required by Apigee.",
"required": true,
"type": "string"
},
{
"in": "header",
"name": "authorization",
"description": "Basic authorization access",
"required": true,
"type": "string"
},
{
"name": "countid[since]",
"in": "query",
"description": "Use last count Id Processed as
high-water mark to find all count data since the event id",
"required": false,
"type": "string"
},
{
"name": "storeid",
"in": "query",
"description": "Use store Id to find all count
data for a store.",
"required": false,
"type": "string"
},
{
"name": "countstartdate",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "countenddate",
"in": "query",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Ok",
"schema": {
"$ref": "#/definitions/WalltowallcountList"
}
},
"202": {
"description": "Accepted"
},
"400": {
"description": "Bad request."
},
"401": {
"description": "Authorization information is missing or
invalid."
},
"404": {
"description": "No Data found",
"schema": {
"$ref": "#/definitions/404ResponseJson"
}
},
"500": {
"description": "Unexpected error.",
"schema": {
"$ref": "#/definitions/500ResponseJson"
}
}
},
"security": [
{
"api_key": []
}
]
}
},
"/schedules": {
"get": {
"tags": [
"Wall to wall count schedule V1 API"
],
"summary": "Wall to wall count schedule will provide a list
stores",
"description": "Retrieve all the stores from wall to wall count
database for the given criteria.",
"operationId": "getSchedules",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "apikey",
"description": "Application identifying api key. This is
required by Apigee.",
"required": true,
"type": "string"
},
{
"in": "header",
"name": "authorization",
"description": "Basic authorization access",
"required": true,
"type": "string"
},
{
"name": "storeid",
"in": "query",
"description": "Use store Id to find all wall
to wall count schedule for a store.",
"required": false,
"type": "string"
},
{
"name": "schedulestartdate",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "scheduleenddate",
"in": "query",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Ok",
"schema": {
"$ref": "#/definitions/WalltowallcountScheduleList"
}
},
"202": {
"description": "Accepted"
},
"400": {
"description": "Bad request."
},
"401": {
"description": "Authorization information is missing or
invalid."
},
"404": {
"description": "No Data found",
"schema": {
"$ref": "#/definitions/404ResponseJson"
}
},
"500": {
"description": "Unexpected error.",
"schema": {
"$ref": "#/definitions/500ResponseJson"
}
}
},
"security": [
{
"api_key": []
}
]
},
"post": {
"tags": [
"Wall to wall count schedule V1 API"
],
"summary": "This service helps to create a Wall to wall count
schedule for a location",
"description": "Create a schedule for wall to wall count.",
"operationId": "postSchedule",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"in": "query",
"name": "apikey",
"description": "Application identifying api key. This is
required by Apigee.",
"required": true,
"type": "string"
},
{
"in": "header",
"name": "authorization",
"description": "Basic authorization access",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "Request body",
"description": "request body for the resources",
"required": true,
"schema": {
"$ref": "#/definitions/WalltowallcountScheduleRequest"
}
}
],
"responses": {
"200": {
"description": "Ok",
"schema": {
"$ref": "#/definitions/WalltowallcountSchedule"
}
},
"202": {
"description": "Accepted"
},
"400": {
"description": "Bad request."
},
"401": {
"description": "Authorization information is missing or
invalid."
},
"404": {
"description": "No Data found",
"schema": {
"$ref": "#/definitions/404ResponseJson"
}
},
"500": {
"description": "Unexpected error.",
"schema": {
"$ref": "#/definitions/500ResponseJson"
}
}
},
"security": [
{
"api_key": []
}
]
}
}
},
"securityDefinitions": {
"api_key": {
"type": "apiKey",
"name": "apikey",
"description": "Simple API key as a query parameter. Will be moved to
header at a future",
"in": "query"
}
},
"definitions": {
"WalltowallcountList": {
"type": "object",
"required": [
"counts"
],
"properties": {
"counts": {
"type": "array",
"description": "counts",
"items": {
"$ref": "#/definitions/Walltowallcount"
}
}
}
},
"Walltowallcount": {
"type": "object",
"properties": {
"wall_to_wall_count_id": {
"type": "string"
},
"store_id": {
"type": "string"
},
"productNo": {
"type": "string"
},
"quantity": {
"type": "string"
},
"date": {
"type": "string",
"format": "date-time"
}
}
},
"WalltowallcountScheduleList": {
"type": "object",
"required": [
"schedules"
],
"properties": {
"schedules": {
"type": "array",
"description": "schedules",
"items": {
"$ref": "#/definitions/WalltowallcountSchedule"
}
}
}
},
"WalltowallcountSchedule": {
"type": "object",
"properties": {
"schedule_id": {
"type": "string"
},
"store_id": {
"type": "string"
},
"scheduleDate": {
"type": "string",
"format": "date-time"
}
}
},
"WalltowallcountScheduleRequest": {
"properties": {
"schedule_date": {
"type": "string"
},
"store_id": {
"type": "string"
}
}
},
"404ResponseJson": {
"type": "object",
"properties": {
"httpResponseCode": {
"type": "string",
"example": "404"
},
"errorCode": {
"type": "string",
"example": "404.62.001"
},
"errorMessage": {
"type": "string",
"example": "No data found"
},
"errorMoreInfo": {
"type": "string",
"example": "http://developer.morrisons.com/docs/errors"
}
}
},
"500ResponseJson": {
"type": "object",
"properties": {
"httpResponseCode": {
"type": "string",
"example": "500"
},
"errorCode": {
"type": "string",
"example": "500.62.001"
},
"errorMessage": {
"type": "string",
"example": "Unexpected Error"
},
"errorMoreInfo": {
"type": "string",
"example": "http://developer.morrisons.com/docs/errors"
}
}
},
"404ResponseEventJson": {
"type": "object",
"properties": {
"httpResponseCode": {
"type": "string",
"example": "404"
},
"errorCode": {
"type": "string",
"example": "404.62.001"
},
"errorMessage": {
"type": "string",
"example": "No records found for Item ####"
},
"errorMoreInfo": {
"type": "string",
"example": "http://developer.morrisons.com/docs/errors"
}
}
},
"409ResponseJson": {
"type": "object",
"properties": {
"httpResponseCode": {
"type": "string",
"example": "409"
},
"errorCode": {
"type": "string",
"example": "409.62.001"
},
"errorMessage": {
"type": "string",
"example": "Duplicate data connot be inserted."
},
"errorMoreInfo": {
"type": "string",
"example": "http://developer.morrisons.com/docs/errors"
}
}
},
"201ScheduleResponseJson": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Item Cost created or updated successfully"
}
}
},
"201CountResponseJson": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Item Cost created or updated successfully"
}
}
}
}
}

You might also like