{ "openapi": "3.0.0", "info": { "title": "License Manager API", "description": "## Welcome!\r\n\r\nThe License Manager API allows you to create users, modify their names and e-mails, as well as add and remove roles from users.\r\n\r\n### ATTRIBUTES\r\n\r\n|Attribute name | Description |\r\n|:------------|--------------|\r\n|accountName | Account name in VTEX License Manager |\r\n|environment | Environment on which you want to run the query e.g. vtexcommercestable |\r\n|userId | Unique user identification string |\r\n|roleId | Integer that represents a role, can be looked up on the License Manager UI |", "contact": {}, "version": "1.0" }, "servers": [ { "url": "https://{accountName}.{environment}.com.br", "description": "VTEX server url" } ], "paths": { "/api/license-manager/users/{userId}": { "get": { "tags": ["User"], "summary": "Get User", "description": "", "operationId": "GetUser", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } }, { "name": "Content-Type", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "example": "application/json" } }, { "name": "environment", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } }, { "name": "userId", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false }, "put": { "tags": ["User"], "summary": "Update User", "description": "", "operationId": "UpdateUser", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } }, { "name": "userId", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserRequest" }, "example": { "email": "mynewuser@mydomain.com", "name": "My New User Name Changed" } } }, "required": true }, "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false } }, "/api/license-manager/users": { "post": { "tags": ["User"], "summary": "Create User", "description": "", "operationId": "CreateUser", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserRequest" }, "example": { "name": "My New User Name", "email": "mynewuser@mydomain.com" } } }, "required": true }, "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false } }, "/api/license-manager/users/{userId}/roles": { "put": { "tags": ["Roles"], "summary": "Put Roles in User/appKey", "description": "", "operationId": "PutRolesinUser", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } }, { "name": "userId", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "integer", "format": "int32" }, "description": "" }, "example": [9000, 9111, 9333, 9444] } }, "required": true }, "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false }, "get": { "tags": ["Roles"], "summary": "Get Roles by User/appKey", "description": "", "operationId": "GetRolesbyUser", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } }, { "name": "Content-Type", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "example": "application/json" } }, { "name": "environment", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } }, { "name": "userId", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false } }, "/api/license-manager/users/{userId}/roles/{roleId}": { "delete": { "tags": ["Roles"], "summary": "Remove Role from User/appKey", "description": "", "operationId": "RemoveRolefromUser", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } }, { "name": "Content-Type", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "example": "application/json" } }, { "name": "environment", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } }, { "name": "userId", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } }, { "name": "roleId", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false } }, "/api/vlm/appkeys": { "post": { "tags": ["App Keys"], "summary": "Create new appkey", "description": "", "operationId": "Createnewappkey", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatenewappkeyRequest" }, "example": { "label": "my new appkey" } } }, "required": true }, "responses": { "200": { "description": "", "headers": {}, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Createnewappkey-Example1" }, "example": { "id": "a2555e95-9db8-48be-94f8-2a28577c0b4a", "appKey": "vtexappkey-myaccount-ORYNWX", "appToken": "WNVUJKYFKJFLTPXHQGAZDHPBHSDQVJJWSFZUBOGCKPEXAIFHTPANKJTOXUKRIIJAAJSOPCFBAXOODRABMUXFJVLJLKWGEOUCFDXRPRRQKYNNUFLGTIEOKERFXJCFFYXL", "label": "my new appkey", "createdIn": "2018-07-04T14:09:08.2718405Z", "isActive": true } } } } }, "deprecated": false }, "get": { "tags": ["App Keys"], "summary": "Get appkeys from account", "description": "", "operationId": "Getappkeysfromaccount", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } }, { "name": "Content-Type", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "example": "application/json" } }, { "name": "environment", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "headers": {}, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Getappkeysfromaccount" } }, "example": [ { "id": "a2555e95-9db8-48be-94f8-2a28577c0b4a", "appKey": "vtexappkey-myaccount-ORYNWX", "label": "my new appkey", "createdIn": "2018-07-04T14:09:08.2718405Z", "isActive": true }, { "id": "a2555e95-9db8-48be-94f8-2a28577c0b4a", "appKey": "vtexappkey-myaccount-ORKPDC", "label": "my other appkey", "createdIn": "2018-07-04T14:09:08.2718405Z", "isActive": true } ] } } } }, "deprecated": false } }, "/api/vlm/appkeys/{id}": { "put": { "tags": ["App Keys"], "summary": "Update appkey", "description": "", "operationId": "Updateappkey", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } }, { "name": "id", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateappkeyRequest" }, "example": { "isActive": false } } }, "required": true }, "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false } }, "/api/vlm/appkeys/bulk": { "put": { "tags": ["App Keys"], "summary": "Bulk update appkeys", "description": "", "operationId": "Bulkupdateappkeys", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } }, { "name": "Content-Type", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "example": "application/json" } }, { "name": "environment", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "headers": {}, "content": { "text/plain": { "schema": { "type": "object" } } } } }, "deprecated": false } }, "/api/license-manager/resources/{resourceKey}/access": { "get": { "tags": ["Access Control"], "summary": "Check resource access", "description": "", "operationId": "Checkresourceaccess", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } }, { "name": "Content-Type", "in": "header", "description": "", "required": true, "style": "simple", "schema": { "type": "string", "example": "application/json" } }, { "name": "resourceKey", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false } }, "/api/vlm/account/stores": { "get": { "tags": ["Store"], "summary": "Get by Account", "description": "", "operationId": "GetbyAccount", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } } ], "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false }, "post": { "tags": ["Store"], "summary": "Create", "description": "", "operationId": "Create", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "type": "string", "example": "{\n\t\"name\": {{storeName}},\n\t\"hosts\": [\n\t\t\"mydomain.com\",\n\t\t\"sub.mydomain.com\"\n\t]\n}" }, "example": "{\n\t\"name\": {{storeName}},\n\t\"hosts\": [\n\t\t\"mydomain.com\",\n\t\t\"sub.mydomain.com\"\n\t]\n}" } }, "required": true }, "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false } }, "/api/vlm/account/stores/{storeName}": { "put": { "tags": ["Store"], "summary": "Save", "description": "", "operationId": "Save", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } }, { "name": "storeName", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveRequest" }, "example": { "hosts": ["mydomain.com", "sub.mydomain.com"] } } }, "required": true }, "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false }, "delete": { "tags": ["Store"], "summary": "Delete", "description": "", "operationId": "Delete", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } }, { "name": "storeName", "in": "path", "description": "", "required": true, "style": "simple", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false } }, "/api/vlm/account": { "get": { "tags": ["Account"], "summary": "Get", "description": "", "operationId": "Get", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } } ], "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false }, "patch": { "tags": ["Account"], "summary": "Save", "description": "", "operationId": "PatchSave", "parameters": [ { "name": "accountName", "in": "path", "required": true, "description": "Name of the VTEX account. Used as part of the URL", "schema": { "type": "string", "default": "apiexamples" } }, { "name": "environment", "in": "path", "required": true, "description": "Environment to use. Used as part of the URL", "schema": { "type": "string", "default": "vtexcommercestable" } } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveRequest1" }, "example": { "companyName": "", "isActive": true, "isOperating": true, "contact": { "name": "", "email": "", "phone": "" } } } }, "required": true }, "responses": { "200": { "description": "", "headers": {} } }, "deprecated": false } } }, "security": [ { "appKey": [], "appToken": [] } ], "components": { "securitySchemes": { "appKey": { "type": "apiKey", "in": "header", "name": "X-VTEX-API-AppKey" }, "appToken": { "type": "apiKey", "in": "header", "name": "X-VTEX-API-AppToken" } }, "schemas": { "CreateUserRequest": { "title": "CreateUserRequest", "required": ["name", "email"], "type": "object", "properties": { "name": { "type": "string" }, "email": { "type": "string" } }, "example": { "name": "My New User Name", "email": "mynewuser@mydomain.com" } }, "UpdateUserRequest": { "title": "UpdateUserRequest", "required": ["email", "name"], "type": "object", "properties": { "email": { "type": "string" }, "name": { "type": "string" } }, "example": { "email": "mynewuser@mydomain.com", "name": "My New User Name Changed" } }, "CreatenewappkeyRequest": { "title": "CreatenewappkeyRequest", "required": ["label"], "type": "object", "properties": { "label": { "type": "string" } }, "example": { "label": "my new appkey" } }, "Createnewappkey-Example1": { "title": "Createnewappkey-Example1", "required": [ "id", "appKey", "appToken", "label", "createdIn", "isActive" ], "type": "object", "properties": { "id": { "type": "string" }, "appKey": { "type": "string" }, "appToken": { "type": "string" }, "label": { "type": "string" }, "createdIn": { "type": "string" }, "isActive": { "type": "boolean" } }, "example": { "id": "a2555e95-9db8-48be-94f8-2a28577c0b4a", "appKey": "vtexappkey-myaccount-ORYNWX", "appToken": "WNVUJKYFKJFLTPXHQGAZDHPBHSDQVJJWSFZUBOGCKPEXAIFHTPANKJTOXUKRIIJAAJSOPCFBAXOODRABMUXFJVLJLKWGEOUCFDXRPRRQKYNNUFLGTIEOKERFXJCFFYXL", "label": "my new appkey", "createdIn": "2018-07-04T14:09:08.2718405Z", "isActive": true } }, "UpdateappkeyRequest": { "title": "UpdateappkeyRequest", "required": ["isActive"], "type": "object", "properties": { "isActive": { "type": "boolean" } }, "example": { "isActive": false } }, "Getappkeysfromaccount": { "title": "Getappkeysfromaccount", "required": ["id", "appKey", "label", "createdIn", "isActive"], "type": "object", "properties": { "id": { "type": "string" }, "appKey": { "type": "string" }, "label": { "type": "string" }, "createdIn": { "type": "string" }, "isActive": { "type": "boolean" } }, "example": { "id": "a2555e95-9db8-48be-94f8-2a28577c0b4a", "appKey": "vtexappkey-myaccount-ORYNWX", "label": "my new appkey", "createdIn": "2018-07-04T14:09:08.2718405Z", "isActive": true } }, "SaveRequest": { "title": "SaveRequest", "required": ["hosts"], "type": "object", "properties": { "hosts": { "type": "array", "items": { "type": "string" }, "description": "" } }, "example": { "hosts": ["mydomain.com", "sub.mydomain.com"] } }, "SaveRequest1": { "title": "SaveRequest1", "required": [ "companyName", "isActive", "isOperating", "contact" ], "type": "object", "properties": { "companyName": { "type": "string" }, "isActive": { "type": "boolean" }, "isOperating": { "type": "boolean" }, "contact": { "$ref": "#/components/schemas/Contact" } }, "example": { "companyName": "", "isActive": true, "isOperating": true, "contact": { "name": "", "email": "", "phone": "" } } }, "Contact": { "title": "Contact", "required": ["name", "email", "phone"], "type": "object", "properties": { "name": { "type": "string" }, "email": { "type": "string" }, "phone": { "type": "string" } }, "example": { "name": "", "email": "", "phone": "" } } } }, "tags": [ { "name": "User" }, { "name": "App Keys" }, { "name": "Roles" }, { "name": "Access Control" }, { "name": "Store" }, { "name": "Account" } ] }