Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tysoncadenhead/bfd12019924b10af76a159446fd2c3b6 to your computer and use it in GitHub Desktop.
Save tysoncadenhead/bfd12019924b10af76a159446fd2c3b6 to your computer and use it in GitHub Desktop.
livesales-api
{
"swagger" : "2.0",
"info" : {
"version" : "1.0.0",
"title" : "LiveSales API",
"description" : "For our Square integration with LiveSales, we will need to provide a server-side endpoint to interface with the Beta Square Fulfillment API and to complete transactions."
},
"paths" : {
"/{citizenAppId}/categories" : {
"get" : {
"parameters" : [ {
"name" : "citizenAppId",
"in" : "path",
"description" : "ID of Citizen App",
"required" : true,
"type" : "string"
} ],
"responses" : {
"200" : {
"description" : "OK",
"schema" : {
"$ref" : "#/definitions/Categories"
}
},
"404" : {
"description" : "NOT FOUND"
}
}
}
},
"/{citizenAppId}/categories/{categoryId}/locations" : {
"get" : {
"parameters" : [ {
"name" : "citizenAppId",
"in" : "path",
"description" : "ID of Citizen App",
"required" : true,
"type" : "string"
}, {
"name" : "categoryId",
"in" : "path",
"description" : "ID of Category",
"required" : true,
"type" : "string"
} ],
"responses" : {
"200" : {
"description" : "OK",
"schema" : {
"$ref" : "#/definitions/Locations"
}
},
"404" : {
"description" : "NOT FOUND"
}
}
}
},
"/{citizenAppId}/categories/{categoryId}/locations/{locationId}/products" : {
"get" : {
"parameters" : [ {
"name" : "citizenAppId",
"in" : "path",
"description" : "ID of Citizen App",
"required" : true,
"type" : "string"
}, {
"name" : "categoryId",
"in" : "path",
"description" : "ID of Category",
"required" : true,
"type" : "string"
}, {
"name" : "locationId",
"in" : "path",
"description" : "ID of Location",
"required" : true,
"type" : "string"
} ],
"responses" : {
"200" : {
"description" : "OK",
"schema" : {
"$ref" : "#/definitions/Products"
}
},
"404" : {
"description" : "NOT FOUND"
}
}
}
},
"/{citizenAppId}/transaction" : {
"post" : {
"parameters" : [ {
"name" : "citizenAppId",
"in" : "path",
"description" : "ID of Citizen App",
"required" : true,
"type" : "string"
}, {
"in" : "body",
"name" : "body",
"required" : true,
"schema" : {
"$ref" : "#/definitions/Transaction"
}
} ],
"responses" : {
"200" : {
"description" : "OK",
"schema" : {
"$ref" : "#/definitions/TransactionResponse"
}
},
"403" : {
"description" : "FORBIDDEN"
}
}
}
},
"/{citizenAppId}/order" : {
"post" : {
"parameters" : [ {
"name" : "citizenAppId",
"in" : "path",
"description" : "ID of Citizen App",
"required" : true,
"type" : "string"
}, {
"in" : "body",
"name" : "body",
"required" : true,
"schema" : {
"$ref" : "#/definitions/Order"
}
} ],
"responses" : {
"200" : {
"description" : "OK",
"schema" : {
"$ref" : "#/definitions/Transaction"
}
},
"403" : {
"description" : "FORBIDDEN"
}
}
}
}
},
"definitions" : {
"Categories" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/Category"
}
},
"Category" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "integer"
},
"name" : {
"type" : "string"
},
"image" : {
"type" : "string"
}
}
},
"Locations" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/Location"
}
},
"Location" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"directions" : {
"type" : "string"
},
"alertText" : {
"type" : "string"
},
"estimatedTime" : {
"type" : "string"
}
}
},
"Product" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "string"
},
"name" : {
"type" : "string"
},
"price" : {
"type" : "number"
},
"image" : {
"type" : "string"
}
}
},
"Products" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/Product"
}
},
"CartItems" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"catalogId" : {
"type" : "string"
},
"quantity" : {
"type" : "number"
},
"modifiers" : {
"type" : "array",
"items" : {
"type" : "string"
}
}
}
}
},
"Transaction" : {
"type" : "object",
"properties" : {
"nonce" : {
"type" : "string"
},
"locationId" : {
"type" : "string"
},
"categoryId" : {
"type" : "string"
},
"cartItems" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/CartItems"
}
}
}
},
"TransactionResponse" : {
"type" : "object",
"properties" : {
"orderId" : {
"type" : "string"
},
"locationId" : {
"type" : "string"
},
"categoryId" : {
"type" : "string"
},
"cartItems" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/CartItems"
}
}
}
},
"Order" : {
"type" : "object",
"properties" : {
"orderId" : {
"type" : "string"
},
"phoneNumber" : {
"type" : "string"
}
}
}
},
"host" : "virtserver.swaggerhub.com",
"basePath" : "/aloompa/livesales-api/1.0.0",
"schemes" : [ "https" ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment