Created
August 16, 2021 20:24
-
-
Save icholy/34b70ec3836046f27c09dad694abcb23 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"schemes": [ | |
"https" | |
], | |
"swagger": "2.0", | |
"info": { | |
"description": "CDL microservices", | |
"title": "Compass Digital Services", | |
"contact": {}, | |
"version": "0.0.3" | |
}, | |
"host": "api.compassdigital.org", | |
"basePath": "/staging", | |
"paths": { | |
"/brand": { | |
"get": { | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"brands": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Brand" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/brand/{id}": { | |
"get": { | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Brand" | |
} | |
} | |
} | |
} | |
}, | |
"/location": { | |
"get": { | |
"tags": [ | |
"location" | |
], | |
"summary": "Get all location", | |
"operationId": "get_locations", | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Locations" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Create a new location", | |
"operationId": "create_location", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Location" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Create location response", | |
"schema": { | |
"$ref": "#/definitions/Location" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Record not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/location/brand": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Create a new Brand", | |
"operationId": "create_brand", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Brand" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Brand" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/location/brand/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
}, | |
{} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Get location brand", | |
"operationId": "get_brand", | |
"parameters": [ | |
{ | |
"type": "boolean", | |
"description": "If true, includes brand public/private configs into response. Auth should be provided.", | |
"name": "include_config", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"default": false, | |
"description": "show additional hidden properties/entities", | |
"name": "extended", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Brand" | |
}, | |
"x-cache-control": "max-age=60,stale-while-revalidate=3600" | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Could not find that brand", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Update location brand", | |
"operationId": "update_brand", | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "brand id", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Brand" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Brand" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"description": "If there is a body, then it will remove that data.", | |
"tags": [ | |
"location" | |
], | |
"summary": "Delete data from a Brand", | |
"operationId": "delete_brand", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Brand" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Brand" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Update location brand", | |
"operationId": "patch_brand", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Brand" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Brand" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "Brand ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/brand/{id}/deliverydestinations": { | |
"get": { | |
"tags": [ | |
"location" | |
], | |
"summary": "Get delivery destinations for a brand", | |
"operationId": "get_brand_destinations", | |
"responses": { | |
"200": { | |
"description": "Get brand delivery destinations response", | |
"schema": { | |
"$ref": "#/definitions/DeliveryDestinationIDs" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/BadRequest" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Brand ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/brand/{id}/document": { | |
"post": { | |
"tags": [ | |
"location", | |
"document" | |
], | |
"summary": "Attach document to a brand", | |
"operationId": "post_location_brand_document", | |
"parameters": [ | |
{ | |
"name": "post_body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "object", | |
"properties": { | |
"document": { | |
"description": "base64 string", | |
"type": "string" | |
}, | |
"document_name": { | |
"type": "string", | |
"example": "file_name" | |
}, | |
"document_type": { | |
"type": "string", | |
"example": "signed_contract" | |
} | |
} | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/BrandDocumentsResponse" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"tags": [ | |
"location", | |
"document" | |
], | |
"summary": "Deleted brand document", | |
"operationId": "delete_location_brand_document", | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"deleted_document": { | |
"$ref": "#/definitions/BrandDocument" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"tags": [ | |
"location", | |
"document" | |
], | |
"summary": "Edit location document", | |
"operationId": "patch_location_brand_document", | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"document": { | |
"$ref": "#/definitions/BrandDocument" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Brand ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/brand/{id}/documents": { | |
"get": { | |
"tags": [ | |
"location", | |
"document" | |
], | |
"summary": "Get location brand attached documents", | |
"operationId": "get_location_brand_documents", | |
"responses": { | |
"200": { | |
"description": "Get brand attached documents", | |
"schema": { | |
"$ref": "#/definitions/BrandDocumentsResponse" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Brand ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/brand/{id}/timeslots": { | |
"get": { | |
"tags": [ | |
"location" | |
], | |
"summary": "Get location brand timeslots", | |
"operationId": "get_brand_timeslots", | |
"parameters": [ | |
{ | |
"type": "number", | |
"description": "Get the pickup timeslots after this date within the business hours of the location", | |
"name": "date", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Limit the number of timeslots returned", | |
"name": "limit", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get brand timeslots response", | |
"schema": { | |
"$ref": "#/definitions/TimeSlots" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/BadRequest" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Brand ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/brand/{id}/timeslots/delivery": { | |
"get": { | |
"tags": [ | |
"location" | |
], | |
"summary": "Get location brand delivery timeslots", | |
"operationId": "get_brand_delivery_timeslots", | |
"parameters": [ | |
{ | |
"type": "number", | |
"description": "Get the delivery timeslots after this date within the business hours of the location", | |
"name": "date", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Limit the number of timeslots returned", | |
"name": "limit", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get brand delivery timeslots response", | |
"schema": { | |
"$ref": "#/definitions/TimeSlots" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/BadRequest" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Brand ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/brand/{id}/timeslots/delivery/menu/{menu}": { | |
"get": { | |
"tags": [ | |
"location" | |
], | |
"summary": "Get location brand delivery timeslots for menu", | |
"operationId": "get_brand_menu_delivery_timeslosts", | |
"parameters": [ | |
{ | |
"type": "number", | |
"description": "Get the delivery timeslots after this date within the business hours of the location", | |
"name": "date", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Limit the number of timeslots returned", | |
"name": "limit", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get brand delivery menu timeslots response", | |
"schema": { | |
"$ref": "#/definitions/TimeSlots" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/BadRequest" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Brand ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Menu ID", | |
"name": "menu", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/brand/{id}/timeslots/menu/{menu}": { | |
"get": { | |
"tags": [ | |
"location" | |
], | |
"summary": "Get location brand timeslots for menu", | |
"operationId": "get_brand_menu_timeslots", | |
"parameters": [ | |
{ | |
"type": "number", | |
"description": "Get the pickup timeslots after this date within the business hours of the location", | |
"name": "date", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Limit the number of timeslots returned", | |
"name": "limit", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get brand menu timeslots response", | |
"schema": { | |
"$ref": "#/definitions/TimeSlots" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/BadRequest" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Brand ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Menu ID", | |
"name": "menu", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/brands": { | |
"get": { | |
"tags": [ | |
"location" | |
], | |
"summary": "Get all location brands", | |
"operationId": "get_location_brands", | |
"responses": { | |
"200": { | |
"description": "Get all location brands", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"brands": { | |
"$ref": "#/definitions/Brands" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"error": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/location/company": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Create a new company", | |
"operationId": "create_company", | |
"parameters": [ | |
{ | |
"name": "name", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "object", | |
"required": [ | |
"name", | |
"sector" | |
], | |
"properties": { | |
"is": { | |
"type": "object", | |
"properties": { | |
"global_images_enabled": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"label": { | |
"type": "object" | |
}, | |
"name": { | |
"description": "Sector name", | |
"type": "string" | |
}, | |
"sector": { | |
"description": "sector", | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
} | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Create company response", | |
"schema": { | |
"$ref": "#/definitions/Company" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/location/company/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Get a company within sector ", | |
"operationId": "get_company", | |
"parameters": [ | |
{ | |
"type": "boolean", | |
"default": true, | |
"name": "expanded", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get company response", | |
"schema": { | |
"$ref": "#/definitions/Company" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Update a company", | |
"operationId": "patch_company", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/CompanyUpdateBody" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Update company response", | |
"schema": { | |
"$ref": "#/definitions/Company" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "Company ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/group": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Create a new group", | |
"operationId": "create_group", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Group" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Group" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/location/group/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
}, | |
{} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Get an individual Group based on id or latitude/longitude", | |
"operationId": "get_group", | |
"parameters": [ | |
{ | |
"type": "number", | |
"name": "latitude", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"name": "longitude", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"default": false, | |
"description": "When fetching a group, brands will come with private and public configs", | |
"name": "include_brands_config", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"default": false, | |
"description": "show additional hidden properties/entities", | |
"name": "extended", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"default": false, | |
"description": "return only groups with brands that have web_order_enabled switched on", | |
"name": "web", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Group" | |
}, | |
"x-cache-control": "max-age=60,stale-while-revalidate=3600" | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Override a complete Group", | |
"operationId": "update_group", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Group" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Group" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"description": "We are not deleting a group. The locations can be deleted from group which are provided in body", | |
"tags": [ | |
"location" | |
], | |
"summary": "Delete locations from a Group", | |
"operationId": "delete_group", | |
"parameters": [ | |
{ | |
"description": "List of locations to remove", | |
"name": "locations", | |
"in": "body", | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Location" | |
} | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Group" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Update a Group", | |
"operationId": "patch_group", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Group" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Group" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "group id", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/group/{id}/deliverydestination": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"delivery destination" | |
], | |
"summary": "Get all delivery destinations for group", | |
"operationId": "get_location_group_deliverydestination", | |
"responses": { | |
"200": { | |
"description": "Get all delivery destinations for a group", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"delivery_destinations": { | |
"$ref": "#/definitions/DeliveryDestinations" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"500": { | |
"description": "Server Error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"delivery destination" | |
], | |
"summary": "Create a new location group delivery destination", | |
"operationId": "post_location_group_deliverydestination", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/PostOrPatchDeliveryDestination" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Create delivery destination response", | |
"schema": { | |
"$ref": "#/definitions/DeliveryDestination" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"500": { | |
"description": "Server Error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Group ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/group/{id}/deliverydestination/{delivery_destination}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"delivery destination" | |
], | |
"summary": "Get a delivery destination", | |
"operationId": "get_location_group_deliverydestinationMixin1", | |
"responses": { | |
"200": { | |
"description": "Get delivery destination response", | |
"schema": { | |
"$ref": "#/definitions/DeliveryDestination" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"500": { | |
"description": "Server Error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"delivery destination" | |
], | |
"summary": "Delete a delivery destination", | |
"operationId": "delete_location_group_deliverydestination", | |
"responses": { | |
"200": { | |
"description": "Delete delivery destination response", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"deleted_delivery_destination": { | |
"$ref": "#/definitions/DeliveryDestination" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"500": { | |
"description": "Server Error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"delivery destination" | |
], | |
"summary": "Patch a delivery destination", | |
"operationId": "patch_location_group_deliverydestination", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/PostOrPatchDeliveryDestination" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Patch delivery destination response", | |
"schema": { | |
"$ref": "#/definitions/DeliveryDestination" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"500": { | |
"description": "Server Error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Group ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Delivery Destination ID", | |
"name": "delivery_destination", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/group/{id}/user/{user_id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Get a location group info specific to user read permissions", | |
"operationId": "get_user_group", | |
"parameters": [ | |
{ | |
"type": "number", | |
"name": "latitude", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"name": "longitude", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Group" | |
}, | |
"x-cache-control": "max-age=60,stale-while-revalidate=3600" | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "group", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "user", | |
"name": "user_id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/marketplace/timeslots": { | |
"post": { | |
"tags": [ | |
"location", | |
"marketplace", | |
"timeslots" | |
], | |
"summary": "Get Market Place timeslots", | |
"operationId": "post_location_marketplace_timeslots", | |
"parameters": [ | |
{ | |
"type": "number", | |
"description": "Get the pickup timeslots after this date within the business hours of the location", | |
"name": "date", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Limit the number of timeslots returned", | |
"name": "limit", | |
"in": "query" | |
}, | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/MarketPlace" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get brand menu timeslots response", | |
"schema": { | |
"$ref": "#/definitions/TimeSlots" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/BadRequest" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/location/marketplace/timeslots/delivery": { | |
"post": { | |
"tags": [ | |
"location", | |
"delivery", | |
"marketplace" | |
], | |
"summary": "Get Marketplace delivery timeslots", | |
"operationId": "post_location_marketplace_timeslots_delivery", | |
"parameters": [ | |
{ | |
"type": "number", | |
"description": "Get the delivery timeslots after this date within the business hours of the location", | |
"name": "date", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Limit the number of timeslots returned", | |
"name": "limit", | |
"in": "query" | |
}, | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/MarketPlace" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get brand delivery menu timeslots response", | |
"schema": { | |
"$ref": "#/definitions/TimeSlots" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/BadRequest" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/location/multigroup": { | |
"get": { | |
"tags": [ | |
"location" | |
], | |
"summary": "Get all the top level multigroups", | |
"operationId": "get_multigroups", | |
"responses": { | |
"200": { | |
"description": "Get multigroups response", | |
"schema": { | |
"$ref": "#/definitions/Multigroups" | |
}, | |
"x-cache-control": "max-age=60,stale-while-revalidate=3600" | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Create a new multigroup", | |
"operationId": "create_multigroup", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/MultiGroup" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/MultiGroup" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/location/multigroup/{id}": { | |
"get": { | |
"tags": [ | |
"location" | |
], | |
"summary": "Get a multigroup", | |
"operationId": "get_multigroup", | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "coordinate to sort from", | |
"name": "latitude", | |
"in": "query" | |
}, | |
{ | |
"type": "string", | |
"description": "coordinate to sort from", | |
"name": "longitude", | |
"in": "query" | |
}, | |
{ | |
"type": "string", | |
"default": true, | |
"description": "Merge multigroups from different providers. Set false to get only from queried provider", | |
"name": "merge", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"default": false, | |
"description": "return multigroup location/brands in response", | |
"name": "expanded", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"default": false, | |
"description": "return additional attributes in response", | |
"name": "extended", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"default": false, | |
"description": "return additional hours and deliveryHours properties in response", | |
"name": "hours", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get multigroup response", | |
"schema": { | |
"$ref": "#/definitions/MultiGroup" | |
}, | |
"x-cache-control": "max-age=60,stale-while-revalidate=3600" | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Override a complete multigroup", | |
"operationId": "update_multigroup", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/MultiGroup" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/MultiGroup" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"description": "We are not deleting a multigroup. The groups can be deleted from multigroup which are provided in body", | |
"tags": [ | |
"location" | |
], | |
"summary": "Delete groups from a multigroup", | |
"operationId": "delete_multigroup", | |
"parameters": [ | |
{ | |
"description": "List of groups to remove", | |
"name": "groups", | |
"in": "body", | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Group" | |
} | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/MultiGroup" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Update a multigroup", | |
"operationId": "patch_multigroup", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/MultiGroup" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/MultiGroup" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "multigroup id", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/multigroup/{id}/user/{user_id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Get all the groups in a multigroup specific to user permissions", | |
"operationId": "get_user_multigroup", | |
"parameters": [ | |
{ | |
"type": "boolean", | |
"name": "expanded", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get user multigroup response", | |
"schema": { | |
"$ref": "#/definitions/Groups" | |
}, | |
"x-cache-control": "max-age=60,stale-while-revalidate=3600" | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "multigroup", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "user", | |
"name": "user_id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/pos/{id}": { | |
"get": { | |
"tags": [ | |
"location" | |
], | |
"summary": "Get information about a POS", | |
"operationId": "get_pos", | |
"responses": { | |
"200": { | |
"description": "Get POS info response", | |
"schema": { | |
"$ref": "#/definitions/POS" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Set information about a POS", | |
"operationId": "update_pos", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/POS" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Set POS info response", | |
"schema": { | |
"$ref": "#/definitions/POS" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "POS ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/location/search": { | |
"get": { | |
"tags": [ | |
"location" | |
], | |
"summary": "Gets Location within a radius of the provided point", | |
"operationId": "find_location", | |
"parameters": [ | |
{ | |
"type": "number", | |
"x-deprecated": true, | |
"description": "The latitude to be used", | |
"name": "lat", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"x-deprecated": true, | |
"description": "The longitude to be used", | |
"name": "long", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Operation id to be used", | |
"name": "operation_id", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Locations" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/location/sector": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Get list of all the sectors", | |
"operationId": "get_sectors", | |
"responses": { | |
"200": { | |
"description": "Get location sectors response", | |
"schema": { | |
"$ref": "#/definitions/Sectors" | |
}, | |
"x-cache-control": "max-age=60,stale-while-revalidate=3600" | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Create a new sector", | |
"operationId": "create_sector", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/CreateSector" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Create sector response", | |
"schema": { | |
"$ref": "#/definitions/Sector" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/location/sector/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Get a sector", | |
"operationId": "get_sector", | |
"responses": { | |
"200": { | |
"description": "Get sector response", | |
"schema": { | |
"$ref": "#/definitions/Sector" | |
}, | |
"x-cache-control": "max-age=60,stale-while-revalidate=3600" | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Update a sector", | |
"operationId": "patch_sector", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/CreateSector" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Update sector response", | |
"schema": { | |
"$ref": "#/definitions/Sector" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "sector", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "boolean", | |
"description": "Omits nested children of a sector if false", | |
"name": "expanded", | |
"in": "query" | |
} | |
] | |
}, | |
"/location/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
}, | |
{} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Get an individual Location", | |
"operationId": "get_location", | |
"parameters": [ | |
{ | |
"type": "boolean", | |
"default": false, | |
"description": "When fetching location, brands will come with private and public configs", | |
"name": "include_brands_config", | |
"in": "query" | |
}, | |
{ | |
"type": "array", | |
"items": {}, | |
"description": "active cafes", | |
"name": "active_cafes", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"default": false, | |
"description": "show additional hidden properties/entities", | |
"name": "extended", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Location" | |
}, | |
"x-cache-control": "max-age=60,stale-while-revalidate=3600" | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Override a complete Location", | |
"operationId": "update_location", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Location" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Location" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"description": "We are not deleting location. The brands can be deleted from location which are provided in body", | |
"tags": [ | |
"location" | |
], | |
"summary": "Delete brands from a Location", | |
"operationId": "delete_location", | |
"parameters": [ | |
{ | |
"description": "List of brands to remove", | |
"name": "brands", | |
"in": "body", | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Brand" | |
} | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Location" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"location" | |
], | |
"summary": "Update a Location", | |
"operationId": "patch_location", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Location" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Location" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "location id", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/loyalty/{id}/balance/{user_id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get loyalty point balance for logged in user", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Points" | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/buyreward/{user_id}": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Redeem rewards to coupons", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "reward_id", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "buy reward Channel", | |
"name": "channel", | |
"in": "query", | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/RewardInfo" | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/coupon/{user_id}/{coupon_id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "get coupon's information", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "Coupon code to get coupon information", | |
"name": "coupon_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"coupon": { | |
"$ref": "#/definitions/Coupon" | |
}, | |
"is_valid": { | |
"description": "This will be true if the coupon status is either 'redeemed' or 'reissued'", | |
"type": "boolean" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Update coupon's status", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "Coupon code to update", | |
"name": "coupon_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
}, | |
{ | |
"description": "Coupon status to set", | |
"name": "status", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Success" | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/coupons/{user_id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get coupons available for the logged in user", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"coupons": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Coupon" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/enroll/{user_id}": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Enroll logged in user in Loyalty program", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "Enrollment Channel", | |
"name": "channel", | |
"in": "query", | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/EnrollResponse" | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/enrollmentstatus/{user_id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get enrollment status for logged in user", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/EnrollmentStatus" | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/events": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get all loyalty events updated after specific date", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"type": "number", | |
"description": "Page number if more than 1000 records available. Equal to 1 by default", | |
"name": "page_number", | |
"in": "query" | |
}, | |
{ | |
"type": "string", | |
"example": "2018-07-21", | |
"description": "Start date to search from", | |
"name": "from_date", | |
"in": "query", | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"events": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Event" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/history/{user_id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get history of loyalty transactions for user", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "Page number to return for pagination. If not specified will return first 1000 events", | |
"name": "page_number", | |
"in": "query", | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"description": "How many entries to return per request. If not specified will return first 1000 events", | |
"name": "entries_per_page", | |
"in": "query", | |
"schema": { | |
"type": "number" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"transactions": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/HistoryTransaction" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/offers/{user_id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get offers for the logged in user", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"offers": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Offer" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/opportunities/{user_id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get earning opportunities for the logged in user", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "Choose what opportunities should not be returned, can be several comma separated", | |
"name": "filter", | |
"in": "query", | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"opportunities": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/EarningOpportunity" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Record an event for the logged in user", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "Event type that should be recorded for the logged in user", | |
"name": "event", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "Event occurence channel", | |
"name": "channel", | |
"in": "query", | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/RecordResponse" | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/orderpoints/{user_id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get potential loyalty point points for an order based on amount.", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "Order amount before taxes to check potential loyalty points", | |
"name": "order_amount", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "number" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Points" | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get potential loyalty point points for a order based on amount and items", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "Order total amount before taxes", | |
"name": "order_amount", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"description": "List of items in the cart", | |
"name": "items", | |
"in": "body", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"items": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Item" | |
} | |
} | |
} | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Points" | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/points": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get potential points user could earn from certain event in Loyalty program", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"type": "string", | |
"description": "event type", | |
"name": "event", | |
"in": "query", | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Points" | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/purchase/{user_id}": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Record purchase event", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "Order id", | |
"name": "order_id", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "Order total amount before taxes", | |
"name": "order_total", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "number" | |
} | |
}, | |
{ | |
"description": "List of order items", | |
"name": "items", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "object", | |
"properties": { | |
"items": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Item" | |
} | |
} | |
} | |
} | |
}, | |
{ | |
"description": "Purchase Channel", | |
"name": "channel", | |
"in": "query", | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/RecordResponse" | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/rewards/{user_id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get rewards available for the logged in user", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "CompassDigital User id", | |
"name": "user_id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"rewards": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Reward" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/search": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Search CDL user id by internal 500friends id", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"type": "number", | |
"description": "User id in 500friends", | |
"name": "search_id", | |
"in": "query", | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/UserId" | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/loyalty/{id}/users": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get all loyalty users updated after specific date", | |
"operationId": "Mixin2", | |
"parameters": [ | |
{ | |
"description": "Loyalty Provider id", | |
"name": "id", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"type": "number", | |
"description": "Page number if more than 1000 records available. Equal to 1 by default", | |
"name": "page_number", | |
"in": "query" | |
}, | |
{ | |
"type": "string", | |
"example": "2018-07-21", | |
"description": "Start date to search from", | |
"name": "from_date", | |
"in": "query", | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"users": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/LoyaltyUser" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Invalid request parameters", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/menu": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Get Menus or search for Menus", | |
"operationId": "get_menus", | |
"parameters": [ | |
{ | |
"type": "string", | |
"name": "query", | |
"in": "query", | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get menus response", | |
"schema": { | |
"$ref": "#/definitions/Menus" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Create a new Menu", | |
"operationId": "create_menu", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Menu" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Menu" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/menu/client/{client_id}": { | |
"get": { | |
"tags": [ | |
"menu" | |
], | |
"summary": "Get menu client", | |
"operationId": "get_menu_client", | |
"responses": { | |
"200": { | |
"description": "Get menu client response", | |
"schema": { | |
"$ref": "#/definitions/Menus" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"name": "client_id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/menu/company/{company}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Get menus that belong to company", | |
"operationId": "get_company_menus", | |
"responses": { | |
"200": { | |
"description": "Get company menus response", | |
"schema": { | |
"$ref": "#/definitions/Menus" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Company ID", | |
"name": "company", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/menu/import": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Import an existing Menu", | |
"operationId": "import_menu", | |
"parameters": [ | |
{ | |
"name": "menu", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "object", | |
"properties": { | |
"menu": { | |
"description": "menu", | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
} | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Menu" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/menu/item": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Create a menu item", | |
"operationId": "create_item", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Item" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Create menu item response", | |
"schema": { | |
"$ref": "#/definitions/Item" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/menu/item/random/location/{location}": { | |
"get": { | |
"tags": [ | |
"menu" | |
], | |
"summary": "Get a random item", | |
"operationId": "get_location_item_random", | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "The idfa of the requesting device", | |
"name": "idfa", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"description": "Is this device being used in a public area", | |
"name": "is_public", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "The start of the session, prevents duplicates for any items voted on from the start time.", | |
"name": "start_time", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get random menu item response", | |
"schema": { | |
"$ref": "#/definitions/Item" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Location ID", | |
"name": "location", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/menu/item/{id}": { | |
"get": { | |
"tags": [ | |
"menu" | |
], | |
"summary": "Get menu item", | |
"operationId": "get_item", | |
"responses": { | |
"200": { | |
"description": "Get item response", | |
"schema": { | |
"$ref": "#/definitions/Item" | |
}, | |
"x-cache-control": "max-age=60" | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Could not find that menu item", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Delete a menu item", | |
"operationId": "delete_item", | |
"responses": { | |
"200": { | |
"description": "Delete item response", | |
"schema": { | |
"$ref": "#/definitions/Success" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Item ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/menu/items": { | |
"get": { | |
"tags": [ | |
"menu" | |
], | |
"summary": "Search for menu items", | |
"operationId": "get_menu_items", | |
"parameters": [ | |
{ | |
"type": "string", | |
"name": "query", | |
"in": "query", | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Search menu items response", | |
"schema": { | |
"$ref": "#/definitions/Items" | |
} | |
}, | |
"400": { | |
"description": "Invalid search", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/menu/items/import/{location}": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"description": "Currently is used only by Canteen menu provider", | |
"tags": [ | |
"menu" | |
], | |
"summary": "trigger import items", | |
"operationId": "import_items_canteen", | |
"responses": { | |
"200": { | |
"description": "Trigger item import response", | |
"schema": { | |
"$ref": "#/definitions/Success" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Location ID", | |
"name": "location", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/menu/items/location/{location}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Get all menu items for a location", | |
"operationId": "get_location_items", | |
"responses": { | |
"200": { | |
"description": "Get location menu items response", | |
"schema": { | |
"$ref": "#/definitions/Items" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Location ID", | |
"name": "location", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/menu/items/random/location/{location}": { | |
"get": { | |
"tags": [ | |
"menu" | |
], | |
"summary": "Get a set of random items", | |
"operationId": "get_location_items_random", | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "The idfa of the requesting device", | |
"name": "idfa", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"description": "Is this device being used in a public area", | |
"name": "is_public", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "The number of items to return. Max is 5", | |
"name": "count", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "The start of the session, prevents duplicates for any items voted on from the start time.", | |
"name": "start_time", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get random menu item set response", | |
"schema": { | |
"$ref": "#/definitions/Items" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Location ID", | |
"name": "location", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/menu/modifier/group": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Create a new Menu Modifier Group", | |
"operationId": "create_modifier_group", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/CreateOptionsGroup" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/OptionsGroup" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/menu/modifier/group/company/{company}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Get the modifier groups that belong to company", | |
"operationId": "get_company_modifier_groups", | |
"responses": { | |
"200": { | |
"description": "Get company modifiers response", | |
"schema": { | |
"$ref": "#/definitions/OptionsGroupList" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Company ID", | |
"name": "company", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/menu/modifier/group/company/{company}/export": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Export company modifier groups to zipped excel file.", | |
"operationId": "get_company_modifier_groups_export", | |
"responses": { | |
"200": { | |
"description": "Get company modifier groups export response", | |
"schema": { | |
"$ref": "#/definitions/ZippedExcelExport" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Company ID", | |
"name": "company", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/menu/modifier/group/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Get a Menu Modifier Group", | |
"operationId": "get_modifier_group", | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/OptionsGroup" | |
} | |
}, | |
"400": { | |
"description": "Invalid request", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Update a Menu Modifier Group", | |
"operationId": "update_modifier_group", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/OptionsGroup" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/OptionsGroup" | |
} | |
}, | |
"400": { | |
"description": "Invalid request", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Delete a Menu Modifier Group", | |
"operationId": "delete_modifier_group", | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Success" | |
} | |
}, | |
"400": { | |
"description": "Invalid request", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "modifier_group", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/menu/sector/{sector}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Get menus that belong to sector", | |
"operationId": "get_sector_menus", | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "sector", | |
"name": "sector", | |
"in": "path", | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get sector menu items response", | |
"schema": { | |
"$ref": "#/definitions/Menus" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Sector ID", | |
"name": "sector", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/menu/{id}": { | |
"get": { | |
"tags": [ | |
"menu" | |
], | |
"summary": "Get an individual Menu", | |
"operationId": "get_menu", | |
"parameters": [ | |
{ | |
"type": "boolean", | |
"description": "Show additional fields like hidden menu items, parent_id,company,sector,location_brand,overrides. Defaults to false", | |
"name": "extended", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"default": false, | |
"description": "Show unlinked groups", | |
"name": "show_unlinked", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Menu" | |
}, | |
"x-cache-control": "max-age=60,stale-while-revalidate=3600" | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Could not find that menu", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Override a complete Menu", | |
"operationId": "update_menu", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Menu" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Menu" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Delete a Menu", | |
"operationId": "delete_menu", | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Success" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"head": { | |
"tags": [ | |
"menu" | |
], | |
"summary": "Get an individual Menu", | |
"operationId": "get_menu_headers", | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": {} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Could not find that menu", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Update a menu", | |
"operationId": "patch_menu", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/PatchMenu" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Menu" | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "menu", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "string", | |
"x-example": "{id,name,groups{id,name,is}}", | |
"description": "fields to return", | |
"name": "_query", | |
"in": "query" | |
} | |
] | |
}, | |
"/menu/{id}/export": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"menu" | |
], | |
"summary": "Export menu set to zipped excel file.", | |
"operationId": "get_menu_export", | |
"responses": { | |
"200": { | |
"description": "Get menu client response", | |
"schema": { | |
"$ref": "#/definitions/ZippedExcelExport" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Not authorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "compassdigital.id", | |
"description": "menu", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/order": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"order" | |
], | |
"summary": "Create an Order", | |
"operationId": "create_order", | |
"parameters": [ | |
{ | |
"description": "Order object that needs to be created", | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/CreateOrder" | |
} | |
}, | |
{ | |
"type": "string", | |
"description": "The language of the user ex en, fr", | |
"name": "lang", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Create order response", | |
"schema": { | |
"$ref": "#/definitions/Order" | |
} | |
}, | |
"400": { | |
"description": "Invalid parameters were passed", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/order/customer/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"order" | |
], | |
"summary": "Get all orders for a Customer", | |
"operationId": "get_customer_orders", | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "Sort the customers order by order created date, pickup date or requested date. Possible values: created, pickup. Default is created.", | |
"name": "sort", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"x-deprecated": true, | |
"description": "Filter orders by their pickup date. Only return orders that have a date greater than or equal to the date. Default is the current time in milliseconds.", | |
"name": "pickup_start", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"x-deprecated": true, | |
"description": "Filter orders by their pickup date. Only return orders that have a date less than or equal to the date. Default is 24 hours from the current time in milliseconds.", | |
"name": "pickup_end", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is 24 hours from the current time in milliseconds.", | |
"name": "end", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is the current time in milliseconds.", | |
"name": "start", | |
"in": "query" | |
}, | |
{ | |
"type": "string", | |
"description": "This is the key for which the query will be made. E.g if order_type equals 'delivery', the response will include the results based on delivery", | |
"name": "order_type", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get customer orders response", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"orders": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Order" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "The user ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/order/customer/{id}/location/brand/{location_brand}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"order" | |
], | |
"summary": "Get all orders for a Customer for a specific Location Brand", | |
"operationId": "get_customer_orders_brand", | |
"responses": { | |
"200": { | |
"description": "Get customer orders by location brand response", | |
"schema": { | |
"$ref": "#/definitions/Orders" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "The user ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "string", | |
"description": "Brand id", | |
"name": "location_brand", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/order/location/brand/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"order" | |
], | |
"summary": "Get all orders for a location Brand", | |
"operationId": "get_brand_orders", | |
"parameters": [ | |
{ | |
"type": "number", | |
"x-deprecated": true, | |
"description": "Filter orders by their pickup date. Only return orders that have a date greater than or equal to the date in milliseconds.", | |
"name": "pickup_start", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"x-deprecated": true, | |
"description": "Filter orders by their pickup date. Only return orders that have a date less than or equal to the date in milliseconds.", | |
"name": "pickup_end", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"description": "Filter orders to just those with this ready state", | |
"name": "ready", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is 24 hours from the current time in milliseconds.", | |
"name": "end", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is the current time in milliseconds.", | |
"name": "start", | |
"in": "query" | |
}, | |
{ | |
"type": "string", | |
"description": "This is the key for which the query will be made. E.g if order_type equals 'delivery', the response will include the results based on delivery", | |
"name": "order_type", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get location brand orders response", | |
"schema": { | |
"$ref": "#/definitions/Orders" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "The location brand ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/order/location/group/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"order" | |
], | |
"summary": "Get all orders for a location group", | |
"operationId": "get_group_orders", | |
"parameters": [ | |
{ | |
"enum": [ | |
"accepted", | |
"in_progress", | |
"ready", | |
"out_for_delivery", | |
"delivered" | |
], | |
"type": "string", | |
"description": "Filter orders by their status.", | |
"name": "status", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is all orders", | |
"name": "start", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is the current time in milliseconds.", | |
"name": "end", | |
"in": "query" | |
}, | |
{ | |
"enum": [ | |
"delivery", | |
"pickup" | |
], | |
"type": "string", | |
"description": "Filter orders by their order type", | |
"name": "order_type", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get location group's orders response", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"orders": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Order" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "Get orders by their associated group", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/order/location/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"order" | |
], | |
"summary": "Get all orders for a location", | |
"operationId": "get_location_orders", | |
"parameters": [ | |
{ | |
"type": "number", | |
"x-deprecated": true, | |
"description": "Filter orders by their pickup date. Only return orders that have a date greater than or equal to the date in milliseconds.", | |
"name": "pickup_start", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"x-deprecated": true, | |
"description": "Filter orders by their pickup date. Only return orders that have a date less than or equal to the date in milliseconds.", | |
"name": "pickup_end", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"description": "Filter orders to just those with this ready state", | |
"name": "ready", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is 24 hours from the current time in milliseconds.", | |
"name": "end", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is the current time in milliseconds.", | |
"name": "start", | |
"in": "query" | |
}, | |
{ | |
"type": "string", | |
"description": "This is the key for which the query will be made. E.g if order_type equals 'delivery', the response will include the results based on delivery", | |
"name": "order_type", | |
"in": "query" | |
}, | |
{ | |
"type": "string", | |
"format": "Comma-separated compassdigital.id", | |
"description": "List of brands you want orders for inside this location. Example: 616kLp3ADNUE2RO8qqzdto8avzyRrOhXRDW5,or2ayBJePqUP4ORXeeGgTw96vKle47IgemPk", | |
"name": "brands", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get location orders response", | |
"schema": { | |
"$ref": "#/definitions/Orders" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "The location ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/order/user/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"order" | |
], | |
"summary": "Get all delivery orders for a User related to the order in the details (Runner)", | |
"operationId": "get_user_orders", | |
"deprecated": true, | |
"parameters": [ | |
{ | |
"enum": [ | |
"accepted", | |
"in_progress", | |
"ready", | |
"out_for_delivery", | |
"delivered" | |
], | |
"type": "string", | |
"description": "Filter orders by their status.", | |
"name": "status", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is all orders", | |
"name": "start", | |
"in": "query" | |
}, | |
{ | |
"type": "number", | |
"description": "Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is the current time in milliseconds.", | |
"name": "end", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get location group's orders response", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"orders": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Order" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "Get orders by their associated group", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/order/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"order" | |
], | |
"summary": "Get an individual order", | |
"operationId": "get_order", | |
"responses": { | |
"200": { | |
"description": "Get order response", | |
"schema": { | |
"$ref": "#/definitions/Order" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"order" | |
], | |
"summary": "Update an individual order", | |
"operationId": "update_order", | |
"responses": { | |
"200": { | |
"description": "Update order response", | |
"schema": { | |
"$ref": "#/definitions/Order" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"order" | |
], | |
"summary": "Update an existing order", | |
"operationId": "patch_order", | |
"parameters": [ | |
{ | |
"description": "Order properties to be updated", | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Order" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Patch order response", | |
"schema": { | |
"$ref": "#/definitions/Order" | |
} | |
}, | |
"400": { | |
"description": "Bad request", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "The order ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/order/{id}/issue": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"order" | |
], | |
"summary": "Create an issue with an order", | |
"operationId": "create_order_issue", | |
"parameters": [ | |
{ | |
"description": "Order issue payload. If reporting dispute please use type as 'DISPUTE'. In case of dispute 'item id' and 'reason' are mandatory params in body.", | |
"name": "body", | |
"in": "body", | |
"schema": { | |
"$ref": "#/definitions/OrderIssue" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Order issue response", | |
"schema": { | |
"$ref": "#/definitions/Issue" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "The order ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/order/{id}/refund": { | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"order" | |
], | |
"summary": "Issue a refund on an existing order", | |
"operationId": "order_refund", | |
"parameters": [ | |
{ | |
"description": "Items with pricing and quanitity to be refunded", | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Refund" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Refund order response", | |
"schema": { | |
"$ref": "#/definitions/Order" | |
} | |
}, | |
"400": { | |
"description": "Bad request", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "The order ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/payment/clienttoken": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"deprecated": true, | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/ClientToken" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/consumer": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "The user id ", | |
"name": "user_id", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/ConsumerId" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/hpc": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "FP StoreId", | |
"name": "storeId", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "FP TerminalId", | |
"name": "terminalId", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"iframe": { | |
"type": "string" | |
}, | |
"sessionKey": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/method": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get a users available payment methods", | |
"operationId": "Mixin5", | |
"deprecated": true, | |
"parameters": [ | |
{ | |
"description": "The user id ", | |
"name": "user_id", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"payment_methods": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/PaymentMethod" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "The user id", | |
"name": "user_id", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "The payment nonce provided for the payment method", | |
"name": "payment_method_nonce", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"payment_method": { | |
"$ref": "#/definitions/PaymentMethod" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/method/{id}": { | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"deprecated": true, | |
"parameters": [ | |
{ | |
"description": "The user from where the payment method will be deleted", | |
"name": "user", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"description": "user", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "user" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Success" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/methods": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "FP StoreId", | |
"name": "storeId", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "array" | |
} | |
}, | |
{ | |
"description": "FP TerminalId", | |
"name": "terminalId", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/PaymentCard" | |
} | |
}, | |
"recordsTotal": { | |
"type": "number" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/token": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "Payment Key", | |
"name": "paymentKey", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "Session key", | |
"name": "sessionKey", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "FP StoreId", | |
"name": "storeId", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "FP TerminalId", | |
"name": "terminalId", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "name on card", | |
"name": "nameOnCard", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/TokenInformation" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "Token information to be saved", | |
"name": "updatedTokenInfo", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/UpdateTokenInformation" | |
} | |
}, | |
{ | |
"description": "FP StoreId", | |
"name": "storeId", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "array" | |
} | |
}, | |
{ | |
"description": "FP TerminalId", | |
"name": "terminalId", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/PaymentCard" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "Token information to be saved", | |
"name": "tokenInfo", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/TokenInformation" | |
} | |
}, | |
{ | |
"description": "Name on credit card", | |
"name": "nameOnCard", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "FP StoreId", | |
"name": "storeId", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "array" | |
} | |
}, | |
{ | |
"description": "FP TerminalId", | |
"name": "terminalId", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/PaymentCard" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "Token string to be deleted", | |
"name": "token", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "FP StoreId", | |
"name": "storeId", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "array" | |
} | |
}, | |
{ | |
"description": "FP TerminalId", | |
"name": "terminalId", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Success" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/transaction": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"deprecated": true, | |
"parameters": [ | |
{ | |
"description": "The payment method token to use for the payment", | |
"name": "payment_method_token", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"description": "payment", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "payment" | |
} | |
}, | |
{ | |
"description": "The amount to charge to the payment method", | |
"name": "amount", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "The options for the transaction", | |
"name": "options", | |
"in": "body", | |
"schema": { | |
"$ref": "#/definitions/Options" | |
} | |
}, | |
{ | |
"description": "The braintree merchant account id to use", | |
"name": "merchant_account_id", | |
"in": "body", | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "The Apple/Google wallet method token to use for the payment", | |
"name": "digital_wallet_token", | |
"in": "body", | |
"schema": { | |
"description": "payment", | |
"type": "string", | |
"title": "payment" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Transaction" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/transaction/{id}/refund": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"deprecated": true, | |
"parameters": [ | |
{ | |
"description": "The amount to refund for the transaction", | |
"name": "amount", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "The transaction being refunded", | |
"name": "transaction", | |
"in": "body", | |
"schema": { | |
"type": "object", | |
"$ref": "#/definitions/Transaction" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Refund" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/{id}/clienttoken": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/ClientToken" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/{id}/method": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"summary": "Get a users available payment methods", | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "The user id ", | |
"name": "user_id", | |
"in": "query", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"payment_methods": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/PaymentMethod" | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/{id}/method/{method_id}": { | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "The user from where the payment method will be deleted", | |
"name": "user", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"description": "user", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "user" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Success" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/{id}/paymenttoken": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "The credit card number (Exact)", | |
"name": "cc_number", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "The credit card expiry (Exact)", | |
"name": "cc_expiry", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "The credit card CVV (Exact)", | |
"name": "cc_verification_str2", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "The credit card holder's name (Exact)", | |
"name": "cardholder_name", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "A reference identifier for the transaction", | |
"name": "reference_no", | |
"in": "body", | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "The options for the transaction", | |
"name": "options", | |
"in": "body", | |
"schema": { | |
"$ref": "#/definitions/Options" | |
} | |
}, | |
{ | |
"description": "postal or zip code", | |
"name": "postal_code", | |
"in": "body", | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/PaymentMethod" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/{id}/transaction": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "The payment method token to use for the payment", | |
"name": "payment_method_token", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"description": "payment", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "payment" | |
} | |
}, | |
{ | |
"description": "The amount to charge to the payment method", | |
"name": "amount", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "The options for the transaction", | |
"name": "options", | |
"in": "body", | |
"schema": { | |
"$ref": "#/definitions/Options" | |
} | |
}, | |
{ | |
"description": "The braintree merchant account id to use", | |
"name": "merchant_account_id", | |
"in": "body", | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Transaction" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/payment/{id}/transaction/{transaction_id}/refund": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"operationId": "Mixin5", | |
"parameters": [ | |
{ | |
"description": "The amount to refund for the transaction", | |
"name": "amount", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"description": "The payment method token to use for the payment (FreedomPay + Exact)", | |
"name": "payment_method_token", | |
"in": "body", | |
"schema": { | |
"description": "payment", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "payment" | |
} | |
}, | |
{ | |
"description": "The transaction being refunded", | |
"name": "transaction", | |
"in": "body", | |
"schema": { | |
"type": "object", | |
"$ref": "#/definitions/Transaction" | |
} | |
}, | |
{ | |
"description": "The options for the transaction", | |
"name": "options", | |
"in": "body", | |
"schema": { | |
"$ref": "#/definitions/Options" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "", | |
"schema": { | |
"$ref": "#/definitions/Refund" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/shoppingcart/": { | |
"post": { | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Create a new ShoppingCart", | |
"operationId": "create_cart", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/shoppingcart/bulk": { | |
"post": { | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Get multiple ShoppingCarts", | |
"operationId": "get_carts", | |
"parameters": [ | |
{ | |
"description": "Shopping cart ids", | |
"name": "ids", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "array", | |
"items": { | |
"description": "shoppingcart", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "shoppingcart" | |
} | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCarts" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Could not find carts", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/shoppingcart/{id}": { | |
"get": { | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Get an individual ShoppingCart", | |
"operationId": "get_cart", | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"put": { | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Put a menu item into a ShoppingCart", | |
"operationId": "update_cart_items", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Items" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Update shopping cart response", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"403": { | |
"description": "Cannot modify a cart that's already been ordered", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Delete a menu item from a ShoppingCart", | |
"operationId": "remove_cart_items", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Items" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Delete item from shopping cart response", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"403": { | |
"description": "Cannot modify a cart that's already been ordered", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Update a ShoppingCart", | |
"operationId": "patch_cart", | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Shopping cart ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/shoppingcart/{id}/clone": { | |
"post": { | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Create a shopping cart from existing shopping cart", | |
"operationId": "clone_cart", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"schema": { | |
"type": "object", | |
"properties": { | |
"menu": { | |
"type": "string" | |
}, | |
"order_type": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Clone shopping cart response", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Shopping cart not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Shopping cart ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/shoppingcart/{id}/loyalty/{user_id}": { | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Apply a loyalty coupon in a ShoppingCart", | |
"operationId": "update_cart_loyalty", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/CouponCode" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Add loyalty coupon response", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"403": { | |
"description": "Cannot modify a cart that's already been ordered", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Delete loyalty coupon in shoppingCart", | |
"operationId": "delete_cart_loyalty", | |
"responses": { | |
"200": { | |
"description": "Delete loyalty coupon response", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"403": { | |
"description": "Cannot modify a cart that's already been ordered", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Shopping cart ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "User ID", | |
"name": "user_id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/shoppingcart/{id}/order/": { | |
"put": { | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Store information about the order created with this shopping cart", | |
"operationId": "update_cart_order", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/OrderId" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Update order information response", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"403": { | |
"description": "Cart already has an order attached to it", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Could not find that cart", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"500": { | |
"description": "Internal Server Error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Shopping cart ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/shoppingcart/{id}/paymentmethod/": { | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
}, | |
{} | |
], | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Change payment method used in shopping cart", | |
"operationId": "update_cart_payment", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Payment" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Update payment method response", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"403": { | |
"description": "Cannot modify a cart that's already been ordered", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"500": { | |
"description": "No configuration found for location.", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Shopping cart ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/shoppingcart/{id}/promo": { | |
"put": { | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Put a promo in a ShoppingCart", | |
"operationId": "update_cart_promo", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Promo" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Add promo response", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"403": { | |
"description": "Cannot modify a cart that's already been ordered", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"tags": [ | |
"shoppingcart" | |
], | |
"summary": "Delete the promo in a ShoppingCart", | |
"operationId": "delete_cart_promo", | |
"responses": { | |
"200": { | |
"description": "Delete promo response", | |
"schema": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"403": { | |
"description": "Cannot modify a cart that's already been ordered", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"501": { | |
"description": "Not implemented", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Shopping cart ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/user": { | |
"post": { | |
"security": [ | |
{}, | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Create an User", | |
"operationId": "create_user", | |
"parameters": [ | |
{ | |
"description": "User object that needs to be created", | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
}, | |
{ | |
"type": "boolean", | |
"description": "Use ACL permission system", | |
"name": "acl", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Create user response", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized. You don't have permissions to create a user in that realm", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"409": { | |
"description": "A user with that email address already exists", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"422": { | |
"description": "Invalid password format: Must include both upper and lower case letters, include at least one number or symbol, and be at least 9 characters long", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/auth": { | |
"get": { | |
"security": [ | |
{ | |
"basicAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Gets the JWT token for a user", | |
"operationId": "auth", | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "realm", | |
"name": "realm", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get user JWT token response", | |
"schema": { | |
"$ref": "#/definitions/auth" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"post": { | |
"tags": [ | |
"user" | |
], | |
"summary": "Use refresh token to generate a new access token and refresh token", | |
"operationId": "get_tokens", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/RefreshToken" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Generate access token response", | |
"schema": { | |
"$ref": "#/definitions/auth" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/checkin/search": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"description": "Endpoint to search checkin info by visit_uuid", | |
"tags": [ | |
"user" | |
], | |
"summary": "Search check-in", | |
"operationId": "search_check_in", | |
"parameters": [ | |
{ | |
"type": "string", | |
"description": "Check-in UUID", | |
"name": "checkin_uuid", | |
"in": "query" | |
}, | |
{ | |
"type": "string", | |
"description": "Visit UUID that corresponds to the check-in", | |
"name": "visit_uuid", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get check-in by visit_uuid", | |
"schema": { | |
"$ref": "#/definitions/Checkin" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/device/auth": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Endpoint retrieving KDS device token", | |
"operationId": "get_kds_token", | |
"parameters": [ | |
{ | |
"type": "boolean", | |
"name": "authorized", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get KDS device token response", | |
"schema": { | |
"$ref": "#/definitions/KDSDevices" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Endpoint for generating/retrieving KDS device token", | |
"operationId": "create_kds_token", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/UserDeviceAuthBody" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Generate KDS device token response", | |
"schema": { | |
"$ref": "#/definitions/KDSToken" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/device/auth/{device_id}": { | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Endpoint for deleting a device by specified device_id", | |
"operationId": "delete_user_device_auth", | |
"responses": { | |
"200": { | |
"description": "Status 200", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Endpoint for authorizing device to retrieve valid kds token", | |
"operationId": "auth_kds", | |
"responses": { | |
"200": { | |
"description": "Authorize device response", | |
"schema": { | |
"$ref": "#/definitions/KDSDevice" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Device not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "KDS device ID", | |
"name": "device_id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/user/forgotpassword": { | |
"post": { | |
"tags": [ | |
"user" | |
], | |
"summary": "Reset the users password", | |
"operationId": "reset_password", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Forgotpassword" | |
} | |
}, | |
{ | |
"type": "string", | |
"description": "The language of the user ex en, fr", | |
"name": "lang", | |
"in": "query" | |
}, | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "realm", | |
"name": "realm", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Reset user password response", | |
"schema": { | |
"$ref": "#/definitions/success" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Could not find valid user with that email", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"422": { | |
"description": "Invalid password format: Must include both upper and lower case letters, include at least one number or symbol, and be at least 9 characters long", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/logout": { | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Logs out current user", | |
"operationId": "logout", | |
"responses": { | |
"200": { | |
"description": "Success", | |
"schema": { | |
"$ref": "#/definitions/success" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/realm/{realm}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Get all the users in a realm", | |
"operationId": "get_realm_users", | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "realm", | |
"name": "realm", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "number", | |
"description": "Max number of records to return. Defaults to 100", | |
"name": "max", | |
"in": "query" | |
}, | |
{ | |
"type": "string", | |
"description": "Last modified date greater than this parameter", | |
"name": "lastmodified_start", | |
"in": "query" | |
}, | |
{ | |
"type": "boolean", | |
"description": "Use ACL permission system", | |
"name": "acl", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "User with permissions", | |
"schema": { | |
"$ref": "#/definitions/Users" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/zendesk": { | |
"get": { | |
"security": [ | |
{}, | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"description": "Returns a JWT token to use in zendesk web widget. This will enable the web widget to search restricted articles from the knowledge base. Authentication on this endpoint is optional.", | |
"tags": [ | |
"user" | |
], | |
"summary": "Get zendesk JWT token to allow web widget to search restricted articles", | |
"operationId": "get_user_zendesk", | |
"responses": { | |
"200": { | |
"description": "Get zendesk access token", | |
"schema": { | |
"type": "object", | |
"required": [ | |
"token" | |
], | |
"properties": { | |
"token": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/{id}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Get an individual user", | |
"operationId": "get_user", | |
"responses": { | |
"200": { | |
"description": "Get user response", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Update an individual user", | |
"operationId": "update_user", | |
"parameters": [ | |
{ | |
"description": "User object that needs to be updated", | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Update user response", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"409": { | |
"description": "A user with that email address already exists", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"delete": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "delete an individual user", | |
"operationId": "delete_user", | |
"responses": { | |
"200": { | |
"description": "Delete user response", | |
"schema": { | |
"$ref": "#/definitions/success" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Update an individual user", | |
"operationId": "patch_user", | |
"parameters": [ | |
{ | |
"description": "User properties which should be updated", | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Update user response", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"409": { | |
"description": "A user with that email address already exists", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "User ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "boolean", | |
"description": "Use ACL permission system", | |
"name": "acl", | |
"in": "query" | |
} | |
] | |
}, | |
"/user/{id}/changepassword": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Change the users password", | |
"operationId": "change_password", | |
"parameters": [ | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Changepassword" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Change user password response", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"422": { | |
"description": "Invalid password format: Must include both upper and lower case letters, include at least one number or symbol, and be at least 9 characters long", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "User ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/user/{id}/checkin": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"description": "Call to create check-in ID with a colour \u0026 image to show on the screen or success message if using NFC", | |
"tags": [ | |
"user" | |
], | |
"summary": "Create check-in for user", | |
"operationId": "check_in", | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "UserId of user who wants to checkin", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/CheckInUserInfo" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Check-in response", | |
"schema": { | |
"$ref": "#/definitions/Checkin" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/{id}/checkin/{checkin_id}": { | |
"patch": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"description": "Update checkin endpoint", | |
"tags": [ | |
"user" | |
], | |
"summary": "Update check-in", | |
"operationId": "update_check_in", | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "UserId of user who wants to checkin", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "Checkin id", | |
"name": "checkin_id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"description": "The updated state/date_queued of the check-in", | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/PatchCheckin" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Update check-in", | |
"schema": { | |
"$ref": "#/definitions/Checkin" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/{id}/permissions": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Get user permissions", | |
"operationId": "get_user_permissions", | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "user", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "boolean", | |
"description": "Use ACL permission system", | |
"name": "acl", | |
"in": "query" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Get user permissions response", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Could not find user", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"put": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Update user permissions", | |
"operationId": "update_user_permissions", | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "user", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "boolean", | |
"description": "Use ACL permission system", | |
"name": "acl", | |
"in": "query" | |
}, | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "object", | |
"properties": { | |
"scopes": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Permission" | |
} | |
} | |
} | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Update user permissions response", | |
"schema": { | |
"$ref": "#/definitions/User" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Could not find user", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/{id}/resetpassword": { | |
"post": { | |
"tags": [ | |
"user" | |
], | |
"summary": "Reset the users password using a reset token", | |
"operationId": "reset_password_token", | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "realm", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/Resetpassword" | |
} | |
}, | |
{ | |
"type": "string", | |
"description": "password reset token", | |
"name": "reset_token", | |
"in": "query", | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Reset user password response", | |
"schema": { | |
"$ref": "#/definitions/success" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Could not find user", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/{id}/secret/{key}": { | |
"get": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Get back a secret key", | |
"operationId": "get_secret", | |
"responses": { | |
"200": { | |
"description": "Get user secret key response", | |
"schema": { | |
"type": "object", | |
"additionalProperties": true | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Not found", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Add a secret key", | |
"operationId": "add_secret", | |
"parameters": [ | |
{ | |
"description": "Secret to be stored", | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"type": "object" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Add user secret key response", | |
"schema": { | |
"$ref": "#/definitions/Key" | |
} | |
}, | |
"400": { | |
"description": "Invalid secret was passed", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
}, | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "User ID", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"type": "string", | |
"name": "key", | |
"in": "path", | |
"required": true | |
} | |
] | |
}, | |
"/user/{id}/verification": { | |
"post": { | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"tags": [ | |
"user" | |
], | |
"summary": "Send email verification to user", | |
"operationId": "send_email_verification", | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "realm", | |
"name": "id", | |
"in": "path", | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Send verification email response", | |
"schema": { | |
"$ref": "#/definitions/success" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"409": { | |
"description": "User email is already verified", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
}, | |
"/user/{id}/verification/confirm": { | |
"put": { | |
"tags": [ | |
"user" | |
], | |
"summary": "Verify a users email", | |
"operationId": "verify_user_email", | |
"parameters": [ | |
{ | |
"type": "string", | |
"format": "compassdigital.id", | |
"description": "realm", | |
"name": "id", | |
"in": "path", | |
"required": true | |
}, | |
{ | |
"name": "body", | |
"in": "body", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/VerifyEmail" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Email verification response", | |
"schema": { | |
"$ref": "#/definitions/success" | |
} | |
}, | |
"400": { | |
"description": "Unknown error", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"404": { | |
"description": "Could not find user", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
}, | |
"503": { | |
"description": "No provider returned a valid response", | |
"schema": { | |
"$ref": "#/definitions/Error" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"Acl": { | |
"type": "object", | |
"properties": { | |
"ROLE": { | |
"description": "Any role name", | |
"type": "object", | |
"properties": { | |
"RESOURCE": { | |
"description": "Any resource name", | |
"type": "object", | |
"properties": { | |
"create:any": { | |
"$ref": "#/definitions/AclAction" | |
}, | |
"create:own": { | |
"$ref": "#/definitions/AclAction" | |
}, | |
"delete:any": { | |
"$ref": "#/definitions/AclAction" | |
}, | |
"delete:own": { | |
"$ref": "#/definitions/AclAction" | |
}, | |
"read:any": { | |
"$ref": "#/definitions/AclAction" | |
}, | |
"read:own": { | |
"$ref": "#/definitions/AclAction" | |
}, | |
"update:any": { | |
"$ref": "#/definitions/AclAction" | |
}, | |
"update:own": { | |
"$ref": "#/definitions/AclAction" | |
} | |
} | |
} | |
}, | |
"additionalProperties": true | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"AclAction": { | |
"description": "Array of optionally negatable (!) attributes, or *", | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"Address": { | |
"type": "object", | |
"properties": { | |
"address": { | |
"description": "First line of the address, should include street number", | |
"type": "string" | |
}, | |
"city": { | |
"description": "City of the address", | |
"type": "string" | |
}, | |
"coordinates": { | |
"type": "object", | |
"properties": { | |
"latitude": { | |
"description": "latitude of the the address", | |
"type": "number" | |
}, | |
"longitude": { | |
"description": "longitude of the the address", | |
"type": "number" | |
} | |
} | |
}, | |
"country": { | |
"description": "Country of the address", | |
"type": "string" | |
}, | |
"state": { | |
"description": "State of the address, also province in Canada", | |
"type": "string" | |
}, | |
"suite": { | |
"description": "Suite number of the address, if applicable", | |
"type": "string" | |
}, | |
"zip": { | |
"description": "Zip code or postal code of the address", | |
"type": "string" | |
} | |
} | |
}, | |
"AmountOffExclusionTypes": { | |
"type": "string", | |
"enum": [ | |
"loyalty", | |
"discount", | |
"promo" | |
] | |
}, | |
"BadRequest": { | |
"description": "Bad Request", | |
"type": "object", | |
"title": "Bad Request", | |
"properties": { | |
"error": { | |
"type": "string" | |
} | |
} | |
}, | |
"Brand": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "brand", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"style": { | |
"type": "object" | |
} | |
} | |
}, | |
"BrandDocument": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "CDL id", | |
"type": "string", | |
"format": "compassdigital.id", | |
"example": "QDaXdXypjNtvw1MpErmqS3d3EyB7o0F7aqklDOzvC1J3zQGpX2F62LoPK5k6c4jWaYNmA0sgJLa7aXL1c8dYPGMp57HZlArjyoP" | |
}, | |
"is_archived": { | |
"type": "boolean" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"type": { | |
"type": "string" | |
}, | |
"upload_date": { | |
"description": "UTC timestamp", | |
"type": "number" | |
}, | |
"url": { | |
"type": "string" | |
} | |
} | |
}, | |
"BrandDocuments": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/BrandDocument" | |
} | |
}, | |
"BrandDocumentsResponse": { | |
"type": "object", | |
"properties": { | |
"documents": { | |
"$ref": "#/definitions/BrandDocuments" | |
} | |
} | |
}, | |
"Brands": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Brand" | |
} | |
}, | |
"Changepassword": { | |
"type": "object", | |
"properties": { | |
"new_password": { | |
"type": "string" | |
}, | |
"password": { | |
"type": "string" | |
} | |
} | |
}, | |
"CheckInUserInfo": { | |
"type": "object", | |
"properties": { | |
"brand": { | |
"description": "Location brand", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"latitude": { | |
"description": "User location latitude", | |
"type": "number" | |
}, | |
"longitude": { | |
"description": "User location longitude", | |
"type": "number" | |
}, | |
"nfc_uri": { | |
"description": "NFC URI required for NFC check-in", | |
"type": "string" | |
} | |
} | |
}, | |
"Checkin": { | |
"type": "object", | |
"properties": { | |
"checkin_id": { | |
"description": "checkin", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"colour": { | |
"description": "The colour that identifies the visit in hex code", | |
"type": "string" | |
}, | |
"date_queued": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2019-05-22T16:28:47.453Z" | |
}, | |
"image": { | |
"description": "The image that identifies the visit", | |
"type": "object", | |
"properties": { | |
"data": { | |
"description": "Base64 encoded image with a transparent background this should be displayed across the entire screen of the User's phone over the background color.", | |
"type": "string" | |
}, | |
"type": { | |
"description": "Mime type of the image ex image/png, image/svg.", | |
"type": "string", | |
"example": "image/png" | |
} | |
} | |
}, | |
"is": { | |
"type": "object", | |
"properties": { | |
"complete": { | |
"description": "`True` when a `User` is attached. A `User` is attached when they are in the store and have visually connected with the in-store visual system.", | |
"type": "boolean" | |
}, | |
"near_store": { | |
"description": "If the `User` is near or far from a store (as determined by the backend). If this is `false` for a prolonged period the client should assume the `User` is not in a standard store and stop trying to attach.", | |
"type": "boolean" | |
} | |
} | |
}, | |
"shoppingcart": { | |
"description": "The shopping cart associated to the user's visit", | |
"type": "string" | |
}, | |
"state": { | |
"description": "The state of the user association process (attaching). Present for NFC check-ins only", | |
"type": "string", | |
"enum": [ | |
"new", | |
"unconfirmed", | |
"associated", | |
"failed" | |
] | |
}, | |
"user_id": { | |
"description": "user", | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
} | |
}, | |
"ClientToken": { | |
"type": "object", | |
"properties": { | |
"access_token": { | |
"description": "Client token (FreedomPay)", | |
"type": "string" | |
}, | |
"clienttoken": { | |
"description": "Client token (BrainTree)", | |
"type": "string" | |
}, | |
"expires_in": { | |
"description": "Token expiry (FreedomPay)", | |
"type": "number" | |
}, | |
"token_type": { | |
"description": "Bearer token (FreedomPay)", | |
"type": "string" | |
} | |
} | |
}, | |
"Company": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "company", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"is": { | |
"type": "object", | |
"properties": { | |
"global_images_enabled": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"label": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
}, | |
"fr": { | |
"type": "string" | |
} | |
} | |
}, | |
"locations": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Location" | |
} | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"sector": { | |
"description": "sector", | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
} | |
}, | |
"CompanyUpdateBody": { | |
"description": "Company Update Request Body", | |
"type": "object", | |
"title": "Company Update Request Body", | |
"properties": { | |
"is": { | |
"type": "object", | |
"properties": { | |
"global_images_enabled": { | |
"description": "Allow Global Menu Images Toggle", | |
"type": "boolean" | |
} | |
} | |
}, | |
"name": { | |
"description": "Company name", | |
"type": "string" | |
} | |
} | |
}, | |
"ConsumerId": { | |
"type": "object", | |
"properties": { | |
"consumerId": { | |
"type": "string" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"ConsumerSessionToken": { | |
"type": "object", | |
"properties": { | |
"access_token": { | |
"type": "string" | |
}, | |
"expires_in": { | |
"type": "number" | |
}, | |
"token_type": { | |
"type": "string" | |
} | |
} | |
}, | |
"Coupon": { | |
"type": "object", | |
"properties": { | |
"description": { | |
"type": "string" | |
}, | |
"dollar_value": { | |
"type": "number" | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"expiry_date": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"id": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"image_url": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"redeem_instructions": { | |
"type": "string" | |
}, | |
"status": { | |
"type": "string" | |
} | |
} | |
}, | |
"CouponCode": { | |
"description": "Loyalty Coupon Code", | |
"type": "object", | |
"title": "Loyalty Coupon Code", | |
"properties": { | |
"code": { | |
"type": "string" | |
} | |
} | |
}, | |
"CreateOptionsGroup": { | |
"type": "object", | |
"required": [ | |
"label", | |
"unique_name", | |
"company" | |
], | |
"properties": { | |
"company": { | |
"description": "company", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "location" | |
}, | |
"is": { | |
"type": "object", | |
"properties": { | |
"disabled": { | |
"type": "boolean" | |
}, | |
"hidden": { | |
"type": "boolean" | |
}, | |
"out_of_stock": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"items": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Option" | |
} | |
}, | |
"label": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
} | |
} | |
}, | |
"max": { | |
"type": "number" | |
}, | |
"meta": { | |
"type": "object" | |
}, | |
"min": { | |
"type": "number" | |
}, | |
"unique_name": { | |
"type": "string" | |
} | |
} | |
}, | |
"CreateOrder": { | |
"type": "object", | |
"properties": { | |
"customer": { | |
"description": "user", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "user" | |
}, | |
"details": { | |
"type": "object", | |
"properties": { | |
"contact_number": { | |
"type": "string" | |
}, | |
"destination": { | |
"type": "string" | |
}, | |
"duration": { | |
"type": "string" | |
}, | |
"instructions": { | |
"description": "Pickup or delivery instructions", | |
"type": "string", | |
"example": "Leave at Front desk" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"order_type": { | |
"type": "string" | |
} | |
} | |
}, | |
"is": { | |
"type": "object", | |
"properties": { | |
"accepted": { | |
"type": "boolean", | |
"x-deprecated": true | |
}, | |
"in_progress": { | |
"type": "boolean" | |
}, | |
"ready": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"location": { | |
"description": "location", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "location" | |
}, | |
"location_brand": { | |
"description": "brand", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "location" | |
}, | |
"mealplan": { | |
"description": "Meal plan info if paying with a mealplan", | |
"$ref": "#/definitions/MealPlan" | |
}, | |
"meta": { | |
"type": "object", | |
"properties": { | |
"source": { | |
"description": "which ui the order was placed on", | |
"type": "string", | |
"enum": [ | |
"web", | |
"mobile" | |
] | |
} | |
} | |
}, | |
"payment": { | |
"type": "object", | |
"properties": { | |
"credit_card": { | |
"$ref": "#/definitions/CreditCard" | |
}, | |
"token": { | |
"type": "string" | |
} | |
} | |
}, | |
"pickup": { | |
"type": "string", | |
"format": "date-time", | |
"x-deprecated": true, | |
"example": "2018-01-15T18:40:51.896Z" | |
}, | |
"pickup_name": { | |
"type": "string", | |
"x-deprecated": true | |
}, | |
"requested_date": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2018-01-15T18:40:51.896Z" | |
}, | |
"shoppingcart": { | |
"description": "shoppingcart", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "shoppingcart" | |
} | |
} | |
}, | |
"CreateSector": { | |
"description": "Payload to create/update a sector", | |
"type": "object", | |
"title": "Sector definition", | |
"properties": { | |
"name": { | |
"description": "Sector name", | |
"type": "string" | |
} | |
} | |
}, | |
"CreditCard": { | |
"type": "object", | |
"properties": { | |
"card_type": { | |
"description": "The credit card type (Amex, Visa, Mastercard, etc...)", | |
"type": "string" | |
}, | |
"last4": { | |
"description": "The last 4 digits of the card number", | |
"type": "string" | |
} | |
} | |
}, | |
"DeliveryDestination": { | |
"description": "Delivery Destination", | |
"type": "object", | |
"title": "Delivery Destination", | |
"required": [ | |
"name", | |
"foodlocker", | |
"address" | |
], | |
"properties": { | |
"address": { | |
"type": "object", | |
"$ref": "#/definitions/Address" | |
}, | |
"foodlocker": { | |
"description": "Boolean to indicate whether the delivery destination is a foodlocker or not", | |
"type": "boolean" | |
}, | |
"id": { | |
"description": "ID of the delivery destination", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"information": { | |
"description": "Additional information of the delivery destination", | |
"type": "string" | |
}, | |
"name": { | |
"description": "Name of the delivery destination", | |
"type": "string" | |
} | |
} | |
}, | |
"DeliveryDestinationIDs": { | |
"description": "Delivery Destination IDs", | |
"type": "object", | |
"title": "Delivery Destination IDs", | |
"properties": { | |
"delivery_destinations": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"DeliveryDestinations": { | |
"description": "Delivery Destinations", | |
"type": "array", | |
"title": "Delivery Destinations", | |
"items": { | |
"$ref": "#/definitions/DeliveryDestination" | |
} | |
}, | |
"DeliveryHours": { | |
"type": "object", | |
"properties": { | |
"day": { | |
"type": "object", | |
"properties": { | |
"end": { | |
"type": "number" | |
}, | |
"start": { | |
"type": "number" | |
} | |
} | |
}, | |
"hours": { | |
"type": "string" | |
}, | |
"id": { | |
"description": "hours", | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
} | |
}, | |
"EarningOpportunity": { | |
"type": "object", | |
"properties": { | |
"cap_reached": { | |
"type": "boolean" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"destination_url": { | |
"type": "string" | |
}, | |
"event_type": { | |
"type": "string" | |
}, | |
"image_url": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"order_index": { | |
"type": "number" | |
}, | |
"points": { | |
"type": "number" | |
}, | |
"rule_type": { | |
"type": "string" | |
} | |
} | |
}, | |
"EnrollResponse": { | |
"type": "object", | |
"properties": { | |
"loyalty_card_id": { | |
"type": "number" | |
}, | |
"points": { | |
"type": "number" | |
} | |
} | |
}, | |
"EnrollmentStatus": { | |
"type": "object", | |
"properties": { | |
"is_enrolled": { | |
"type": "boolean" | |
}, | |
"loyalty_card_id": { | |
"type": "number" | |
} | |
} | |
}, | |
"Error": { | |
"type": "object", | |
"properties": { | |
"code": { | |
"type": "number" | |
}, | |
"message": { | |
"type": "string" | |
} | |
} | |
}, | |
"Event": { | |
"type": "object", | |
"properties": { | |
"channel": { | |
"type": "string" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"detail": { | |
"type": "string" | |
}, | |
"display_detail": { | |
"type": "string" | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"event_type": { | |
"type": "string" | |
}, | |
"expires_at": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"external_id": { | |
"type": "string" | |
}, | |
"id": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"loyalty_provider_user_id": { | |
"type": "number" | |
}, | |
"points": { | |
"type": "number" | |
}, | |
"status": { | |
"type": "number" | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"value": { | |
"type": "number" | |
} | |
} | |
}, | |
"Forgotpassword": { | |
"type": "object", | |
"required": [ | |
"email" | |
], | |
"properties": { | |
"email": { | |
"type": "string" | |
}, | |
"type": { | |
"type": "string", | |
"enum": [ | |
"forgot_password", | |
"new_user" | |
] | |
} | |
} | |
}, | |
"Group": { | |
"description": "A group of locations", | |
"type": "object", | |
"properties": { | |
"address": { | |
"$ref": "#/definitions/Address" | |
}, | |
"distance": { | |
"description": "Distance in meters from the group", | |
"type": "number" | |
}, | |
"id": { | |
"description": "group", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"label": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
}, | |
"fr": { | |
"type": "string" | |
} | |
} | |
}, | |
"locations": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Location" | |
} | |
}, | |
"meta": { | |
"type": "object" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"style": { | |
"type": "object" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"Groups": { | |
"description": "An Array of Groups", | |
"type": "object", | |
"title": "Groups", | |
"properties": { | |
"groups": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Group" | |
} | |
} | |
} | |
}, | |
"HistoryTransaction": { | |
"description": "Loyalty transaction history item", | |
"type": "object", | |
"properties": { | |
"channel": { | |
"type": "string" | |
}, | |
"created_at": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"display_detail": { | |
"type": "string" | |
}, | |
"event_type": { | |
"type": "string" | |
}, | |
"points": { | |
"type": "number" | |
}, | |
"value": { | |
"type": "number" | |
} | |
} | |
}, | |
"Hours": { | |
"type": "object", | |
"properties": { | |
"date": { | |
"type": "object", | |
"properties": { | |
"end": { | |
"type": "string", | |
"format": "date" | |
}, | |
"start": { | |
"type": "string", | |
"format": "date" | |
} | |
} | |
}, | |
"day": { | |
"type": "object", | |
"properties": { | |
"end": { | |
"type": "number" | |
}, | |
"start": { | |
"type": "number" | |
} | |
} | |
}, | |
"hours": { | |
"type": "string" | |
}, | |
"id": { | |
"description": "hours", | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
} | |
}, | |
"Issue": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "issue", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"item": { | |
"additionalProperties": true, | |
"x-deprecated": true | |
}, | |
"items": { | |
"description": "Array of Items with issues", | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/ItemsWithIssue" | |
} | |
}, | |
"meta": { | |
"type": "object", | |
"additionalProperties": true | |
}, | |
"reason": { | |
"description": "Reason for dispute", | |
"type": "string", | |
"x-deprecated": true | |
}, | |
"type": { | |
"type": "string" | |
} | |
} | |
}, | |
"Item": { | |
"description": "Shopping cart item", | |
"type": "object", | |
"required": [ | |
"id", | |
"quantity", | |
"price" | |
], | |
"properties": { | |
"id": { | |
"description": "item id", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"label": { | |
"type": "string" | |
}, | |
"price": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
} | |
} | |
}, | |
"quantity": { | |
"type": "number" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"Items": { | |
"description": "An Array of Items", | |
"type": "object", | |
"title": "Item Array", | |
"properties": { | |
"items": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Item" | |
} | |
} | |
} | |
}, | |
"ItemsWithIssue": { | |
"allOf": [ | |
{ | |
"$ref": "#/definitions/OrderedItem" | |
}, | |
{ | |
"properties": { | |
"reason": { | |
"type": "string" | |
} | |
} | |
} | |
] | |
}, | |
"KDSDevice": { | |
"type": "object", | |
"properties": { | |
"device": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"is": { | |
"type": "object", | |
"properties": { | |
"authorized": { | |
"type": "boolean" | |
}, | |
"deleted": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"lat": { | |
"type": "string" | |
}, | |
"location_group": { | |
"type": "string" | |
}, | |
"long": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"KDSDevices": { | |
"type": "object", | |
"properties": { | |
"devices": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"$ref": "#/definitions/KDSDevice" | |
} | |
} | |
} | |
}, | |
"KDSToken": { | |
"type": "object", | |
"properties": { | |
"access": { | |
"type": "object", | |
"properties": { | |
"expires": { | |
"type": "number" | |
}, | |
"token": { | |
"type": "string" | |
} | |
} | |
}, | |
"device": { | |
"type": "object" | |
} | |
} | |
}, | |
"Key": { | |
"type": "object", | |
"properties": { | |
"key": { | |
"type": "string" | |
} | |
} | |
}, | |
"Location": { | |
"type": "object", | |
"properties": { | |
"address": { | |
"$ref": "#/definitions/Address" | |
}, | |
"app": { | |
"type": "string" | |
}, | |
"brands": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Brand" | |
} | |
}, | |
"date": { | |
"type": "object", | |
"properties": { | |
"created": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2020-01-15T18:40:51.896Z" | |
}, | |
"modified": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2020-01-15T18:40:51.896Z" | |
} | |
} | |
}, | |
"id": { | |
"description": "location", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "location" | |
}, | |
"label": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
}, | |
"fr": { | |
"type": "string" | |
} | |
} | |
}, | |
"latitude": { | |
"type": "number" | |
}, | |
"location_group": { | |
"description": "group", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"location_multigroup": { | |
"description": "multigroup", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"longitude": { | |
"type": "number" | |
}, | |
"market_place": { | |
"type": "object", | |
"properties": { | |
"deliveryHours": { | |
"schema": { | |
"$ref": "#/definitions/DeliveryHours" | |
} | |
}, | |
"hours": { | |
"schema": { | |
"$ref": "#/definitions/Hours" | |
} | |
}, | |
"is": { | |
"type": "object", | |
"properties": { | |
"pickup_supported": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"label": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
}, | |
"fr": { | |
"type": "string" | |
} | |
} | |
}, | |
"location_description": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
}, | |
"fr": { | |
"type": "string" | |
} | |
} | |
}, | |
"logo": { | |
"type": "string" | |
}, | |
"pickup_instruction": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
}, | |
"fr": { | |
"type": "string" | |
} | |
} | |
}, | |
"service_fee": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"value": { | |
"type": "number" | |
} | |
} | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"meta": { | |
"type": "object" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"operation_id": { | |
"type": "number" | |
}, | |
"phone": { | |
"type": "string" | |
}, | |
"search": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"sector": { | |
"description": "sector", | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"Locations": { | |
"description": "An Array of Locations", | |
"type": "object", | |
"title": "Locations", | |
"properties": { | |
"locations": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Location" | |
} | |
} | |
} | |
}, | |
"LoyaltyUser": { | |
"type": "object", | |
"properties": { | |
"balance": { | |
"type": "number" | |
}, | |
"birthday": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"channel": { | |
"type": "string" | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"enrolled_at": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"first_name": { | |
"type": "string" | |
}, | |
"id": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"last_activity": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"last_name": { | |
"type": "string" | |
}, | |
"last_reward_date": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"last_reward_event_id": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"lifetime_balance": { | |
"type": "number" | |
}, | |
"loyalty_provider_user_id": { | |
"type": "number" | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time" | |
} | |
} | |
}, | |
"MarketPlace": { | |
"description": "A representation of a MarketPlace in JSON format", | |
"type": "object", | |
"title": "MarketPlace object", | |
"properties": { | |
"stations": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Station" | |
} | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"MealPlan": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "mealplan", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "mealplan" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"tender": { | |
"description": "tender", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "mealplan" | |
} | |
} | |
}, | |
"Menu": { | |
"properties": { | |
"company": { | |
"description": "company", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "location" | |
}, | |
"date": { | |
"type": "object", | |
"properties": { | |
"created": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"modified": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"published": { | |
"type": "string", | |
"format": "date-time" | |
} | |
} | |
}, | |
"groups": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Group" | |
} | |
}, | |
"id": { | |
"description": "menu", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"is": { | |
"type": "object", | |
"properties": { | |
"calories_edit_enabled": { | |
"type": "boolean" | |
}, | |
"disabled": { | |
"type": "boolean" | |
}, | |
"hidden": { | |
"type": "boolean" | |
}, | |
"item_desc_edit_enabled": { | |
"type": "boolean" | |
}, | |
"item_images_enabled": { | |
"type": "boolean" | |
}, | |
"item_label_edit_enabled": { | |
"type": "boolean" | |
}, | |
"item_showcase_enabled": { | |
"type": "boolean" | |
}, | |
"linked": { | |
"type": "boolean" | |
}, | |
"plu_enabled": { | |
"type": "boolean" | |
}, | |
"promo_exemptions_enabled": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"label": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
} | |
} | |
}, | |
"location_brand": { | |
"description": "brand", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "location" | |
}, | |
"meta": { | |
"type": "object", | |
"properties": { | |
"last_modified_user": { | |
"description": "User ID", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"locked_by_user": { | |
"description": "User ID", | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"parent_id": { | |
"description": "menu", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"sector": { | |
"description": "sector", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "location" | |
} | |
} | |
}, | |
"MenuHours": { | |
"type": "object", | |
"properties": { | |
"hours": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Hours" | |
} | |
}, | |
"id": { | |
"description": "menu", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "menu" | |
}, | |
"is_delivery": { | |
"type": "boolean" | |
}, | |
"is_frictionless": { | |
"type": "boolean" | |
}, | |
"is_pickup": { | |
"type": "boolean" | |
}, | |
"label": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"MenuID": { | |
"description": "Menu Id", | |
"type": "object", | |
"title": "Menu Id", | |
"properties": { | |
"menu": { | |
"type": "string" | |
} | |
} | |
}, | |
"Menus": { | |
"description": "An array of Menus", | |
"type": "object", | |
"title": "Menu Array", | |
"properties": { | |
"menus": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Menu" | |
} | |
} | |
} | |
}, | |
"MultiGroup": { | |
"type": "object", | |
"properties": { | |
"groups": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Group" | |
} | |
}, | |
"id": { | |
"description": "multigroup", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"name": { | |
"type": "string" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"Multigroups": { | |
"description": "An Array of Multigroups", | |
"type": "object", | |
"title": "Multigroups", | |
"properties": { | |
"groups": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/MultiGroup" | |
}, | |
"x-deprecated": true | |
}, | |
"multigroups": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/MultiGroup" | |
} | |
} | |
} | |
}, | |
"Nutrition": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
}, | |
"unit": { | |
"type": "string" | |
} | |
} | |
}, | |
"Offer": { | |
"type": "object", | |
"properties": { | |
"created_at": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"destination_url": { | |
"type": "string" | |
}, | |
"end_date": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"id": { | |
"type": "number" | |
}, | |
"image_url": { | |
"type": "string" | |
}, | |
"instructions": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"pos_code": { | |
"type": "string" | |
}, | |
"pos_instructions": { | |
"type": "string" | |
}, | |
"promotion_type": { | |
"type": "string" | |
}, | |
"start_date": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"target": { | |
"type": "string" | |
}, | |
"terms_and_conditions": { | |
"type": "string" | |
}, | |
"updated_at": { | |
"type": "string", | |
"format": "date-time" | |
} | |
} | |
}, | |
"Option": { | |
"type": "object", | |
"properties": { | |
"amount_off_exclusions": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/AmountOffExclusionTypes" | |
} | |
}, | |
"certified": { | |
"type": "object", | |
"properties": { | |
"vegan": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"id": { | |
"description": "option", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"is": { | |
"type": "object", | |
"properties": { | |
"disabled": { | |
"type": "boolean" | |
}, | |
"hidden": { | |
"type": "boolean" | |
}, | |
"out_of_stock": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"label": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
} | |
} | |
}, | |
"meta": { | |
"type": "object" | |
}, | |
"modifier_sets": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"category": { | |
"type": "string" | |
}, | |
"list": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"nutrition": { | |
"type": "object", | |
"properties": { | |
"calories": { | |
"$ref": "#/definitions/Nutrition" | |
}, | |
"kcal": { | |
"type": "number", | |
"x-deprecated": true | |
} | |
} | |
}, | |
"price": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
}, | |
"currency": { | |
"type": "string" | |
} | |
} | |
}, | |
"sku": { | |
"type": "number" | |
} | |
} | |
}, | |
"Options": { | |
"type": "object", | |
"properties": { | |
"brand": { | |
"description": "brand", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "location" | |
}, | |
"exact_gateway_id": { | |
"type": "string" | |
}, | |
"exact_gateway_password": { | |
"type": "string" | |
}, | |
"freedompay_store_id": { | |
"type": "string" | |
}, | |
"freedompay_terminal_id": { | |
"type": "string" | |
}, | |
"pickup_id": { | |
"description": "pickup_id", | |
"type": "string", | |
"title": "order" | |
}, | |
"submitForSettlement": { | |
"type": "boolean" | |
}, | |
"user_id": { | |
"description": "user_id", | |
"type": "string", | |
"title": "user" | |
} | |
} | |
}, | |
"OptionsGroup": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "modifier_group", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"is": { | |
"type": "object", | |
"properties": { | |
"disabled": { | |
"type": "boolean" | |
}, | |
"hidden": { | |
"type": "boolean" | |
}, | |
"out_of_stock": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"items": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Option" | |
} | |
}, | |
"label": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
} | |
} | |
}, | |
"max": { | |
"type": "number" | |
}, | |
"meta": { | |
"type": "object" | |
}, | |
"min": { | |
"type": "number" | |
}, | |
"unique_name": { | |
"type": "string" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"OptionsGroupList": { | |
"type": "object", | |
"properties": { | |
"modifier_groups": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/OptionsGroup" | |
} | |
} | |
} | |
}, | |
"Order": { | |
"type": "object", | |
"properties": { | |
"customer": { | |
"description": "user", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "user" | |
}, | |
"date": { | |
"type": "object", | |
"properties": { | |
"completion_warning": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2018-01-15T18:40:51.896Z" | |
}, | |
"created": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2018-01-15T18:40:51.896Z" | |
}, | |
"modified": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2018-01-15T18:40:51.896Z" | |
}, | |
"ready": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2018-01-15T18:40:51.896Z" | |
}, | |
"should_start": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2018-01-15T18:40:51.896Z" | |
}, | |
"started": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2018-01-15T18:40:51.896Z" | |
} | |
} | |
}, | |
"details": { | |
"type": "object", | |
"properties": { | |
"contact_number": { | |
"type": "string" | |
}, | |
"destination": { | |
"type": "string" | |
}, | |
"display_id": { | |
"type": "string" | |
}, | |
"duration": { | |
"type": "string" | |
}, | |
"instructions": { | |
"description": "Pickup or delivery instructions", | |
"type": "string", | |
"example": "Leave at Front desk" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"order_type": { | |
"type": "string" | |
} | |
} | |
}, | |
"id": { | |
"description": "order", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"is": { | |
"type": "object", | |
"properties": { | |
"accepted": { | |
"type": "boolean", | |
"x-deprecated": true | |
}, | |
"delivered": { | |
"type": "boolean" | |
}, | |
"in_progress": { | |
"type": "boolean" | |
}, | |
"out_for_delivery": { | |
"type": "boolean" | |
}, | |
"ready": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"issue": { | |
"$ref": "#/definitions/Issue" | |
}, | |
"location": { | |
"description": "location", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "location" | |
}, | |
"location_brand": { | |
"description": "brand", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "location" | |
}, | |
"meal_exchange": { | |
"$ref": "#/definitions/MealPlan" | |
}, | |
"meal_swipes": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "mealplan", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "mealplan" | |
}, | |
"swipes": { | |
"type": "number" | |
}, | |
"tender": { | |
"description": "tender", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "mealplan" | |
}, | |
"tender_name": { | |
"type": "string" | |
}, | |
"total": { | |
"type": "number" | |
} | |
} | |
}, | |
"mealplan": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "mealplan", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "mealplan" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"tender": { | |
"description": "tender", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "mealplan" | |
} | |
} | |
}, | |
"meta": { | |
"type": "object", | |
"properties": { | |
"checkin_uuid": { | |
"description": "Check-in UUID for frictionless orders", | |
"type": "string" | |
}, | |
"refunds": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/RefundTransaction" | |
} | |
}, | |
"source": { | |
"description": "which ui the order was placed on", | |
"type": "string", | |
"enum": [ | |
"web", | |
"mobile" | |
] | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"payment": { | |
"type": "object", | |
"properties": { | |
"credit_card": { | |
"$ref": "#/definitions/CreditCard" | |
}, | |
"digital_wallet_pay": { | |
"type": "string" | |
}, | |
"token": { | |
"description": "payment", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "payment" | |
} | |
} | |
}, | |
"pickup": { | |
"type": "string", | |
"format": "date-time", | |
"x-deprecated": true, | |
"example": "2018-01-15T18:40:51.896Z" | |
}, | |
"pickup_id": { | |
"type": "string", | |
"x-deprecated": true | |
}, | |
"pickup_name": { | |
"type": "string", | |
"x-deprecated": true | |
}, | |
"requested_date": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2018-01-15T18:40:51.896Z" | |
}, | |
"runner": { | |
"description": "Delivery user", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "user" | |
}, | |
"shoppingcart": { | |
"description": "shoppingcart", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "shoppingcart" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"OrderId": { | |
"description": "Order Id", | |
"type": "object", | |
"title": "Order Id", | |
"properties": { | |
"id": { | |
"description": "order", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "order" | |
} | |
} | |
}, | |
"OrderIssue": { | |
"type": "object", | |
"properties": { | |
"item": { | |
"additionalProperties": true, | |
"x-deprecated": true | |
}, | |
"items": { | |
"description": "Array of Items with issues", | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/ItemsWithIssue" | |
} | |
}, | |
"reason": { | |
"description": "Reason for dispute", | |
"type": "string", | |
"x-deprecated": true | |
}, | |
"type": { | |
"description": "Type of issue", | |
"type": "string" | |
} | |
} | |
}, | |
"OrderedItem": { | |
"type": "object", | |
"required": [ | |
"id", | |
"_index" | |
], | |
"properties": { | |
"_index": { | |
"description": "index", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"_loyalty": { | |
"description": "loyalty coupon applied to this item", | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
} | |
} | |
}, | |
"_promo": { | |
"description": "Promo applied to this item", | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
} | |
} | |
}, | |
"_subtotal": { | |
"description": "Subtotal of the item including all options", | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
} | |
} | |
}, | |
"id": { | |
"description": "item", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "menu" | |
}, | |
"meta": { | |
"type": "object" | |
}, | |
"options": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"items": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"_index": { | |
"description": "index", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"id": { | |
"description": "option", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "menu" | |
}, | |
"meta": { | |
"type": "object" | |
} | |
} | |
} | |
}, | |
"label": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"price": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
} | |
} | |
}, | |
"quantity": { | |
"type": "number" | |
}, | |
"unit": { | |
"type": "number" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"Orders": { | |
"description": "An Array of Orders", | |
"type": "object", | |
"title": "Order Array", | |
"properties": { | |
"orders": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Order" | |
} | |
} | |
} | |
}, | |
"POS": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "pos", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"meta": { | |
"type": "object" | |
}, | |
"type": { | |
"type": "string" | |
} | |
} | |
}, | |
"PartnerStatus": { | |
"type": "string", | |
"enum": [ | |
"await_partner", | |
"await_scout", | |
"completed" | |
] | |
}, | |
"PatchCheckin": { | |
"type": "object", | |
"properties": { | |
"date_queued": { | |
"description": "Date when the checkin was put into the queue to be processed.", | |
"type": "number", | |
"example": 1558542571712 | |
}, | |
"state": { | |
"description": "The state of the user association process (attaching). Present for NFC check-ins only", | |
"type": "string", | |
"enum": [ | |
"new", | |
"unconfirmed", | |
"associated", | |
"failed" | |
] | |
} | |
} | |
}, | |
"PatchMenu": { | |
"properties": { | |
"id": { | |
"description": "menu", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"meta": { | |
"type": "object", | |
"properties": { | |
"locked_by_user": { | |
"description": "User ID", | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
} | |
} | |
} | |
}, | |
"Payment": { | |
"description": "Payment Details", | |
"type": "object", | |
"title": "Payment", | |
"properties": { | |
"credit_card": { | |
"type": "object", | |
"properties": { | |
"card_type": { | |
"type": "string" | |
}, | |
"last4": { | |
"type": "string" | |
}, | |
"total": { | |
"type": "number" | |
} | |
} | |
}, | |
"digital_wallet_pay": { | |
"type": "object", | |
"properties": { | |
"total": { | |
"type": "number" | |
}, | |
"wallet_type": { | |
"type": "string" | |
} | |
} | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"meal_swipes": { | |
"type": "object", | |
"required": [ | |
"id", | |
"total" | |
], | |
"properties": { | |
"id": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"rate": { | |
"description": "rate per swipe in cents", | |
"type": "number" | |
}, | |
"swipes": { | |
"type": "number" | |
}, | |
"tender": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"tender_name": { | |
"type": "string" | |
}, | |
"tender_type": { | |
"type": "string" | |
}, | |
"total": { | |
"type": "number" | |
} | |
} | |
}, | |
"mealplan": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"tender": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"total": { | |
"type": "number" | |
} | |
} | |
} | |
} | |
}, | |
"PaymentCard": { | |
"type": "object", | |
"properties": { | |
"billingAddress": { | |
"type": "object", | |
"properties": { | |
"postalCode": { | |
"type": "string" | |
} | |
} | |
}, | |
"cardType": { | |
"type": "string" | |
}, | |
"expiryMonth": { | |
"type": "number" | |
}, | |
"expiryYear": { | |
"type": "number" | |
}, | |
"isPreferred": { | |
"type": "boolean" | |
}, | |
"maskedCardNumber": { | |
"type": "string" | |
}, | |
"nameOnCard": { | |
"type": "string" | |
}, | |
"nickname": { | |
"type": "string" | |
}, | |
"token": { | |
"type": "string" | |
}, | |
"tokenExpirationDate": { | |
"type": "string" | |
} | |
} | |
}, | |
"PaymentMethod": { | |
"type": "object", | |
"properties": { | |
"card_type": { | |
"type": "string" | |
}, | |
"cardholder_name": { | |
"type": "string" | |
}, | |
"date": { | |
"type": "object", | |
"properties": { | |
"created": { | |
"type": "string" | |
}, | |
"last_used": { | |
"type": "number" | |
}, | |
"modified": { | |
"type": "string" | |
} | |
} | |
}, | |
"expiration": { | |
"type": "object", | |
"properties": { | |
"expired": { | |
"type": "boolean" | |
}, | |
"month": { | |
"type": "number" | |
}, | |
"year": { | |
"type": "number" | |
} | |
} | |
}, | |
"image": { | |
"type": "string" | |
}, | |
"last4": { | |
"type": "string" | |
}, | |
"postal_code": { | |
"type": "string" | |
}, | |
"token": { | |
"description": "payment", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "payment" | |
}, | |
"type": { | |
"type": "string" | |
} | |
} | |
}, | |
"Permission": { | |
"type": "string", | |
"example": "read:user:1234" | |
}, | |
"Points": { | |
"type": "object", | |
"properties": { | |
"points": { | |
"type": "number" | |
} | |
} | |
}, | |
"PostOrPatchDeliveryDestination": { | |
"description": "Delivery Destination for the post or patch request body", | |
"type": "object", | |
"title": "Post or Patch Delivery Destination", | |
"required": [ | |
"name", | |
"foodlocker", | |
"address" | |
], | |
"properties": { | |
"address": { | |
"type": "object", | |
"$ref": "#/definitions/Address" | |
}, | |
"foodlocker": { | |
"description": "Boolean to indicate whether the delivery destination is a foodlocker or not", | |
"type": "boolean" | |
}, | |
"information": { | |
"description": "Additional information of the delivery destination", | |
"type": "string" | |
}, | |
"name": { | |
"description": "Name of the delivery destination", | |
"type": "string" | |
} | |
} | |
}, | |
"Promo": { | |
"description": "Promo Details", | |
"type": "object", | |
"title": "Promo", | |
"properties": { | |
"code": { | |
"type": "string" | |
}, | |
"email": { | |
"type": "string" | |
} | |
} | |
}, | |
"RecordResponse": { | |
"description": "Returns points earned and CDL id of the event", | |
"type": "object", | |
"properties": { | |
"event_id": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"points": { | |
"type": "number" | |
} | |
} | |
}, | |
"RefreshToken": { | |
"type": "object", | |
"properties": { | |
"refresh_token": { | |
"type": "string" | |
} | |
} | |
}, | |
"Refund": { | |
"type": "object", | |
"properties": { | |
"reason": { | |
"type": "string" | |
}, | |
"refunds": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/RefundItem" | |
} | |
} | |
} | |
}, | |
"RefundItem": { | |
"type": "object", | |
"properties": { | |
"_index": { | |
"description": "unique index within cart", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"id": { | |
"description": "Item ID", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"price": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"description": "Price of the item", | |
"type": "number" | |
} | |
} | |
}, | |
"quantity": { | |
"description": "Quantity of the item", | |
"type": "number" | |
}, | |
"reason": { | |
"description": "Reason for refund", | |
"type": "string" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"RefundTransaction": { | |
"type": "object", | |
"properties": { | |
"original_shoppingcart": { | |
"description": "shoppingcart", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"refund_date": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2018-01-15T18:40:51.896Z" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"Resetpassword": { | |
"type": "object", | |
"properties": { | |
"password": { | |
"type": "string" | |
} | |
} | |
}, | |
"Reward": { | |
"type": "object", | |
"properties": { | |
"description": { | |
"type": "string" | |
}, | |
"dollar_value": { | |
"type": "number" | |
}, | |
"expiration_date": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"id": { | |
"type": "number" | |
}, | |
"image_url": { | |
"type": "string" | |
}, | |
"instructions": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"points_needed_to_redeem": { | |
"type": "number" | |
}, | |
"points_remaining_to_redeem": { | |
"type": "number" | |
}, | |
"status": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"RewardInfo": { | |
"type": "object", | |
"properties": { | |
"cost": { | |
"type": "number" | |
}, | |
"coupon_id": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"event_id": { | |
"type": "number" | |
}, | |
"expiry_date": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"id": { | |
"type": "number" | |
}, | |
"image_url": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"points": { | |
"type": "number" | |
}, | |
"pos_code": { | |
"type": "string" | |
}, | |
"pos_instructions": { | |
"type": "string" | |
}, | |
"redeem_instructions": { | |
"type": "string" | |
}, | |
"reward_type": { | |
"type": "string" | |
} | |
} | |
}, | |
"Scopes": { | |
"type": "object", | |
"properties": { | |
"acl": { | |
"$ref": "#/definitions/Acl" | |
}, | |
"scopes": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Permission" | |
} | |
} | |
} | |
}, | |
"Sector": { | |
"type": "object", | |
"properties": { | |
"companies": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Company" | |
} | |
}, | |
"id": { | |
"description": "sector", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"label": { | |
"type": "object", | |
"properties": { | |
"en": { | |
"type": "string" | |
}, | |
"fr": { | |
"type": "string" | |
} | |
} | |
}, | |
"name": { | |
"type": "string" | |
} | |
} | |
}, | |
"Sectors": { | |
"description": "Array of Sectors", | |
"type": "object", | |
"title": "Sectors", | |
"properties": { | |
"sectors": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Sector" | |
} | |
} | |
} | |
}, | |
"ShoppingCart": { | |
"type": "object", | |
"properties": { | |
"brand": { | |
"description": "brand", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "location" | |
}, | |
"date": { | |
"type": "object" | |
}, | |
"delivery_fee": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
} | |
} | |
}, | |
"discount": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
}, | |
"amount_off": { | |
"type": "number" | |
}, | |
"code": { | |
"type": "string" | |
}, | |
"percent_off": { | |
"type": "number" | |
} | |
} | |
}, | |
"exemptions": { | |
"type": "object", | |
"properties": { | |
"tax": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"id": { | |
"description": "shoppingcart", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"is": { | |
"type": "object", | |
"properties": { | |
"mx_cart": { | |
"description": "If an order should be paid with meal exchange. If true, this will calculate meals total.", | |
"type": "boolean" | |
}, | |
"type": { | |
"description": "Shoppingcart Type: delivery, pickup", | |
"type": "string", | |
"enum": [ | |
"delivery", | |
"pickup", | |
"scan_and_go" | |
] | |
} | |
} | |
}, | |
"items": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Item" | |
} | |
}, | |
"location": { | |
"description": "location", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "location" | |
}, | |
"loyalty": { | |
"type": "object", | |
"properties": { | |
"coupon": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
}, | |
"amount_off": { | |
"type": "number" | |
}, | |
"code": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
} | |
} | |
}, | |
"order_loyalty_points": { | |
"description": "Points to be earned for this shopping cart total", | |
"type": "boolean" | |
} | |
} | |
}, | |
"menu": { | |
"description": "menu", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "menu" | |
}, | |
"order": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "order", | |
"type": "string", | |
"format": "compassdigital.id", | |
"title": "order" | |
} | |
} | |
}, | |
"payment_method": { | |
"type": "object", | |
"properties": { | |
"credit_card": { | |
"type": "object", | |
"properties": { | |
"card_type": { | |
"type": "string" | |
}, | |
"last4": { | |
"type": "string" | |
}, | |
"total": { | |
"type": "number" | |
} | |
} | |
}, | |
"digital_wallet_pay": { | |
"type": "object", | |
"properties": { | |
"total": { | |
"type": "number" | |
}, | |
"wallet_type": { | |
"type": "string" | |
} | |
} | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"meal_exchange": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"tender": { | |
"type": "string" | |
} | |
} | |
}, | |
"meal_swipes": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"rate": { | |
"type": "number" | |
}, | |
"swipes": { | |
"type": "number" | |
}, | |
"tender": { | |
"type": "string" | |
}, | |
"tender_name": { | |
"type": "string" | |
}, | |
"tender_type": { | |
"type": "string" | |
}, | |
"total": { | |
"type": "number" | |
} | |
} | |
}, | |
"mealplan": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"tender": { | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"total": { | |
"type": "number" | |
} | |
} | |
} | |
} | |
}, | |
"promo": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
}, | |
"amount_off": { | |
"type": "number" | |
}, | |
"app": { | |
"type": "string" | |
}, | |
"code": { | |
"type": "string" | |
}, | |
"percent_off": { | |
"type": "number" | |
} | |
} | |
}, | |
"service_fee": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
} | |
} | |
}, | |
"sub_total": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
} | |
} | |
}, | |
"taxes": { | |
"$ref": "#/definitions/taxes" | |
}, | |
"total": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
}, | |
"meals": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
}, | |
"ShoppingCarts": { | |
"description": "An Array of Shopping Carts", | |
"type": "object", | |
"title": "Shopping Cart Array", | |
"properties": { | |
"shoppingcarts": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/ShoppingCart" | |
} | |
} | |
} | |
}, | |
"Station": { | |
"description": "A representation of a MarketPlace station in JSON format", | |
"type": "object", | |
"title": "MarketPlace station object", | |
"properties": { | |
"brand": { | |
"description": "CDL id", | |
"type": "string", | |
"format": "compassdigital.id", | |
"example": "QDaXdXypjNtvw1MpErmqS3d3EyB7o0F7aqklDOzvC1J3zQGpX2F62LoPK5k6c4jWaYNmA0sgJLa7aXL1c8dYPGMp57HZlArjyoP" | |
}, | |
"menu": { | |
"description": "CDL id", | |
"type": "string", | |
"format": "compassdigital.id", | |
"example": "QDaXdXypjNtvw1MpErmqS3d3EyB7o0F7aqklDOzvC1J3zQGpX2F62LoPK5k6c4jWaYNmA0sgJLa7aXL1c8dYPGMp57HZlArjyoP" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"Success": { | |
"type": "object", | |
"properties": { | |
"success": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"TimeSlots": { | |
"description": "Array of Timeslots", | |
"type": "object", | |
"title": "TimeSlots", | |
"properties": { | |
"timeslots": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/Timeslot" | |
} | |
} | |
} | |
}, | |
"Timeslot": { | |
"type": "object", | |
"properties": { | |
"brand_id": { | |
"description": "brand", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"duration": { | |
"type": "string" | |
}, | |
"id": { | |
"description": "timeslot id (optional)", | |
"type": "number", | |
"format": "compassdigital.id" | |
}, | |
"is_available": { | |
"type": "boolean" | |
}, | |
"number_orders": { | |
"type": "number" | |
}, | |
"start_time": { | |
"type": "string" | |
} | |
} | |
}, | |
"TokenInformation": { | |
"type": "object", | |
"properties": { | |
"accountNumberMasked": { | |
"type": "string" | |
}, | |
"brand": { | |
"type": "string" | |
}, | |
"cardExpirationMonth": { | |
"type": "string" | |
}, | |
"cardExpirationYear": { | |
"type": "string" | |
}, | |
"cardType": { | |
"type": "string" | |
}, | |
"newToken": { | |
"type": "string" | |
}, | |
"posCardType": { | |
"type": "string" | |
}, | |
"posData": { | |
"type": "string" | |
}, | |
"token": { | |
"type": "string" | |
}, | |
"tokenExpiration": { | |
"type": "string" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"Transaction": { | |
"type": "object", | |
"properties": { | |
"success": { | |
"type": "boolean" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"UpdateTokenInformation": { | |
"type": "object", | |
"properties": { | |
"billingAddress": { | |
"type": "object", | |
"properties": { | |
"city": { | |
"type": "string" | |
}, | |
"country": { | |
"type": "string" | |
}, | |
"postalCode": { | |
"type": "string" | |
}, | |
"state": { | |
"type": "string" | |
}, | |
"street1": { | |
"type": "string" | |
}, | |
"street2": { | |
"type": "string" | |
} | |
} | |
}, | |
"expiryMonth": { | |
"type": "string" | |
}, | |
"expiryYear": { | |
"type": "string" | |
}, | |
"isPreferred": { | |
"type": "boolean" | |
}, | |
"nameOnCard": { | |
"type": "string" | |
}, | |
"nickname": { | |
"type": "string" | |
}, | |
"token": { | |
"type": "string" | |
}, | |
"tokenExpirationDate": { | |
"type": "string" | |
} | |
} | |
}, | |
"User": { | |
"type": "object", | |
"properties": { | |
"birthday": { | |
"type": "string" | |
}, | |
"date": { | |
"type": "object", | |
"properties": { | |
"created": { | |
"type": "string" | |
}, | |
"modified": { | |
"type": "string" | |
} | |
} | |
}, | |
"email": { | |
"type": "string" | |
}, | |
"gender": { | |
"type": "string", | |
"enum": [ | |
"male", | |
"female", | |
"non-binary" | |
] | |
}, | |
"id": { | |
"description": "user", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"is": { | |
"type": "object", | |
"properties": { | |
"disabled": { | |
"type": "boolean" | |
}, | |
"verified": { | |
"description": "If the users email is verified", | |
"type": "boolean" | |
} | |
} | |
}, | |
"location_group": { | |
"description": "User location group", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"meta": { | |
"type": "object", | |
"properties": { | |
"marketing_opt_in": { | |
"type": "boolean" | |
}, | |
"marketing_opt_in_date": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2019-05-22T16:28:47.453Z" | |
}, | |
"marketing_opt_in_source": { | |
"type": "string", | |
"enum": [ | |
"App", | |
"Web" | |
] | |
}, | |
"mealplan_added_date": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2020-04-22T16:28:47.453Z" | |
}, | |
"order_status_notification": { | |
"description": "Stores notification preference for order status, opt-in/opt-out from receiving order status update notifications", | |
"type": "object", | |
"properties": { | |
"send_emails": { | |
"type": "boolean" | |
}, | |
"send_emails_date_updated": { | |
"type": "string", | |
"format": "date-time", | |
"example": "2020-04-22T16:28:47.453Z" | |
} | |
} | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"name": { | |
"type": "object", | |
"properties": { | |
"first": { | |
"type": "string" | |
}, | |
"last": { | |
"type": "string" | |
} | |
} | |
}, | |
"password": { | |
"type": "string", | |
"x-usage": "Only available to POST /user" | |
}, | |
"permissions": { | |
"$ref": "#/definitions/Scopes" | |
}, | |
"phone": { | |
"type": "number" | |
}, | |
"realm": { | |
"description": "realm", | |
"type": "string", | |
"format": "compassdigital.id", | |
"x-usage": "Only available to POST /user" | |
} | |
} | |
}, | |
"UserDeviceAuthBody": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"description": "KDS IDFA id", | |
"type": "string", | |
"format": "compassdigital.id" | |
}, | |
"lat": { | |
"description": "Location latitude", | |
"type": "string" | |
}, | |
"long": { | |
"description": "Location longitude", | |
"type": "string" | |
}, | |
"serial_number": { | |
"description": "CDL encoded id of a serial_number", | |
"type": "string" | |
} | |
} | |
}, | |
"UserId": { | |
"type": "object", | |
"properties": { | |
"user_id": { | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
} | |
}, | |
"Users": { | |
"type": "object", | |
"properties": { | |
"users": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/User" | |
} | |
} | |
} | |
}, | |
"VerifyEmail": { | |
"type": "object", | |
"required": [ | |
"verification_token" | |
], | |
"properties": { | |
"verification_token": { | |
"description": "Token to verify user email", | |
"type": "string" | |
} | |
} | |
}, | |
"ZippedExcelExport": { | |
"description": "Base64 zipped excel file", | |
"type": "object", | |
"title": "Menu", | |
"properties": { | |
"file": { | |
"type": "string" | |
}, | |
"format": { | |
"description": "Base64 encoded file format", | |
"type": "string", | |
"x-enum": [ | |
"zip" | |
] | |
} | |
} | |
}, | |
"auth": { | |
"type": "object", | |
"properties": { | |
"access": { | |
"type": "object", | |
"properties": { | |
"expires": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"token": { | |
"type": "string" | |
} | |
} | |
}, | |
"profile": { | |
"$ref": "#/definitions/User" | |
}, | |
"refresh": { | |
"type": "object", | |
"properties": { | |
"expires": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"token": { | |
"type": "string" | |
} | |
} | |
}, | |
"token": { | |
"type": "string", | |
"x-deprecated": true | |
}, | |
"user": { | |
"description": "user", | |
"type": "string", | |
"format": "compassdigital.id" | |
} | |
} | |
}, | |
"success": { | |
"type": "object", | |
"properties": { | |
"success": { | |
"type": "boolean" | |
} | |
} | |
}, | |
"taxes": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number" | |
}, | |
"breakdown": { | |
"type": "object", | |
"properties": { | |
"combined_tax_rate": { | |
"type": "number" | |
}, | |
"gst": { | |
"type": "number" | |
}, | |
"pst": { | |
"type": "number" | |
}, | |
"tax_collectable": { | |
"type": "number" | |
}, | |
"taxable_amount": { | |
"type": "number" | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"rate": { | |
"type": "number" | |
} | |
} | |
} | |
}, | |
"securityDefinitions": { | |
"basicAuth": { | |
"type": "basic" | |
}, | |
"bearerAuth": { | |
"type": "apiKey", | |
"name": "Authorization", | |
"in": "header" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment