{ "swagger": "2.0", "info": { "description": "", "version": "v1", "title": "Integration API", "termsOfService": "https://www.trycake.com/legal/developer-api-terms/" }, "host": "sandbox.cake.net", "basePath": "/integrations/v1", "tags": [ { "name": "Integration", "description": "These endpoints are used to manage the third parties with CAKE platform" } ], "schemes": [ "https" ], "paths": { "/activate": { "post": { "tags": [ "Integration" ], "summary": "This endpoint is used to activate an operator to the CAKE platform for third-party services", "operationId": "activateUsingPOST", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "parameters": [ { "name": "X-Correlation-Id", "in": "header", "description": "Correlation Id(UUID) which is used to track the request throughout the request’s life cycle", "required": true, "type": "string" }, { "name": "X-Integrator-Id", "in": "header", "description": "Identifier of the Third Party integrator", "required": true, "type": "string" }, { "in": "body", "name": "accountId", "description": "The unique ID on the CAKE platform to identify each operator", "required": true, "schema": { "type": "string" } }, { "in": "body", "name": "externalAccountId", "description": "The external account Id", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ActivationResponse" } }, "400": { "description": "800200 - Account Id is null/empty \n 800201 - Account Id not found \n800202 - Account is already activated \n800500 - Integrator id is null/empty \n800501 - Integrator id is incorrect \n", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "800000 - Server error", "schema": { "$ref": "#/definitions/Error" } } }, "security": [ { "oauthschema": [ "global" ] } ], "deprecated": false } }, "/id-exchange": { "get": { "tags": [ "Integration" ], "summary": "This endpoint is used to exchange the product id for the account id", "operationId": "exchangeProductIdForAccountIdUsingGET", "produces": [ "application/json" ], "parameters": [ { "name": "X-Correlation-Id", "in": "header", "description": "Correlation Id(UUID) which is used to track the request throughout the request’s life cycle", "required": true, "type": "string" }, { "name": "X-Integrator-Id", "in": "header", "description": "Identifier of the Third Party integrator", "required": true, "type": "string" }, { "name": "productId", "in": "query", "description": "The product id which identifies the product uniquely in CAKE platform", "required": true, "type": "string", "allowEmptyValue": false }, { "name": "productType", "in": "query", "description": "The product type", "required": true, "type": "string", "allowEmptyValue": false } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "800100 - Product Id is null/empty \n800101 - Product Id not found \n 800102 - Product Type is null/empty \n800103 - Product Type not found \n 800500 - Integrator id is null/empty \n800501 - Integrator id is incorrect \n800502 - Correlation Id not found \n800800 - One or more parameters are invalid \n", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "800000 - Server error", "schema": { "$ref": "#/definitions/Error" } } }, "security": [ { "oauthschema": [ "global" ] } ], "deprecated": false } }, "/status": { "get": { "tags": [ "Integration" ], "summary": "This endpoint is used to retrieve integration status of an account", "operationId": "getIntegrationStatusUsingGET", "produces": [ "application/json" ], "parameters": [ { "name": "X-Correlation-Id", "in": "header", "description": "Correlation Id(UUID) which is used to track the request throughout the request’s life cycle", "required": true, "type": "string" }, { "name": "X-Integrator-Id", "in": "header", "description": "Identifier of the Third Party integrator", "required": true, "type": "string" }, { "name": "accountId", "in": "query", "description": "The unique ID on the CAKE platform to identify each operator", "required": true, "type": "string", "allowEmptyValue": false }, { "name": "productType", "in": "query", "description": "The product type", "required": true, "type": "string", "allowEmptyValue": false } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/IntegrationStatus" } }, "400": { "description": "800102 - Product Type is null/empty \n800103 - Product Type not found \n 800200 - Account Id is null/empty \n 800201 - Account Id not found \n800500 - Integrator id is null/empty \n800501 - Integrator id is incorrect \n800502 - Correlation Id not found \n800800 - One or more parameters are invalid \n", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "800000 - Server error", "schema": { "$ref": "#/definitions/Error" } } }, "security": [ { "oauthschema": [ "global" ] } ], "deprecated": false } } }, "securityDefinitions": { "oauthschema": { "type": "oauth2", "tokenUrl": "https://sandbox.cake.net/oauth/token", "flow": "application", "scopes": { "global": "global" } } }, "definitions": { "ActivationResponse": { "type": "object", "properties": { "accountId": { "type": "string" }, "address1": { "type": "string" }, "address2": { "type": "string" }, "city": { "type": "string" }, "country": { "type": "string" }, "externalAccountId": { "type": "string" }, "message": { "type": "string" }, "name": { "type": "string" }, "state": { "type": "string" }, "timeZone": { "type": "string" }, "zipCode": { "type": "string" } }, "title": "ActivationResponse" }, "Error": { "type": "object", "properties": { "additionalInfo": { "type": "object" }, "code": { "type": "string" }, "description": { "type": "string" } }, "title": "Error" }, "IntegrationStatus": { "type": "object", "properties": { "accountStatus": { "type": "string" }, "externalAccountId": { "type": "string" }, "integrationId": { "type": "string" } }, "title": "IntegrationStatus" } } }