diff --git a/docs/api/admin-spec3.json b/docs/api/admin-spec3.json index a494f08980..f077587a31 100644 --- a/docs/api/admin-spec3.json +++ b/docs/api/admin-spec3.json @@ -254,6 +254,102 @@ } } }, + "/auth": { + "post": { + "operationId": "PostAuth", + "summary": "Authenticate a User", + "x-authenticated": false, + "description": "Logs a User in and authorizes them to manage Store settings.", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email", + "password" + ], + "properties": { + "email": { + "type": "string", + "description": "The User's email." + }, + "password": { + "type": "string", + "description": "The User's password." + } + } + } + } + } + }, + "tags": [ + "Auth" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "user": { + "$ref": "#/components/schemas/user" + } + } + } + } + } + }, + "401": { + "description": "The user doesn't exist or the credentials are incorrect." + } + } + }, + "delete": { + "operationId": "DeleteAuth", + "summary": "Delete Session", + "x-authenticated": true, + "description": "Deletes the current session for the logged in user.", + "tags": [ + "Auth" + ], + "responses": { + "200": { + "description": "OK" + } + } + }, + "get": { + "operationId": "GetAuth", + "summary": "Get Session", + "x-authenticated": true, + "description": "Gets the currently logged in User.", + "tags": [ + "Auth" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "user": { + "$ref": "#/components/schemas/user" + } + } + } + } + } + }, + "400": { + "description": "An error occurred." + } + } + } + }, "/batch-jobs/{id}/cancel": { "post": { "operationId": "PostBatchJobsBatchJobCancel", @@ -790,102 +886,6 @@ } } }, - "/auth": { - "post": { - "operationId": "PostAuth", - "summary": "Authenticate a User", - "x-authenticated": false, - "description": "Logs a User in and authorizes them to manage Store settings.", - "parameters": [], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "email", - "password" - ], - "properties": { - "email": { - "type": "string", - "description": "The User's email." - }, - "password": { - "type": "string", - "description": "The User's password." - } - } - } - } - } - }, - "tags": [ - "Auth" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "user": { - "$ref": "#/components/schemas/user" - } - } - } - } - } - }, - "401": { - "description": "The user doesn't exist or the credentials are incorrect." - } - } - }, - "delete": { - "operationId": "DeleteAuth", - "summary": "Delete Session", - "x-authenticated": true, - "description": "Deletes the current session for the logged in user.", - "tags": [ - "Auth" - ], - "responses": { - "200": { - "description": "OK" - } - } - }, - "get": { - "operationId": "GetAuth", - "summary": "Get Session", - "x-authenticated": true, - "description": "Gets the currently logged in User.", - "tags": [ - "Auth" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "user": { - "$ref": "#/components/schemas/user" - } - } - } - } - } - }, - "400": { - "description": "An error occurred." - } - } - } - }, "/collections/{id}/products/batch": { "post": { "operationId": "PostProductsToCollection", @@ -1385,308 +1385,6 @@ } } }, - "/customers": { - "post": { - "operationId": "PostCustomers", - "summary": "Create a Customer", - "description": "Creates a Customer.", - "x-authenticated": true, - "requestBody": { - "content": { - "application/json": { - "schema": { - "required": [ - "email", - "first_name", - "last_name", - "password" - ], - "properties": { - "email": { - "type": "string", - "description": "The customer's email.", - "format": "email" - }, - "first_name": { - "type": "string", - "description": "The customer's first name." - }, - "last_name": { - "type": "string", - "description": "The customer's last name." - }, - "password": { - "type": "string", - "description": "The customer's password.", - "format": "password" - }, - "phone": { - "type": "string", - "description": "The customer's phone number." - }, - "metadata": { - "description": "An optional set of key-value pairs to hold additional information.", - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Customer" - ], - "responses": { - "201": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/customer" - } - } - } - } - } - } - } - }, - "get": { - "operationId": "GetCustomers", - "summary": "List Customers", - "description": "Retrieves a list of Customers.", - "x-authenticated": true, - "parameters": [ - { - "in": "query", - "name": "limit", - "description": "The number of items to return.", - "schema": { - "type": "integer", - "default": 50 - } - }, - { - "in": "query", - "name": "offset", - "description": "The items to skip before result.", - "schema": { - "type": "integer", - "default": 0 - } - }, - { - "in": "query", - "name": "expand", - "description": "(Comma separated) Which fields should be expanded in each customer.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "q", - "description": "a search term to search email, first_name, and last_name.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Customer" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/customer" - } - }, - "count": { - "type": "integer", - "description": "The total number of items available" - }, - "offset": { - "type": "integer", - "description": "The number of items skipped before these items" - }, - "limit": { - "type": "integer", - "description": "The number of items per page" - } - } - } - } - } - } - } - } - }, - "/customers/{id}": { - "get": { - "operationId": "GetCustomersCustomer", - "summary": "Retrieve a Customer", - "description": "Retrieves a Customer.", - "x-authenticated": true, - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The ID of the Customer.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "expand", - "description": "(Comma separated) Which fields should be expanded in the customer.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "fields", - "description": "(Comma separated) Which fields should be included in the customer.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Customer" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/customer" - } - } - } - } - } - } - } - }, - "post": { - "operationId": "PostCustomersCustomer", - "summary": "Update a Customer", - "description": "Updates a Customer.", - "x-authenticated": true, - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The ID of the Customer.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "expand", - "description": "(Comma separated) Which fields should be expanded in each customer.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "fields", - "description": "(Comma separated) Which fields should be retrieved in each customer.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "email": { - "type": "string", - "description": "The Customer's email.", - "format": "email" - }, - "first_name": { - "type": "string", - "description": "The Customer's first name." - }, - "last_name": { - "type": "string", - "description": "The Customer's last name." - }, - "phone": { - "type": "string", - "description": "The Customer's phone number." - }, - "password": { - "type": "string", - "description": "The Customer's password.", - "format": "password" - }, - "groups": { - "type": "array", - "items": { - "required": [ - "id" - ], - "properties": { - "id": { - "description": "The ID of a customer group", - "type": "string" - } - } - }, - "description": "A list of customer groups to which the customer belongs." - }, - "metadata": { - "description": "An optional set of key-value pairs to hold additional information.", - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Customer" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/customer" - } - } - } - } - } - } - } - } - }, "/customer-groups/{id}/customers/batch": { "post": { "operationId": "PostCustomerGroupsGroupCustomersBatch", @@ -2277,6 +1975,308 @@ } } }, + "/customers": { + "post": { + "operationId": "PostCustomers", + "summary": "Create a Customer", + "description": "Creates a Customer.", + "x-authenticated": true, + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "email", + "first_name", + "last_name", + "password" + ], + "properties": { + "email": { + "type": "string", + "description": "The customer's email.", + "format": "email" + }, + "first_name": { + "type": "string", + "description": "The customer's first name." + }, + "last_name": { + "type": "string", + "description": "The customer's last name." + }, + "password": { + "type": "string", + "description": "The customer's password.", + "format": "password" + }, + "phone": { + "type": "string", + "description": "The customer's phone number." + }, + "metadata": { + "description": "An optional set of key-value pairs to hold additional information.", + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Customer" + ], + "responses": { + "201": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + } + }, + "get": { + "operationId": "GetCustomers", + "summary": "List Customers", + "description": "Retrieves a list of Customers.", + "x-authenticated": true, + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "The number of items to return.", + "schema": { + "type": "integer", + "default": 50 + } + }, + { + "in": "query", + "name": "offset", + "description": "The items to skip before result.", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "in": "query", + "name": "expand", + "description": "(Comma separated) Which fields should be expanded in each customer.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "q", + "description": "a search term to search email, first_name, and last_name.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Customer" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/customer" + } + }, + "count": { + "type": "integer", + "description": "The total number of items available" + }, + "offset": { + "type": "integer", + "description": "The number of items skipped before these items" + }, + "limit": { + "type": "integer", + "description": "The number of items per page" + } + } + } + } + } + } + } + } + }, + "/customers/{id}": { + "get": { + "operationId": "GetCustomersCustomer", + "summary": "Retrieve a Customer", + "description": "Retrieves a Customer.", + "x-authenticated": true, + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The ID of the Customer.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "expand", + "description": "(Comma separated) Which fields should be expanded in the customer.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "fields", + "description": "(Comma separated) Which fields should be included in the customer.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Customer" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + } + }, + "post": { + "operationId": "PostCustomersCustomer", + "summary": "Update a Customer", + "description": "Updates a Customer.", + "x-authenticated": true, + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The ID of the Customer.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "expand", + "description": "(Comma separated) Which fields should be expanded in each customer.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "fields", + "description": "(Comma separated) Which fields should be retrieved in each customer.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "email": { + "type": "string", + "description": "The Customer's email.", + "format": "email" + }, + "first_name": { + "type": "string", + "description": "The Customer's first name." + }, + "last_name": { + "type": "string", + "description": "The Customer's last name." + }, + "phone": { + "type": "string", + "description": "The Customer's phone number." + }, + "password": { + "type": "string", + "description": "The Customer's password.", + "format": "password" + }, + "groups": { + "type": "array", + "items": { + "required": [ + "id" + ], + "properties": { + "id": { + "description": "The ID of a customer group", + "type": "string" + } + } + }, + "description": "A list of customer groups to which the customer belongs." + }, + "metadata": { + "description": "An optional set of key-value pairs to hold additional information.", + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Customer" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + } + } + }, "/discounts/{id}/regions/{region_id}": { "post": { "operationId": "PostDiscountsDiscountRegionsRegion", @@ -7302,167 +7302,6 @@ } } }, - "/product-types": { - "get": { - "operationId": "GetProductTypes", - "summary": "List Product Types", - "description": "Retrieve a list of Product Types.", - "x-authenticated": true, - "parameters": [ - { - "in": "query", - "name": "limit", - "description": "The number of types to return.", - "schema": { - "type": "integer", - "default": 10 - } - }, - { - "in": "query", - "name": "offset", - "description": "The number of items to skip before the results.", - "schema": { - "type": "integer", - "default": 0 - } - }, - { - "in": "query", - "name": "order", - "description": "The field to sort items by.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "value", - "style": "form", - "explode": false, - "description": "The type values to search for", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "in": "query", - "name": "id", - "style": "form", - "explode": false, - "description": "The type IDs to search for", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "in": "query", - "name": "q", - "description": "A query string to search values for", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "created_at", - "description": "Date comparison for when resulting product types were created.", - "schema": { - "type": "object", - "properties": { - "lt": { - "type": "string", - "description": "filter by dates less than this date", - "format": "date" - }, - "gt": { - "type": "string", - "description": "filter by dates greater than this date", - "format": "date" - }, - "lte": { - "type": "string", - "description": "filter by dates less than or equal to this date", - "format": "date" - }, - "gte": { - "type": "string", - "description": "filter by dates greater than or equal to this date", - "format": "date" - } - } - } - }, - { - "in": "query", - "name": "updated_at", - "description": "Date comparison for when resulting product types were updated.", - "schema": { - "type": "object", - "properties": { - "lt": { - "type": "string", - "description": "filter by dates less than this date", - "format": "date" - }, - "gt": { - "type": "string", - "description": "filter by dates greater than this date", - "format": "date" - }, - "lte": { - "type": "string", - "description": "filter by dates less than or equal to this date", - "format": "date" - }, - "gte": { - "type": "string", - "description": "filter by dates greater than or equal to this date", - "format": "date" - } - } - } - } - ], - "tags": [ - "Product Type" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "product_types": { - "$ref": "#/components/schemas/product_type" - }, - "count": { - "type": "integer", - "description": "The total number of items available" - }, - "offset": { - "type": "integer", - "description": "The number of items skipped before these items" - }, - "limit": { - "type": "integer", - "description": "The number of items per page" - } - } - } - } - } - } - } - } - }, "/price-lists/{id}/prices/batch": { "post": { "operationId": "PostPriceListsPriceListPricesBatch", @@ -8341,13 +8180,22 @@ } } }, - "/price-lists/:id/products": { + "/price-lists/{id}/products": { "get": { "operationId": "GetPriceListsPriceListProducts", "summary": "List Product in a Price List", "description": "Retrieves a list of Product that are part of a Price List", "x-authenticated": true, "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "ID of the price list.", + "schema": { + "type": "string" + } + }, { "in": "query", "name": "q", @@ -8618,6 +8466,167 @@ } } }, + "/product-types": { + "get": { + "operationId": "GetProductTypes", + "summary": "List Product Types", + "description": "Retrieve a list of Product Types.", + "x-authenticated": true, + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "The number of types to return.", + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "in": "query", + "name": "offset", + "description": "The number of items to skip before the results.", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "in": "query", + "name": "order", + "description": "The field to sort items by.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "value", + "style": "form", + "explode": false, + "description": "The type values to search for", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "id", + "style": "form", + "explode": false, + "description": "The type IDs to search for", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "q", + "description": "A query string to search values for", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "created_at", + "description": "Date comparison for when resulting product types were created.", + "schema": { + "type": "object", + "properties": { + "lt": { + "type": "string", + "description": "filter by dates less than this date", + "format": "date" + }, + "gt": { + "type": "string", + "description": "filter by dates greater than this date", + "format": "date" + }, + "lte": { + "type": "string", + "description": "filter by dates less than or equal to this date", + "format": "date" + }, + "gte": { + "type": "string", + "description": "filter by dates greater than or equal to this date", + "format": "date" + } + } + } + }, + { + "in": "query", + "name": "updated_at", + "description": "Date comparison for when resulting product types were updated.", + "schema": { + "type": "object", + "properties": { + "lt": { + "type": "string", + "description": "filter by dates less than this date", + "format": "date" + }, + "gt": { + "type": "string", + "description": "filter by dates greater than this date", + "format": "date" + }, + "lte": { + "type": "string", + "description": "filter by dates less than or equal to this date", + "format": "date" + }, + "gte": { + "type": "string", + "description": "filter by dates greater than or equal to this date", + "format": "date" + } + } + } + } + ], + "tags": [ + "Product Type" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "product_types": { + "$ref": "#/components/schemas/product_type" + }, + "count": { + "type": "integer", + "description": "The total number of items available" + }, + "offset": { + "type": "integer", + "description": "The number of items skipped before these items" + }, + "limit": { + "type": "integer", + "description": "The number of items per page" + } + } + } + } + } + } + } + } + }, "/products/{id}/options": { "post": { "operationId": "PostProductsProductOptions", @@ -11194,6 +11203,178 @@ } } }, + "/returns/{id}/cancel": { + "post": { + "operationId": "PostReturnsReturnCancel", + "summary": "Cancel a Return", + "description": "Registers a Return as canceled.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The ID of the Return.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Return" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/returns": { + "get": { + "operationId": "GetReturns", + "summary": "List Returns", + "description": "Retrieves a list of Returns", + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "The upper limit for the amount of responses returned.", + "schema": { + "type": "number", + "default": "50" + } + }, + { + "in": "query", + "name": "offset", + "description": "The offset of the list returned.", + "schema": { + "type": "number", + "default": "0" + } + } + ], + "tags": [ + "Return" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "returns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/return" + } + }, + "count": { + "type": "integer", + "description": "The total number of items available" + }, + "offset": { + "type": "integer", + "description": "The number of items skipped before these items" + }, + "limit": { + "type": "integer", + "description": "The number of items per page" + } + } + } + } + } + } + } + } + }, + "/returns/{id}/receive": { + "post": { + "operationId": "PostReturnsReturnReceive", + "summary": "Receive a Return", + "description": "Registers a Return as received. Updates statuses on Orders and Swaps accordingly.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The ID of the Return.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "items" + ], + "properties": { + "items": { + "description": "The Line Items that have been received.", + "type": "array", + "items": { + "required": [ + "item_id", + "quantity" + ], + "properties": { + "item_id": { + "description": "The ID of the Line Item.", + "type": "string" + }, + "quantity": { + "description": "The quantity of the Line Item.", + "type": "integer" + } + } + } + }, + "refund": { + "description": "The amount to refund.", + "type": "number" + } + } + } + } + } + }, + "tags": [ + "Return" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "return": { + "$ref": "#/components/schemas/return" + } + } + } + } + } + } + } + } + }, "/return-reasons": { "post": { "operationId": "PostReturnReasons", @@ -11430,178 +11611,6 @@ } } }, - "/returns/{id}/cancel": { - "post": { - "operationId": "PostReturnsReturnCancel", - "summary": "Cancel a Return", - "description": "Registers a Return as canceled.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The ID of the Return.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Return" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/returns": { - "get": { - "operationId": "GetReturns", - "summary": "List Returns", - "description": "Retrieves a list of Returns", - "parameters": [ - { - "in": "query", - "name": "limit", - "description": "The upper limit for the amount of responses returned.", - "schema": { - "type": "number", - "default": "50" - } - }, - { - "in": "query", - "name": "offset", - "description": "The offset of the list returned.", - "schema": { - "type": "number", - "default": "0" - } - } - ], - "tags": [ - "Return" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "returns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/return" - } - }, - "count": { - "type": "integer", - "description": "The total number of items available" - }, - "offset": { - "type": "integer", - "description": "The number of items skipped before these items" - }, - "limit": { - "type": "integer", - "description": "The number of items per page" - } - } - } - } - } - } - } - } - }, - "/returns/{id}/receive": { - "post": { - "operationId": "PostReturnsReturnReceive", - "summary": "Receive a Return", - "description": "Registers a Return as received. Updates statuses on Orders and Swaps accordingly.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The ID of the Return.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "required": [ - "items" - ], - "properties": { - "items": { - "description": "The Line Items that have been received.", - "type": "array", - "items": { - "required": [ - "item_id", - "quantity" - ], - "properties": { - "item_id": { - "description": "The ID of the Line Item.", - "type": "string" - }, - "quantity": { - "description": "The quantity of the Line Item.", - "type": "integer" - } - } - } - }, - "refund": { - "description": "The amount to refund.", - "type": "number" - } - } - } - } - } - }, - "tags": [ - "Return" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "return": { - "$ref": "#/components/schemas/return" - } - } - } - } - } - } - } - } - }, "/sales-channels/{id}/products/batch": { "post": { "operationId": "PostSalesChannelsChannelProductsBatch", @@ -12135,6 +12144,212 @@ } } }, + "/shipping-profiles": { + "post": { + "operationId": "PostShippingProfiles", + "summary": "Create a Shipping Profile", + "description": "Creates a Shipping Profile", + "x-authenticated": true, + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "name" + ], + "properties": { + "name": { + "description": "The name of the Shipping Profile", + "type": "string" + } + } + } + } + } + }, + "tags": [ + "Shipping Profile" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "shipping_profile": { + "$ref": "#/components/schemas/shipping_profile" + } + } + } + } + } + } + } + }, + "get": { + "operationId": "GetShippingProfiles", + "summary": "List Shipping Profiles", + "description": "Retrieves a list of Shipping Profile.", + "x-authenticated": true, + "tags": [ + "Shipping Profile" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "shipping_profiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/shipping_profile" + } + } + } + } + } + } + } + } + } + }, + "/shipping-profiles/{id}": { + "delete": { + "operationId": "DeleteShippingProfilesProfile", + "summary": "Delete a Shipping Profile", + "description": "Deletes a Shipping Profile.", + "x-authenticated": true, + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The ID of the Shipping Profile.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Shipping Profile" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "type": "string", + "description": "The ID of the deleted Shipping Profile." + }, + "object": { + "type": "string", + "description": "The type of the object that was deleted.", + "default": "shipping_profile" + }, + "deleted": { + "type": "boolean", + "description": "Whether or not the items were deleted.", + "default": true + } + } + } + } + } + } + } + }, + "get": { + "operationId": "GetShippingProfilesProfile", + "summary": "Retrieve a Shipping Profile", + "description": "Retrieves a Shipping Profile.", + "x-authenticated": true, + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The ID of the Shipping Profile.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Shipping Profile" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "shipping_profile": { + "$ref": "#/components/schemas/shipping_profile" + } + } + } + } + } + } + } + }, + "post": { + "operationId": "PostShippingProfilesProfile", + "summary": "Update a Shipping Profiles", + "description": "Updates a Shipping Profile", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The ID of the Shipping Profile.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "name": { + "description": "The name of the Shipping Profile", + "type": "string" + } + } + } + } + } + }, + "tags": [ + "Shipping Profile" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "shipping_profile": { + "$ref": "#/components/schemas/shipping_profile" + } + } + } + } + } + } + } + } + }, "/shipping-options": { "post": { "operationId": "PostShippingOptions", @@ -12485,212 +12700,6 @@ } } }, - "/shipping-profiles": { - "post": { - "operationId": "PostShippingProfiles", - "summary": "Create a Shipping Profile", - "description": "Creates a Shipping Profile", - "x-authenticated": true, - "requestBody": { - "content": { - "application/json": { - "schema": { - "required": [ - "name" - ], - "properties": { - "name": { - "description": "The name of the Shipping Profile", - "type": "string" - } - } - } - } - } - }, - "tags": [ - "Shipping Profile" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "shipping_profile": { - "$ref": "#/components/schemas/shipping_profile" - } - } - } - } - } - } - } - }, - "get": { - "operationId": "GetShippingProfiles", - "summary": "List Shipping Profiles", - "description": "Retrieves a list of Shipping Profile.", - "x-authenticated": true, - "tags": [ - "Shipping Profile" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "shipping_profiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/shipping_profile" - } - } - } - } - } - } - } - } - } - }, - "/shipping-profiles/{id}": { - "delete": { - "operationId": "DeleteShippingProfilesProfile", - "summary": "Delete a Shipping Profile", - "description": "Deletes a Shipping Profile.", - "x-authenticated": true, - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The ID of the Shipping Profile.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Shipping Profile" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "id": { - "type": "string", - "description": "The ID of the deleted Shipping Profile." - }, - "object": { - "type": "string", - "description": "The type of the object that was deleted.", - "default": "shipping_profile" - }, - "deleted": { - "type": "boolean", - "description": "Whether or not the items were deleted.", - "default": true - } - } - } - } - } - } - } - }, - "get": { - "operationId": "GetShippingProfilesProfile", - "summary": "Retrieve a Shipping Profile", - "description": "Retrieves a Shipping Profile.", - "x-authenticated": true, - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The ID of the Shipping Profile.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Shipping Profile" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "shipping_profile": { - "$ref": "#/components/schemas/shipping_profile" - } - } - } - } - } - } - } - }, - "post": { - "operationId": "PostShippingProfilesProfile", - "summary": "Update a Shipping Profiles", - "description": "Updates a Shipping Profile", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The ID of the Shipping Profile.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "name": { - "description": "The name of the Shipping Profile", - "type": "string" - } - } - } - } - } - }, - "tags": [ - "Shipping Profile" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "shipping_profile": { - "$ref": "#/components/schemas/shipping_profile" - } - } - } - } - } - } - } - } - }, "/store/currencies/{code}": { "post": { "operationId": "PostStoreCurrenciesCode", @@ -13030,12 +13039,21 @@ } } }, - "/tax-rates/:id/product-types/batch": { + "/tax-rates/{id}/product-types/batch": { "post": { "operationId": "PostTaxRatesTaxRateProductTypes", "summary": "Add Tax Rate to Product Types", "description": "Associates a Tax Rate with a list of Product Types", "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "ID of the tax rate.", + "schema": { + "type": "string" + } + }, { "in": "query", "name": "fields", @@ -13109,6 +13127,15 @@ "summary": "Remove Tax Rate from Product Types", "description": "Removes a Tax Rate from a list of Product Types", "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "ID of the tax rate.", + "schema": { + "type": "string" + } + }, { "in": "query", "name": "fields", @@ -13178,12 +13205,21 @@ } } }, - "/tax-rates/:id/products/batch": { + "/tax-rates/{id}/products/batch": { "post": { "operationId": "PostTaxRatesTaxRateProducts", "summary": "Add Tax Rate to Products", "description": "Associates a Tax Rate with a list of Products", "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "ID of the tax rate.", + "schema": { + "type": "string" + } + }, { "in": "query", "name": "fields", @@ -13257,6 +13293,15 @@ "summary": "Removes Tax Rate from Products", "description": "Removes a Tax Rate from a list of Products", "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "ID of the tax rate.", + "schema": { + "type": "string" + } + }, { "in": "query", "name": "fields", @@ -13326,12 +13371,21 @@ } } }, - "/tax-rates/:id/shipping-options/batch": { + "/tax-rates/{id}/shipping-options/batch": { "post": { "operationId": "PostTaxRatesTaxRateShippingOptions", "summary": "Add Tax Rate to Product Types", "description": "Associates a Tax Rate with a list of Shipping Options", "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "ID of the tax rate.", + "schema": { + "type": "string" + } + }, { "in": "query", "name": "fields", @@ -13405,6 +13459,15 @@ "summary": "Removes a Tax Rate from Product Types", "description": "Removes a Tax Rate from a list of Product Types", "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "ID of the tax rate.", + "schema": { + "type": "string" + } + }, { "in": "query", "name": "fields", @@ -13785,14 +13848,21 @@ } } } - } - }, - "/tax-rates/:id": { + }, "get": { "operationId": "GetTaxRatesTaxRate", "summary": "Get Tax Rate", "description": "Retrieves a TaxRate", "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "ID of the tax rate.", + "schema": { + "type": "string" + } + }, { "in": "query", "name": "fields", @@ -13846,6 +13916,15 @@ "summary": "Update a Tax Rate", "description": "Updates a Tax Rate", "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "ID of the tax rate.", + "schema": { + "type": "string" + } + }, { "in": "query", "name": "fields", diff --git a/docs/api/admin-spec3.yaml b/docs/api/admin-spec3.yaml index 70b30f6aa6..3af16e5f85 100644 --- a/docs/api/admin-spec3.yaml +++ b/docs/api/admin-spec3.yaml @@ -109,6 +109,60 @@ tags: servers: - url: 'https://api.medusa-commerce.com/admin' paths: + /apps/authorizations: + post: + operationId: PostApps + summary: Generates a token for an application. + description: Generates a token for an application. + x-authenticated: true + requestBody: + content: + application/json: + schema: + required: + - application_name + - state + - code + properties: + application_name: + type: string + description: Name of the application for the token to be generated for. + state: + type: string + description: State of the application. + code: + type: string + description: The code for the generated token. + tags: + - App + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + apps: + $ref: '#/components/schemas/OAuth' + /apps: + get: + operationId: GetApps + summary: List applications + description: Retrieve a list of applications. + x-authenticated: true + tags: + - App + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + apps: + type: array + items: + $ref: '#/components/schemas/OAuth' /auth: post: operationId: PostAuth @@ -1297,209 +1351,6 @@ paths: limit: type: integer description: The number of items per page - /customers: - post: - operationId: PostCustomers - summary: Create a Customer - description: Creates a Customer. - x-authenticated: true - requestBody: - content: - application/json: - schema: - required: - - email - - first_name - - last_name - - password - properties: - email: - type: string - description: The customer's email. - format: email - first_name: - type: string - description: The customer's first name. - last_name: - type: string - description: The customer's last name. - password: - type: string - description: The customer's password. - format: password - phone: - type: string - description: The customer's phone number. - metadata: - description: >- - An optional set of key-value pairs to hold additional - information. - type: object - tags: - - Customer - responses: - '201': - description: OK - content: - application/json: - schema: - properties: - customer: - $ref: '#/components/schemas/customer' - get: - operationId: GetCustomers - summary: List Customers - description: Retrieves a list of Customers. - x-authenticated: true - parameters: - - in: query - name: limit - description: The number of items to return. - schema: - type: integer - default: 50 - - in: query - name: offset - description: The items to skip before result. - schema: - type: integer - default: 0 - - in: query - name: expand - description: (Comma separated) Which fields should be expanded in each customer. - schema: - type: string - - in: query - name: q - description: 'a search term to search email, first_name, and last_name.' - schema: - type: string - tags: - - Customer - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - customers: - type: array - items: - $ref: '#/components/schemas/customer' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of items skipped before these items - limit: - type: integer - description: The number of items per page - '/customers/{id}': - get: - operationId: GetCustomersCustomer - summary: Retrieve a Customer - description: Retrieves a Customer. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Customer. - schema: - type: string - - in: query - name: expand - description: (Comma separated) Which fields should be expanded in the customer. - schema: - type: string - - in: query - name: fields - description: (Comma separated) Which fields should be included in the customer. - schema: - type: string - tags: - - Customer - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - customer: - $ref: '#/components/schemas/customer' - post: - operationId: PostCustomersCustomer - summary: Update a Customer - description: Updates a Customer. - x-authenticated: true - parameters: - - in: path - name: id - required: true - description: The ID of the Customer. - schema: - type: string - - in: query - name: expand - description: (Comma separated) Which fields should be expanded in each customer. - schema: - type: string - - in: query - name: fields - description: (Comma separated) Which fields should be retrieved in each customer. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - email: - type: string - description: The Customer's email. - format: email - first_name: - type: string - description: The Customer's first name. - last_name: - type: string - description: The Customer's last name. - phone: - type: string - description: The Customer's phone number. - password: - type: string - description: The Customer's password. - format: password - groups: - type: array - items: - required: - - id - properties: - id: - description: The ID of a customer group - type: string - description: A list of customer groups to which the customer belongs. - metadata: - description: >- - An optional set of key-value pairs to hold additional - information. - type: object - tags: - - Customer - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - customer: - $ref: '#/components/schemas/customer' '/discounts/{id}/regions/{region_id}': post: operationId: PostDiscountsDiscountRegionsRegion @@ -2414,49 +2265,85 @@ paths: properties: discount: $ref: '#/components/schemas/discount' - /apps/authorizations: + /customers: post: - operationId: PostApps - summary: Generates a token for an application. - description: Generates a token for an application. + operationId: PostCustomers + summary: Create a Customer + description: Creates a Customer. x-authenticated: true requestBody: content: application/json: schema: required: - - application_name - - state - - code + - email + - first_name + - last_name + - password properties: - application_name: + email: type: string - description: Name of the application for the token to be generated for. - state: + description: The customer's email. + format: email + first_name: type: string - description: State of the application. - code: + description: The customer's first name. + last_name: type: string - description: The code for the generated token. + description: The customer's last name. + password: + type: string + description: The customer's password. + format: password + phone: + type: string + description: The customer's phone number. + metadata: + description: >- + An optional set of key-value pairs to hold additional + information. + type: object tags: - - App + - Customer responses: - '200': + '201': description: OK content: application/json: schema: properties: - apps: - $ref: '#/components/schemas/OAuth' - /apps: + customer: + $ref: '#/components/schemas/customer' get: - operationId: GetApps - summary: List applications - description: Retrieve a list of applications. + operationId: GetCustomers + summary: List Customers + description: Retrieves a list of Customers. x-authenticated: true + parameters: + - in: query + name: limit + description: The number of items to return. + schema: + type: integer + default: 50 + - in: query + name: offset + description: The items to skip before result. + schema: + type: integer + default: 0 + - in: query + name: expand + description: (Comma separated) Which fields should be expanded in each customer. + schema: + type: string + - in: query + name: q + description: 'a search term to search email, first_name, and last_name.' + schema: + type: string tags: - - App + - Customer responses: '200': description: OK @@ -2464,10 +2351,123 @@ paths: application/json: schema: properties: - apps: + customers: type: array items: - $ref: '#/components/schemas/OAuth' + $ref: '#/components/schemas/customer' + count: + type: integer + description: The total number of items available + offset: + type: integer + description: The number of items skipped before these items + limit: + type: integer + description: The number of items per page + '/customers/{id}': + get: + operationId: GetCustomersCustomer + summary: Retrieve a Customer + description: Retrieves a Customer. + x-authenticated: true + parameters: + - in: path + name: id + required: true + description: The ID of the Customer. + schema: + type: string + - in: query + name: expand + description: (Comma separated) Which fields should be expanded in the customer. + schema: + type: string + - in: query + name: fields + description: (Comma separated) Which fields should be included in the customer. + schema: + type: string + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + post: + operationId: PostCustomersCustomer + summary: Update a Customer + description: Updates a Customer. + x-authenticated: true + parameters: + - in: path + name: id + required: true + description: The ID of the Customer. + schema: + type: string + - in: query + name: expand + description: (Comma separated) Which fields should be expanded in each customer. + schema: + type: string + - in: query + name: fields + description: (Comma separated) Which fields should be retrieved in each customer. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + email: + type: string + description: The Customer's email. + format: email + first_name: + type: string + description: The Customer's first name. + last_name: + type: string + description: The Customer's last name. + phone: + type: string + description: The Customer's phone number. + password: + type: string + description: The Customer's password. + format: password + groups: + type: array + items: + required: + - id + properties: + id: + description: The ID of a customer group + type: string + description: A list of customer groups to which the customer belongs. + metadata: + description: >- + An optional set of key-value pairs to hold additional + information. + type: object + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' /draft-orders: post: operationId: PostDraftOrders @@ -5657,13 +5657,19 @@ paths: type: boolean description: Whether or not the items were deleted. default: true - '/price-lists/:id/products': + '/price-lists/{id}/products': get: operationId: GetPriceListsPriceListProducts summary: List Product in a Price List description: Retrieves a list of Product that are part of a Price List x-authenticated: true parameters: + - in: path + name: id + required: true + description: ID of the price list. + schema: + type: string - in: query name: q description: >- @@ -9170,12 +9176,18 @@ paths: limit: type: integer description: The number of items per page - '/tax-rates/:id/product-types/batch': + '/tax-rates/{id}/product-types/batch': post: operationId: PostTaxRatesTaxRateProductTypes summary: Add Tax Rate to Product Types description: Associates a Tax Rate with a list of Product Types parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. @@ -9225,6 +9237,12 @@ paths: summary: Remove Tax Rate from Product Types description: Removes a Tax Rate from a list of Product Types parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. @@ -9269,12 +9287,18 @@ paths: properties: tax_rate: $ref: '#/components/schemas/tax_rate' - '/tax-rates/:id/products/batch': + '/tax-rates/{id}/products/batch': post: operationId: PostTaxRatesTaxRateProducts summary: Add Tax Rate to Products description: Associates a Tax Rate with a list of Products parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. @@ -9322,6 +9346,12 @@ paths: summary: Removes Tax Rate from Products description: Removes a Tax Rate from a list of Products parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. @@ -9366,12 +9396,18 @@ paths: properties: tax_rate: $ref: '#/components/schemas/tax_rate' - '/tax-rates/:id/shipping-options/batch': + '/tax-rates/{id}/shipping-options/batch': post: operationId: PostTaxRatesTaxRateShippingOptions summary: Add Tax Rate to Product Types description: Associates a Tax Rate with a list of Shipping Options parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. @@ -9421,6 +9457,12 @@ paths: summary: Removes a Tax Rate from Product Types description: Removes a Tax Rate from a list of Product Types parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. @@ -9675,12 +9717,17 @@ paths: type: boolean description: Whether or not the items were deleted. default: true - '/tax-rates/:id': get: operationId: GetTaxRatesTaxRate summary: Get Tax Rate description: Retrieves a TaxRate parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. @@ -9716,6 +9763,12 @@ paths: summary: Update a Tax Rate description: Updates a Tax Rate parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. diff --git a/docs/api/admin/openapi.yaml b/docs/api/admin/openapi.yaml index d374333fbb..d7ab861f96 100644 --- a/docs/api/admin/openapi.yaml +++ b/docs/api/admin/openapi.yaml @@ -109,6 +109,10 @@ tags: servers: - url: https://api.medusa-commerce.com/admin paths: + /apps/authorizations: + $ref: paths/apps_authorizations.yaml + /apps: + $ref: paths/apps.yaml /auth: $ref: paths/auth.yaml /batch-jobs/{id}/cancel: @@ -133,10 +137,6 @@ paths: $ref: paths/customer-groups_{id}.yaml /customer-groups/{id}/customers: $ref: paths/customer-groups_{id}_customers.yaml - /customers: - $ref: paths/customers.yaml - /customers/{id}: - $ref: paths/customers_{id}.yaml /discounts/{id}/regions/{region_id}: $ref: paths/discounts_{id}_regions_{region_id}.yaml /discounts/{discount_id}/conditions: @@ -153,10 +153,10 @@ paths: $ref: paths/discounts_{id}_dynamic-codes_{code}.yaml /discounts/code/{code}: $ref: paths/discounts_code_{code}.yaml - /apps/authorizations: - $ref: paths/apps_authorizations.yaml - /apps: - $ref: paths/apps.yaml + /customers: + $ref: paths/customers.yaml + /customers/{id}: + $ref: paths/customers_{id}.yaml /draft-orders: $ref: paths/draft-orders.yaml /draft-orders/{id}/line-items: @@ -249,8 +249,8 @@ paths: $ref: paths/price-lists_{id}_products_{product_id}_prices.yaml /price-lists/{id}/variants/{variant_id}/prices: $ref: paths/price-lists_{id}_variants_{variant_id}_prices.yaml - /price-lists/:id/products: - $ref: paths/price-lists_:id_products.yaml + /price-lists/{id}/products: + $ref: paths/price-lists_{id}_products.yaml /product-tags: $ref: paths/product-tags.yaml /product-types: @@ -327,18 +327,16 @@ paths: $ref: paths/swaps_{id}.yaml /swaps: $ref: paths/swaps.yaml - /tax-rates/:id/product-types/batch: - $ref: paths/tax-rates_:id_product-types_batch.yaml - /tax-rates/:id/products/batch: - $ref: paths/tax-rates_:id_products_batch.yaml - /tax-rates/:id/shipping-options/batch: - $ref: paths/tax-rates_:id_shipping-options_batch.yaml + /tax-rates/{id}/product-types/batch: + $ref: paths/tax-rates_{id}_product-types_batch.yaml + /tax-rates/{id}/products/batch: + $ref: paths/tax-rates_{id}_products_batch.yaml + /tax-rates/{id}/shipping-options/batch: + $ref: paths/tax-rates_{id}_shipping-options_batch.yaml /tax-rates: $ref: paths/tax-rates.yaml /tax-rates/{id}: $ref: paths/tax-rates_{id}.yaml - /tax-rates/:id: - $ref: paths/tax-rates_:id.yaml /uploads: $ref: paths/uploads.yaml /users: diff --git a/docs/api/admin/paths/price-lists_:id_products.yaml b/docs/api/admin/paths/price-lists_{id}_products.yaml similarity index 97% rename from docs/api/admin/paths/price-lists_:id_products.yaml rename to docs/api/admin/paths/price-lists_{id}_products.yaml index 1a0b37b37e..e22646befc 100644 --- a/docs/api/admin/paths/price-lists_:id_products.yaml +++ b/docs/api/admin/paths/price-lists_{id}_products.yaml @@ -4,6 +4,12 @@ get: description: Retrieves a list of Product that are part of a Price List x-authenticated: true parameters: + - in: path + name: id + required: true + description: ID of the price list. + schema: + type: string - in: query name: q description: >- diff --git a/docs/api/admin/paths/tax-rates_:id.yaml b/docs/api/admin/paths/tax-rates_:id.yaml deleted file mode 100644 index 84f1f79b65..0000000000 --- a/docs/api/admin/paths/tax-rates_:id.yaml +++ /dev/null @@ -1,102 +0,0 @@ -get: - operationId: GetTaxRatesTaxRate - summary: Get Tax Rate - description: Retrieves a TaxRate - parameters: - - in: query - name: fields - description: Which fields should be included in the result. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: Which fields should be expanded and retrieved in the result. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - tags: - - Tax Rate - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - tax_rate: - $ref: ../components/schemas/tax_rate.yaml -post: - operationId: PostTaxRatesTaxRate - summary: Update a Tax Rate - description: Updates a Tax Rate - parameters: - - in: query - name: fields - description: Which fields should be included in the result. - style: form - explode: false - schema: - type: array - items: - type: string - - in: query - name: expand - description: Which fields should be expanded and retrieved in the result. - style: form - explode: false - schema: - type: array - items: - type: string - x-authenticated: true - requestBody: - content: - application/json: - schema: - properties: - code: - type: string - description: A code to identify the tax type by - name: - type: string - description: A human friendly name for the tax - region_id: - type: string - description: The ID of the Region that the rate belongs to - rate: - type: number - description: The numeric rate to charge - products: - type: array - description: The IDs of the products associated with this tax rate - items: - type: string - shipping_options: - type: array - description: The IDs of the shipping options associated with this tax rate - items: - type: string - product_types: - type: array - description: The IDs of the types of products associated with this tax rate - items: - type: string - tags: - - Tax Rate - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - tax_rate: - $ref: ../components/schemas/tax_rate.yaml diff --git a/docs/api/admin/paths/tax-rates_{id}.yaml b/docs/api/admin/paths/tax-rates_{id}.yaml index 38904fa17a..3bfc66b991 100644 --- a/docs/api/admin/paths/tax-rates_{id}.yaml +++ b/docs/api/admin/paths/tax-rates_{id}.yaml @@ -30,3 +30,117 @@ delete: type: boolean description: Whether or not the items were deleted. default: true +get: + operationId: GetTaxRatesTaxRate + summary: Get Tax Rate + description: Retrieves a TaxRate + parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string + - in: query + name: fields + description: Which fields should be included in the result. + style: form + explode: false + schema: + type: array + items: + type: string + - in: query + name: expand + description: Which fields should be expanded and retrieved in the result. + style: form + explode: false + schema: + type: array + items: + type: string + x-authenticated: true + tags: + - Tax Rate + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + tax_rate: + $ref: ../components/schemas/tax_rate.yaml +post: + operationId: PostTaxRatesTaxRate + summary: Update a Tax Rate + description: Updates a Tax Rate + parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string + - in: query + name: fields + description: Which fields should be included in the result. + style: form + explode: false + schema: + type: array + items: + type: string + - in: query + name: expand + description: Which fields should be expanded and retrieved in the result. + style: form + explode: false + schema: + type: array + items: + type: string + x-authenticated: true + requestBody: + content: + application/json: + schema: + properties: + code: + type: string + description: A code to identify the tax type by + name: + type: string + description: A human friendly name for the tax + region_id: + type: string + description: The ID of the Region that the rate belongs to + rate: + type: number + description: The numeric rate to charge + products: + type: array + description: The IDs of the products associated with this tax rate + items: + type: string + shipping_options: + type: array + description: The IDs of the shipping options associated with this tax rate + items: + type: string + product_types: + type: array + description: The IDs of the types of products associated with this tax rate + items: + type: string + tags: + - Tax Rate + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + tax_rate: + $ref: ../components/schemas/tax_rate.yaml diff --git a/docs/api/admin/paths/tax-rates_:id_product-types_batch.yaml b/docs/api/admin/paths/tax-rates_{id}_product-types_batch.yaml similarity index 90% rename from docs/api/admin/paths/tax-rates_:id_product-types_batch.yaml rename to docs/api/admin/paths/tax-rates_{id}_product-types_batch.yaml index df938552fb..e679359cae 100644 --- a/docs/api/admin/paths/tax-rates_:id_product-types_batch.yaml +++ b/docs/api/admin/paths/tax-rates_{id}_product-types_batch.yaml @@ -3,6 +3,12 @@ post: summary: Add Tax Rate to Product Types description: Associates a Tax Rate with a list of Product Types parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. @@ -50,6 +56,12 @@ delete: summary: Remove Tax Rate from Product Types description: Removes a Tax Rate from a list of Product Types parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. diff --git a/docs/api/admin/paths/tax-rates_:id_products_batch.yaml b/docs/api/admin/paths/tax-rates_{id}_products_batch.yaml similarity index 90% rename from docs/api/admin/paths/tax-rates_:id_products_batch.yaml rename to docs/api/admin/paths/tax-rates_{id}_products_batch.yaml index 3162d0c75c..90cf42b2ae 100644 --- a/docs/api/admin/paths/tax-rates_:id_products_batch.yaml +++ b/docs/api/admin/paths/tax-rates_{id}_products_batch.yaml @@ -3,6 +3,12 @@ post: summary: Add Tax Rate to Products description: Associates a Tax Rate with a list of Products parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. @@ -50,6 +56,12 @@ delete: summary: Removes Tax Rate from Products description: Removes a Tax Rate from a list of Products parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. diff --git a/docs/api/admin/paths/tax-rates_:id_shipping-options_batch.yaml b/docs/api/admin/paths/tax-rates_{id}_shipping-options_batch.yaml similarity index 90% rename from docs/api/admin/paths/tax-rates_:id_shipping-options_batch.yaml rename to docs/api/admin/paths/tax-rates_{id}_shipping-options_batch.yaml index 27b1da8f5c..066ce03681 100644 --- a/docs/api/admin/paths/tax-rates_:id_shipping-options_batch.yaml +++ b/docs/api/admin/paths/tax-rates_{id}_shipping-options_batch.yaml @@ -3,6 +3,12 @@ post: summary: Add Tax Rate to Product Types description: Associates a Tax Rate with a list of Shipping Options parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. @@ -50,6 +56,12 @@ delete: summary: Removes a Tax Rate from Product Types description: Removes a Tax Rate from a list of Product Types parameters: + - in: path + name: id + required: true + description: ID of the tax rate. + schema: + type: string - in: query name: fields description: Which fields should be included in the result. diff --git a/docs/api/store-spec3.json b/docs/api/store-spec3.json index 2e0a0924af..c3b6caba6e 100644 --- a/docs/api/store-spec3.json +++ b/docs/api/store-spec3.json @@ -211,6 +211,1193 @@ } } }, + "/gift-cards/{code}": { + "get": { + "operationId": "GetGiftCardsCode", + "summary": "Retrieve Gift Card by Code", + "description": "Retrieves a Gift Card by its associated unqiue code.", + "parameters": [ + { + "in": "path", + "name": "code", + "required": true, + "description": "The unique Gift Card code.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Gift Card" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "gift_card": { + "$ref": "#/components/schemas/gift_card" + } + } + } + } + } + } + } + } + }, + "/collections/{id}": { + "get": { + "operationId": "GetCollectionsCollection", + "summary": "Retrieve a Product Collection", + "description": "Retrieves a Product Collection.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Product Collection", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Collection" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "collection": { + "$ref": "#/components/schemas/product_collection" + } + } + } + } + } + } + } + } + }, + "/collections": { + "get": { + "operationId": "GetCollections", + "summary": "List Product Collections", + "description": "Retrieve a list of Product Collection.", + "parameters": [ + { + "in": "query", + "name": "offset", + "description": "The number of collections to skip before starting to collect the collections set", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "in": "query", + "name": "limit", + "description": "The number of collections to return", + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "in": "query", + "name": "created_at", + "description": "Date comparison for when resulting collections were created.", + "schema": { + "type": "object", + "properties": { + "lt": { + "type": "string", + "description": "filter by dates less than this date", + "format": "date" + }, + "gt": { + "type": "string", + "description": "filter by dates greater than this date", + "format": "date" + }, + "lte": { + "type": "string", + "description": "filter by dates less than or equal to this date", + "format": "date" + }, + "gte": { + "type": "string", + "description": "filter by dates greater than or equal to this date", + "format": "date" + } + } + } + }, + { + "in": "query", + "name": "updated_at", + "description": "Date comparison for when resulting collections were updated.", + "schema": { + "type": "object", + "properties": { + "lt": { + "type": "string", + "description": "filter by dates less than this date", + "format": "date" + }, + "gt": { + "type": "string", + "description": "filter by dates greater than this date", + "format": "date" + }, + "lte": { + "type": "string", + "description": "filter by dates less than or equal to this date", + "format": "date" + }, + "gte": { + "type": "string", + "description": "filter by dates greater than or equal to this date", + "format": "date" + } + } + } + } + ], + "tags": [ + "Collection" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/product_collection" + } + }, + "count": { + "type": "integer", + "description": "The total number of items available" + }, + "offset": { + "type": "integer", + "description": "The number of items skipped before these items" + }, + "limit": { + "type": "integer", + "description": "The number of items per page" + } + } + } + } + } + } + } + } + }, + "/customers/me/addresses": { + "post": { + "operationId": "PostCustomersCustomerAddresses", + "summary": "Add a Shipping Address", + "description": "Adds a Shipping Address to a Customer's saved addresses.", + "x-authenticated": true, + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "address" + ], + "properties": { + "address": { + "description": "The Address to add to the Customer.", + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ] + } + } + } + } + } + }, + "tags": [ + "Customer" + ], + "responses": { + "200": { + "description": "A successful response", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + } + } + }, + "/customers": { + "post": { + "operationId": "PostCustomers", + "summary": "Create a Customer", + "description": "Creates a Customer account.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "first_name", + "last_name", + "email", + "password" + ], + "properties": { + "first_name": { + "description": "The Customer's first name.", + "type": "string" + }, + "last_name": { + "description": "The Customer's last name.", + "type": "string" + }, + "email": { + "description": "The email of the customer.", + "type": "string", + "format": "email" + }, + "password": { + "description": "The Customer's password.", + "type": "string", + "format": "password" + }, + "phone": { + "description": "The Customer's phone number.", + "type": "string" + } + } + } + } + } + }, + "tags": [ + "Customer" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + }, + "422": { + "description": "A customer with the same email exists", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string", + "description": "The error code" + }, + "type": { + "type": "string", + "description": "The type of error" + }, + "message": { + "type": "string", + "description": "Human-readable message with details about the error" + } + } + }, + "example": { + "code": "invalid_request_error", + "type": "duplicate_error", + "message": "A customer with the given email already has an account. Log in instead" + } + } + } + } + } + } + }, + "/customers/me/addresses/{address_id}": { + "delete": { + "operationId": "DeleteCustomersCustomerAddressesAddress", + "summary": "Delete an Address", + "description": "Removes an Address from the Customer's saved addresses.", + "x-authenticated": true, + "parameters": [ + { + "in": "path", + "name": "address_id", + "required": true, + "description": "The id of the Address to remove.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Customer" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + } + }, + "post": { + "operationId": "PostCustomersCustomerAddressesAddress", + "summary": "Update a Shipping Address", + "description": "Updates a Customer's saved Shipping Address.", + "x-authenticated": true, + "parameters": [ + { + "in": "path", + "name": "address_id", + "required": true, + "description": "The id of the Address to update.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/address" + } + ] + } + } + } + }, + "tags": [ + "Customer" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + } + } + }, + "/customers/me": { + "get": { + "operationId": "GetCustomersCustomer", + "summary": "Retrieves a Customer", + "description": "Retrieves a Customer - the Customer must be logged in to retrieve their details.", + "x-authenticated": true, + "tags": [ + "Customer" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + } + }, + "post": { + "operationId": "PostCustomersCustomer", + "summary": "Update Customer details", + "description": "Updates a Customer's saved details.", + "x-authenticated": true, + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "first_name": { + "description": "The Customer's first name.", + "type": "string" + }, + "last_name": { + "description": "The Customer's last name.", + "type": "string" + }, + "billing_address": { + "description": "The Address to be used for billing purposes.", + "anyOf": [ + { + "$ref": "#/components/schemas/address", + "description": "The full billing address object" + }, + { + "type": "string", + "description": "The ID of an existing billing address" + } + ] + }, + "password": { + "description": "The Customer's password.", + "type": "string" + }, + "phone": { + "description": "The Customer's phone number.", + "type": "string" + }, + "email": { + "description": "The email of the customer.", + "type": "string" + }, + "metadata": { + "description": "Metadata about the customer.", + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Customer" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + } + } + }, + "/customers/me/payment-methods": { + "get": { + "operationId": "GetCustomersCustomerPaymentMethods", + "summary": "Retrieve saved payment methods", + "description": "Retrieves a list of a Customer's saved payment methods. Payment methods are saved with Payment Providers and it is their responsibility to fetch saved methods.", + "x-authenticated": true, + "tags": [ + "Customer" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "payment_methods": { + "type": "array", + "items": { + "properties": { + "provider_id": { + "type": "string", + "description": "The id of the Payment Provider where the payment method is saved." + }, + "data": { + "type": "object", + "description": "The data needed for the Payment Provider to use the saved payment method." + } + } + } + } + } + } + } + } + } + } + } + }, + "/customers/me/orders": { + "get": { + "operationId": "GetCustomersCustomerOrders", + "summary": "Retrieve Customer Orders", + "description": "Retrieves a list of a Customer's Orders.", + "x-authenticated": true, + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "How many orders to return.", + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "in": "query", + "name": "offset", + "description": "The offset in the resulting orders.", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "in": "query", + "name": "fields", + "description": "(Comma separated string) Which fields should be included in the resulting orders.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "expand", + "description": "(Comma separated string) Which relations should be expanded in the resulting orders.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Customer" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "orders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/order" + } + }, + "count": { + "type": "integer", + "description": "The total number of items available" + }, + "offset": { + "type": "integer", + "description": "The number of items skipped before these items" + }, + "limit": { + "type": "integer", + "description": "The number of items per page" + } + } + } + } + } + } + } + } + }, + "/customers/password-token": { + "post": { + "operationId": "PostCustomersCustomerPasswordToken", + "summary": "Creates a reset password token", + "description": "Creates a reset password token to be used in a subsequent /reset-password request. The password token should be sent out of band e.g. via email and will not be returned.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "email" + ], + "properties": { + "email": { + "description": "The email of the customer.", + "type": "string", + "format": "email" + } + } + } + } + } + }, + "tags": [ + "Customer" + ], + "responses": { + "204": { + "description": "OK" + } + } + } + }, + "/customers/password-reset": { + "post": { + "operationId": "PostCustomersResetPassword", + "summary": "Resets Customer password", + "description": "Resets a Customer's password using a password token created by a previous /password-token request.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "email", + "password", + "token" + ], + "properties": { + "email": { + "description": "The email of the customer.", + "type": "string", + "format": "email" + }, + "password": { + "description": "The Customer's password.", + "type": "string", + "format": "password" + }, + "token": { + "description": "The reset password token", + "type": "string" + } + } + } + } + } + }, + "tags": [ + "Customer" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + } + } + }, + "/orders/cart/{cart_id}": { + "get": { + "operationId": "GetOrdersOrderCartId", + "summary": "Retrieves Order by Cart id", + "description": "Retrieves an Order by the id of the Cart that was used to create the Order.", + "parameters": [ + { + "in": "path", + "name": "cart_id", + "required": true, + "description": "The ID of Cart.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}": { + "get": { + "operationId": "GetOrdersOrder", + "summary": "Retrieves an Order", + "description": "Retrieves an Order", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders": { + "get": { + "operationId": "GetOrders", + "summary": "Look Up an Order", + "description": "Look up an order using filters.", + "parameters": [ + { + "in": "query", + "name": "display_id", + "required": true, + "description": "The display id given to the Order.", + "schema": { + "type": "number" + } + }, + { + "in": "query", + "name": "email", + "style": "form", + "explode": false, + "description": "The email associated with this order.", + "required": true, + "schema": { + "type": "string", + "format": "email" + } + }, + { + "in": "query", + "name": "shipping_address", + "style": "form", + "explode": false, + "description": "The shipping address associated with this order.", + "schema": { + "type": "object", + "properties": { + "postal_code": { + "type": "string", + "description": "The postal code of the shipping address" + } + } + } + } + ], + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/products/{id}": { + "get": { + "operationId": "GetProductsProduct", + "summary": "Retrieves a Product", + "description": "Retrieves a Product.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Product.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Product" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "product": { + "$ref": "#/components/schemas/product" + } + } + } + } + } + } + } + } + }, + "/products": { + "get": { + "operationId": "GetProducts", + "summary": "List Products", + "description": "Retrieves a list of Products.", + "parameters": [ + { + "in": "query", + "name": "q", + "description": "Query used for searching products by title, description, variant's title, variant's sku, and collection's title", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "id", + "style": "form", + "explode": false, + "description": "product IDs to search for.", + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + { + "in": "query", + "name": "collection_id", + "style": "form", + "explode": false, + "description": "Collection IDs to search for", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "tags", + "style": "form", + "explode": false, + "description": "Tag IDs to search for", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "title", + "description": "title to search for.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "description", + "description": "description to search for.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "handle", + "description": "handle to search for.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "is_giftcard", + "description": "Search for giftcards using is_giftcard=true.", + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "type", + "description": "type to search for.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "created_at", + "description": "Date comparison for when resulting products were created.", + "schema": { + "type": "object", + "properties": { + "lt": { + "type": "string", + "description": "filter by dates less than this date", + "format": "date" + }, + "gt": { + "type": "string", + "description": "filter by dates greater than this date", + "format": "date" + }, + "lte": { + "type": "string", + "description": "filter by dates less than or equal to this date", + "format": "date" + }, + "gte": { + "type": "string", + "description": "filter by dates greater than or equal to this date", + "format": "date" + } + } + } + }, + { + "in": "query", + "name": "updated_at", + "description": "Date comparison for when resulting products were updated.", + "schema": { + "type": "object", + "properties": { + "lt": { + "type": "string", + "description": "filter by dates less than this date", + "format": "date" + }, + "gt": { + "type": "string", + "description": "filter by dates greater than this date", + "format": "date" + }, + "lte": { + "type": "string", + "description": "filter by dates less than or equal to this date", + "format": "date" + }, + "gte": { + "type": "string", + "description": "filter by dates greater than or equal to this date", + "format": "date" + } + } + } + }, + { + "in": "query", + "name": "offset", + "description": "How many products to skip in the result.", + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "in": "query", + "name": "limit", + "description": "Limit the number of products returned.", + "schema": { + "type": "integer", + "default": 100 + } + }, + { + "in": "query", + "name": "expand", + "description": "(Comma separated) Which fields should be expanded in each order of the result.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "fields", + "description": "(Comma separated) Which fields should be included in each order of the result.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Product" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "products": { + "type": "array", + "items": { + "$ref": "#/components/schemas/product" + } + }, + "count": { + "type": "integer", + "description": "The total number of items available" + }, + "offset": { + "type": "integer", + "description": "The number of items skipped before these items" + }, + "limit": { + "type": "integer", + "description": "The number of items per page" + } + } + } + } + } + } + } + } + }, + "/products/search": { + "get": { + "operationId": "GetProductsSearch", + "summary": "Search Products", + "description": "Run a search query on products using the search engine installed on Medusa", + "parameters": [ + { + "in": "query", + "name": "q", + "required": true, + "description": "The query to run the search with.", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "offset", + "description": "How many products to skip in the result.", + "schema": { + "type": "integer" + } + }, + { + "in": "query", + "name": "limit", + "description": "Limit the number of products returned.", + "schema": { + "type": "integer" + } + } + ], + "tags": [ + "Product" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "hits": { + "type": "array", + "description": "Array of results. The format of the items depends on the search engine installed on the server." + } + } + } + } + } + } + } + } + }, "/carts/{id}/shipping-methods": { "post": { "operationId": "PostCartsCartShippingMethod", @@ -1098,1193 +2285,6 @@ } } }, - "/collections/{id}": { - "get": { - "operationId": "GetCollectionsCollection", - "summary": "Retrieve a Product Collection", - "description": "Retrieves a Product Collection.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Product Collection", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Collection" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "collection": { - "$ref": "#/components/schemas/product_collection" - } - } - } - } - } - } - } - } - }, - "/collections": { - "get": { - "operationId": "GetCollections", - "summary": "List Product Collections", - "description": "Retrieve a list of Product Collection.", - "parameters": [ - { - "in": "query", - "name": "offset", - "description": "The number of collections to skip before starting to collect the collections set", - "schema": { - "type": "integer", - "default": 0 - } - }, - { - "in": "query", - "name": "limit", - "description": "The number of collections to return", - "schema": { - "type": "integer", - "default": 10 - } - }, - { - "in": "query", - "name": "created_at", - "description": "Date comparison for when resulting collections were created.", - "schema": { - "type": "object", - "properties": { - "lt": { - "type": "string", - "description": "filter by dates less than this date", - "format": "date" - }, - "gt": { - "type": "string", - "description": "filter by dates greater than this date", - "format": "date" - }, - "lte": { - "type": "string", - "description": "filter by dates less than or equal to this date", - "format": "date" - }, - "gte": { - "type": "string", - "description": "filter by dates greater than or equal to this date", - "format": "date" - } - } - } - }, - { - "in": "query", - "name": "updated_at", - "description": "Date comparison for when resulting collections were updated.", - "schema": { - "type": "object", - "properties": { - "lt": { - "type": "string", - "description": "filter by dates less than this date", - "format": "date" - }, - "gt": { - "type": "string", - "description": "filter by dates greater than this date", - "format": "date" - }, - "lte": { - "type": "string", - "description": "filter by dates less than or equal to this date", - "format": "date" - }, - "gte": { - "type": "string", - "description": "filter by dates greater than or equal to this date", - "format": "date" - } - } - } - } - ], - "tags": [ - "Collection" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "collections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/product_collection" - } - }, - "count": { - "type": "integer", - "description": "The total number of items available" - }, - "offset": { - "type": "integer", - "description": "The number of items skipped before these items" - }, - "limit": { - "type": "integer", - "description": "The number of items per page" - } - } - } - } - } - } - } - } - }, - "/customers/me/addresses": { - "post": { - "operationId": "PostCustomersCustomerAddresses", - "summary": "Add a Shipping Address", - "description": "Adds a Shipping Address to a Customer's saved addresses.", - "x-authenticated": true, - "requestBody": { - "content": { - "application/json": { - "schema": { - "required": [ - "address" - ], - "properties": { - "address": { - "description": "The Address to add to the Customer.", - "anyOf": [ - { - "$ref": "#/components/schemas/address" - } - ] - } - } - } - } - } - }, - "tags": [ - "Customer" - ], - "responses": { - "200": { - "description": "A successful response", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/customer" - } - } - } - } - } - } - } - } - }, - "/customers": { - "post": { - "operationId": "PostCustomers", - "summary": "Create a Customer", - "description": "Creates a Customer account.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "required": [ - "first_name", - "last_name", - "email", - "password" - ], - "properties": { - "first_name": { - "description": "The Customer's first name.", - "type": "string" - }, - "last_name": { - "description": "The Customer's last name.", - "type": "string" - }, - "email": { - "description": "The email of the customer.", - "type": "string", - "format": "email" - }, - "password": { - "description": "The Customer's password.", - "type": "string", - "format": "password" - }, - "phone": { - "description": "The Customer's phone number.", - "type": "string" - } - } - } - } - } - }, - "tags": [ - "Customer" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/customer" - } - } - } - } - } - }, - "422": { - "description": "A customer with the same email exists", - "content": { - "application/json": { - "schema": { - "properties": { - "code": { - "type": "string", - "description": "The error code" - }, - "type": { - "type": "string", - "description": "The type of error" - }, - "message": { - "type": "string", - "description": "Human-readable message with details about the error" - } - } - }, - "example": { - "code": "invalid_request_error", - "type": "duplicate_error", - "message": "A customer with the given email already has an account. Log in instead" - } - } - } - } - } - } - }, - "/customers/me/addresses/{address_id}": { - "delete": { - "operationId": "DeleteCustomersCustomerAddressesAddress", - "summary": "Delete an Address", - "description": "Removes an Address from the Customer's saved addresses.", - "x-authenticated": true, - "parameters": [ - { - "in": "path", - "name": "address_id", - "required": true, - "description": "The id of the Address to remove.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Customer" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/customer" - } - } - } - } - } - } - } - }, - "post": { - "operationId": "PostCustomersCustomerAddressesAddress", - "summary": "Update a Shipping Address", - "description": "Updates a Customer's saved Shipping Address.", - "x-authenticated": true, - "parameters": [ - { - "in": "path", - "name": "address_id", - "required": true, - "description": "The id of the Address to update.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/address" - } - ] - } - } - } - }, - "tags": [ - "Customer" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/customer" - } - } - } - } - } - } - } - } - }, - "/customers/me": { - "get": { - "operationId": "GetCustomersCustomer", - "summary": "Retrieves a Customer", - "description": "Retrieves a Customer - the Customer must be logged in to retrieve their details.", - "x-authenticated": true, - "tags": [ - "Customer" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/customer" - } - } - } - } - } - } - } - }, - "post": { - "operationId": "PostCustomersCustomer", - "summary": "Update Customer details", - "description": "Updates a Customer's saved details.", - "x-authenticated": true, - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "first_name": { - "description": "The Customer's first name.", - "type": "string" - }, - "last_name": { - "description": "The Customer's last name.", - "type": "string" - }, - "billing_address": { - "description": "The Address to be used for billing purposes.", - "anyOf": [ - { - "$ref": "#/components/schemas/address", - "description": "The full billing address object" - }, - { - "type": "string", - "description": "The ID of an existing billing address" - } - ] - }, - "password": { - "description": "The Customer's password.", - "type": "string" - }, - "phone": { - "description": "The Customer's phone number.", - "type": "string" - }, - "email": { - "description": "The email of the customer.", - "type": "string" - }, - "metadata": { - "description": "Metadata about the customer.", - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Customer" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/customer" - } - } - } - } - } - } - } - } - }, - "/customers/me/payment-methods": { - "get": { - "operationId": "GetCustomersCustomerPaymentMethods", - "summary": "Retrieve saved payment methods", - "description": "Retrieves a list of a Customer's saved payment methods. Payment methods are saved with Payment Providers and it is their responsibility to fetch saved methods.", - "x-authenticated": true, - "tags": [ - "Customer" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "payment_methods": { - "type": "array", - "items": { - "properties": { - "provider_id": { - "type": "string", - "description": "The id of the Payment Provider where the payment method is saved." - }, - "data": { - "type": "object", - "description": "The data needed for the Payment Provider to use the saved payment method." - } - } - } - } - } - } - } - } - } - } - } - }, - "/customers/me/orders": { - "get": { - "operationId": "GetCustomersCustomerOrders", - "summary": "Retrieve Customer Orders", - "description": "Retrieves a list of a Customer's Orders.", - "x-authenticated": true, - "parameters": [ - { - "in": "query", - "name": "limit", - "description": "How many orders to return.", - "schema": { - "type": "integer", - "default": 10 - } - }, - { - "in": "query", - "name": "offset", - "description": "The offset in the resulting orders.", - "schema": { - "type": "integer", - "default": 0 - } - }, - { - "in": "query", - "name": "fields", - "description": "(Comma separated string) Which fields should be included in the resulting orders.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "expand", - "description": "(Comma separated string) Which relations should be expanded in the resulting orders.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Customer" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "orders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/order" - } - }, - "count": { - "type": "integer", - "description": "The total number of items available" - }, - "offset": { - "type": "integer", - "description": "The number of items skipped before these items" - }, - "limit": { - "type": "integer", - "description": "The number of items per page" - } - } - } - } - } - } - } - } - }, - "/customers/password-token": { - "post": { - "operationId": "PostCustomersCustomerPasswordToken", - "summary": "Creates a reset password token", - "description": "Creates a reset password token to be used in a subsequent /reset-password request. The password token should be sent out of band e.g. via email and will not be returned.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "required": [ - "email" - ], - "properties": { - "email": { - "description": "The email of the customer.", - "type": "string", - "format": "email" - } - } - } - } - } - }, - "tags": [ - "Customer" - ], - "responses": { - "204": { - "description": "OK" - } - } - } - }, - "/customers/password-reset": { - "post": { - "operationId": "PostCustomersResetPassword", - "summary": "Resets Customer password", - "description": "Resets a Customer's password using a password token created by a previous /password-token request.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "required": [ - "email", - "password", - "token" - ], - "properties": { - "email": { - "description": "The email of the customer.", - "type": "string", - "format": "email" - }, - "password": { - "description": "The Customer's password.", - "type": "string", - "format": "password" - }, - "token": { - "description": "The reset password token", - "type": "string" - } - } - } - } - } - }, - "tags": [ - "Customer" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/customer" - } - } - } - } - } - } - } - } - }, - "/gift-cards/{code}": { - "get": { - "operationId": "GetGiftCardsCode", - "summary": "Retrieve Gift Card by Code", - "description": "Retrieves a Gift Card by its associated unqiue code.", - "parameters": [ - { - "in": "path", - "name": "code", - "required": true, - "description": "The unique Gift Card code.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Gift Card" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "gift_card": { - "$ref": "#/components/schemas/gift_card" - } - } - } - } - } - } - } - } - }, - "/orders/cart/{cart_id}": { - "get": { - "operationId": "GetOrdersOrderCartId", - "summary": "Retrieves Order by Cart id", - "description": "Retrieves an Order by the id of the Cart that was used to create the Order.", - "parameters": [ - { - "in": "path", - "name": "cart_id", - "required": true, - "description": "The ID of Cart.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}": { - "get": { - "operationId": "GetOrdersOrder", - "summary": "Retrieves an Order", - "description": "Retrieves an Order", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders": { - "get": { - "operationId": "GetOrders", - "summary": "Look Up an Order", - "description": "Look up an order using filters.", - "parameters": [ - { - "in": "query", - "name": "display_id", - "required": true, - "description": "The display id given to the Order.", - "schema": { - "type": "number" - } - }, - { - "in": "query", - "name": "email", - "style": "form", - "explode": false, - "description": "The email associated with this order.", - "required": true, - "schema": { - "type": "string", - "format": "email" - } - }, - { - "in": "query", - "name": "shipping_address", - "style": "form", - "explode": false, - "description": "The shipping address associated with this order.", - "schema": { - "type": "object", - "properties": { - "postal_code": { - "type": "string", - "description": "The postal code of the shipping address" - } - } - } - } - ], - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/products/{id}": { - "get": { - "operationId": "GetProductsProduct", - "summary": "Retrieves a Product", - "description": "Retrieves a Product.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Product.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Product" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "product": { - "$ref": "#/components/schemas/product" - } - } - } - } - } - } - } - } - }, - "/products": { - "get": { - "operationId": "GetProducts", - "summary": "List Products", - "description": "Retrieves a list of Products.", - "parameters": [ - { - "in": "query", - "name": "q", - "description": "Query used for searching products by title, description, variant's title, variant's sku, and collection's title", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "id", - "style": "form", - "explode": false, - "description": "product IDs to search for.", - "schema": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - } - }, - { - "in": "query", - "name": "collection_id", - "style": "form", - "explode": false, - "description": "Collection IDs to search for", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "in": "query", - "name": "tags", - "style": "form", - "explode": false, - "description": "Tag IDs to search for", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "in": "query", - "name": "title", - "description": "title to search for.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "description", - "description": "description to search for.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "handle", - "description": "handle to search for.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "is_giftcard", - "description": "Search for giftcards using is_giftcard=true.", - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "type", - "description": "type to search for.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "created_at", - "description": "Date comparison for when resulting products were created.", - "schema": { - "type": "object", - "properties": { - "lt": { - "type": "string", - "description": "filter by dates less than this date", - "format": "date" - }, - "gt": { - "type": "string", - "description": "filter by dates greater than this date", - "format": "date" - }, - "lte": { - "type": "string", - "description": "filter by dates less than or equal to this date", - "format": "date" - }, - "gte": { - "type": "string", - "description": "filter by dates greater than or equal to this date", - "format": "date" - } - } - } - }, - { - "in": "query", - "name": "updated_at", - "description": "Date comparison for when resulting products were updated.", - "schema": { - "type": "object", - "properties": { - "lt": { - "type": "string", - "description": "filter by dates less than this date", - "format": "date" - }, - "gt": { - "type": "string", - "description": "filter by dates greater than this date", - "format": "date" - }, - "lte": { - "type": "string", - "description": "filter by dates less than or equal to this date", - "format": "date" - }, - "gte": { - "type": "string", - "description": "filter by dates greater than or equal to this date", - "format": "date" - } - } - } - }, - { - "in": "query", - "name": "offset", - "description": "How many products to skip in the result.", - "schema": { - "type": "integer", - "default": 0 - } - }, - { - "in": "query", - "name": "limit", - "description": "Limit the number of products returned.", - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "in": "query", - "name": "expand", - "description": "(Comma separated) Which fields should be expanded in each order of the result.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "fields", - "description": "(Comma separated) Which fields should be included in each order of the result.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Product" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "products": { - "type": "array", - "items": { - "$ref": "#/components/schemas/product" - } - }, - "count": { - "type": "integer", - "description": "The total number of items available" - }, - "offset": { - "type": "integer", - "description": "The number of items skipped before these items" - }, - "limit": { - "type": "integer", - "description": "The number of items per page" - } - } - } - } - } - } - } - } - }, - "/products/search": { - "get": { - "operationId": "GetProductsSearch", - "summary": "Search Products", - "description": "Run a search query on products using the search engine installed on Medusa", - "parameters": [ - { - "in": "query", - "name": "q", - "required": true, - "description": "The query to run the search with.", - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "offset", - "description": "How many products to skip in the result.", - "schema": { - "type": "integer" - } - }, - { - "in": "query", - "name": "limit", - "description": "Limit the number of products returned.", - "schema": { - "type": "integer" - } - } - ], - "tags": [ - "Product" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "hits": { - "type": "array", - "description": "Array of results. The format of the items depends on the search engine installed on the server." - } - } - } - } - } - } - } - } - }, "/regions/{id}": { "get": { "operationId": "GetRegionsRegion", diff --git a/docs/api/store-spec3.yaml b/docs/api/store-spec3.yaml index ae016ea75f..1fa8c97e61 100644 --- a/docs/api/store-spec3.yaml +++ b/docs/api/store-spec3.yaml @@ -270,6 +270,456 @@ paths: properties: gift_card: $ref: '#/components/schemas/gift_card' + /customers/me/addresses: + post: + operationId: PostCustomersCustomerAddresses + summary: Add a Shipping Address + description: Adds a Shipping Address to a Customer's saved addresses. + x-authenticated: true + requestBody: + content: + application/json: + schema: + required: + - address + properties: + address: + description: The Address to add to the Customer. + anyOf: + - $ref: '#/components/schemas/address' + tags: + - Customer + responses: + '200': + description: A successful response + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + /customers: + post: + operationId: PostCustomers + summary: Create a Customer + description: Creates a Customer account. + requestBody: + content: + application/json: + schema: + required: + - first_name + - last_name + - email + - password + properties: + first_name: + description: The Customer's first name. + type: string + last_name: + description: The Customer's last name. + type: string + email: + description: The email of the customer. + type: string + format: email + password: + description: The Customer's password. + type: string + format: password + phone: + description: The Customer's phone number. + type: string + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + '422': + description: A customer with the same email exists + content: + application/json: + schema: + properties: + code: + type: string + description: The error code + type: + type: string + description: The type of error + message: + type: string + description: Human-readable message with details about the error + example: + code: invalid_request_error + type: duplicate_error + message: >- + A customer with the given email already has an account. Log in + instead + '/customers/me/addresses/{address_id}': + delete: + operationId: DeleteCustomersCustomerAddressesAddress + summary: Delete an Address + description: Removes an Address from the Customer's saved addresses. + x-authenticated: true + parameters: + - in: path + name: address_id + required: true + description: The id of the Address to remove. + schema: + type: string + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + post: + operationId: PostCustomersCustomerAddressesAddress + summary: Update a Shipping Address + description: Updates a Customer's saved Shipping Address. + x-authenticated: true + parameters: + - in: path + name: address_id + required: true + description: The id of the Address to update. + schema: + type: string + requestBody: + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/address' + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + /customers/me: + get: + operationId: GetCustomersCustomer + summary: Retrieves a Customer + description: >- + Retrieves a Customer - the Customer must be logged in to retrieve their + details. + x-authenticated: true + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + post: + operationId: PostCustomersCustomer + summary: Update Customer details + description: Updates a Customer's saved details. + x-authenticated: true + requestBody: + content: + application/json: + schema: + properties: + first_name: + description: The Customer's first name. + type: string + last_name: + description: The Customer's last name. + type: string + billing_address: + description: The Address to be used for billing purposes. + anyOf: + - $ref: '#/components/schemas/address' + description: The full billing address object + - type: string + description: The ID of an existing billing address + password: + description: The Customer's password. + type: string + phone: + description: The Customer's phone number. + type: string + email: + description: The email of the customer. + type: string + metadata: + description: Metadata about the customer. + type: object + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + /customers/me/payment-methods: + get: + operationId: GetCustomersCustomerPaymentMethods + summary: Retrieve saved payment methods + description: >- + Retrieves a list of a Customer's saved payment methods. Payment methods + are saved with Payment Providers and it is their responsibility to fetch + saved methods. + x-authenticated: true + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + payment_methods: + type: array + items: + properties: + provider_id: + type: string + description: >- + The id of the Payment Provider where the payment + method is saved. + data: + type: object + description: >- + The data needed for the Payment Provider to use the + saved payment method. + /customers/me/orders: + get: + operationId: GetCustomersCustomerOrders + summary: Retrieve Customer Orders + description: Retrieves a list of a Customer's Orders. + x-authenticated: true + parameters: + - in: query + name: limit + description: How many orders to return. + schema: + type: integer + default: 10 + - in: query + name: offset + description: The offset in the resulting orders. + schema: + type: integer + default: 0 + - in: query + name: fields + description: >- + (Comma separated string) Which fields should be included in the + resulting orders. + schema: + type: string + - in: query + name: expand + description: >- + (Comma separated string) Which relations should be expanded in the + resulting orders. + schema: + type: string + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + orders: + type: array + items: + $ref: '#/components/schemas/order' + count: + type: integer + description: The total number of items available + offset: + type: integer + description: The number of items skipped before these items + limit: + type: integer + description: The number of items per page + /customers/password-token: + post: + operationId: PostCustomersCustomerPasswordToken + summary: Creates a reset password token + description: >- + Creates a reset password token to be used in a subsequent + /reset-password request. The password token should be sent out of band + e.g. via email and will not be returned. + requestBody: + content: + application/json: + schema: + required: + - email + properties: + email: + description: The email of the customer. + type: string + format: email + tags: + - Customer + responses: + '204': + description: OK + /customers/password-reset: + post: + operationId: PostCustomersResetPassword + summary: Resets Customer password + description: >- + Resets a Customer's password using a password token created by a + previous /password-token request. + requestBody: + content: + application/json: + schema: + required: + - email + - password + - token + properties: + email: + description: The email of the customer. + type: string + format: email + password: + description: The Customer's password. + type: string + format: password + token: + description: The reset password token + type: string + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + '/orders/cart/{cart_id}': + get: + operationId: GetOrdersOrderCartId + summary: Retrieves Order by Cart id + description: >- + Retrieves an Order by the id of the Cart that was used to create the + Order. + parameters: + - in: path + name: cart_id + required: true + description: The ID of Cart. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}': + get: + operationId: GetOrdersOrder + summary: Retrieves an Order + description: Retrieves an Order + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + /orders: + get: + operationId: GetOrders + summary: Look Up an Order + description: Look up an order using filters. + parameters: + - in: query + name: display_id + required: true + description: The display id given to the Order. + schema: + type: number + - in: query + name: email + style: form + explode: false + description: The email associated with this order. + required: true + schema: + type: string + format: email + - in: query + name: shipping_address + style: form + explode: false + description: The shipping address associated with this order. + schema: + type: object + properties: + postal_code: + type: string + description: The postal code of the shipping address + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' '/carts/{id}/shipping-methods': post: operationId: PostCartsCartShippingMethod @@ -889,456 +1339,6 @@ paths: provider_id: type: string description: The ID of the Payment Provider. - /customers/me/addresses: - post: - operationId: PostCustomersCustomerAddresses - summary: Add a Shipping Address - description: Adds a Shipping Address to a Customer's saved addresses. - x-authenticated: true - requestBody: - content: - application/json: - schema: - required: - - address - properties: - address: - description: The Address to add to the Customer. - anyOf: - - $ref: '#/components/schemas/address' - tags: - - Customer - responses: - '200': - description: A successful response - content: - application/json: - schema: - properties: - customer: - $ref: '#/components/schemas/customer' - /customers: - post: - operationId: PostCustomers - summary: Create a Customer - description: Creates a Customer account. - requestBody: - content: - application/json: - schema: - required: - - first_name - - last_name - - email - - password - properties: - first_name: - description: The Customer's first name. - type: string - last_name: - description: The Customer's last name. - type: string - email: - description: The email of the customer. - type: string - format: email - password: - description: The Customer's password. - type: string - format: password - phone: - description: The Customer's phone number. - type: string - tags: - - Customer - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - customer: - $ref: '#/components/schemas/customer' - '422': - description: A customer with the same email exists - content: - application/json: - schema: - properties: - code: - type: string - description: The error code - type: - type: string - description: The type of error - message: - type: string - description: Human-readable message with details about the error - example: - code: invalid_request_error - type: duplicate_error - message: >- - A customer with the given email already has an account. Log in - instead - '/customers/me/addresses/{address_id}': - delete: - operationId: DeleteCustomersCustomerAddressesAddress - summary: Delete an Address - description: Removes an Address from the Customer's saved addresses. - x-authenticated: true - parameters: - - in: path - name: address_id - required: true - description: The id of the Address to remove. - schema: - type: string - tags: - - Customer - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - customer: - $ref: '#/components/schemas/customer' - post: - operationId: PostCustomersCustomerAddressesAddress - summary: Update a Shipping Address - description: Updates a Customer's saved Shipping Address. - x-authenticated: true - parameters: - - in: path - name: address_id - required: true - description: The id of the Address to update. - schema: - type: string - requestBody: - content: - application/json: - schema: - anyOf: - - $ref: '#/components/schemas/address' - tags: - - Customer - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - customer: - $ref: '#/components/schemas/customer' - /customers/me: - get: - operationId: GetCustomersCustomer - summary: Retrieves a Customer - description: >- - Retrieves a Customer - the Customer must be logged in to retrieve their - details. - x-authenticated: true - tags: - - Customer - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - customer: - $ref: '#/components/schemas/customer' - post: - operationId: PostCustomersCustomer - summary: Update Customer details - description: Updates a Customer's saved details. - x-authenticated: true - requestBody: - content: - application/json: - schema: - properties: - first_name: - description: The Customer's first name. - type: string - last_name: - description: The Customer's last name. - type: string - billing_address: - description: The Address to be used for billing purposes. - anyOf: - - $ref: '#/components/schemas/address' - description: The full billing address object - - type: string - description: The ID of an existing billing address - password: - description: The Customer's password. - type: string - phone: - description: The Customer's phone number. - type: string - email: - description: The email of the customer. - type: string - metadata: - description: Metadata about the customer. - type: object - tags: - - Customer - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - customer: - $ref: '#/components/schemas/customer' - /customers/me/payment-methods: - get: - operationId: GetCustomersCustomerPaymentMethods - summary: Retrieve saved payment methods - description: >- - Retrieves a list of a Customer's saved payment methods. Payment methods - are saved with Payment Providers and it is their responsibility to fetch - saved methods. - x-authenticated: true - tags: - - Customer - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - payment_methods: - type: array - items: - properties: - provider_id: - type: string - description: >- - The id of the Payment Provider where the payment - method is saved. - data: - type: object - description: >- - The data needed for the Payment Provider to use the - saved payment method. - /customers/me/orders: - get: - operationId: GetCustomersCustomerOrders - summary: Retrieve Customer Orders - description: Retrieves a list of a Customer's Orders. - x-authenticated: true - parameters: - - in: query - name: limit - description: How many orders to return. - schema: - type: integer - default: 10 - - in: query - name: offset - description: The offset in the resulting orders. - schema: - type: integer - default: 0 - - in: query - name: fields - description: >- - (Comma separated string) Which fields should be included in the - resulting orders. - schema: - type: string - - in: query - name: expand - description: >- - (Comma separated string) Which relations should be expanded in the - resulting orders. - schema: - type: string - tags: - - Customer - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - orders: - type: array - items: - $ref: '#/components/schemas/order' - count: - type: integer - description: The total number of items available - offset: - type: integer - description: The number of items skipped before these items - limit: - type: integer - description: The number of items per page - /customers/password-token: - post: - operationId: PostCustomersCustomerPasswordToken - summary: Creates a reset password token - description: >- - Creates a reset password token to be used in a subsequent - /reset-password request. The password token should be sent out of band - e.g. via email and will not be returned. - requestBody: - content: - application/json: - schema: - required: - - email - properties: - email: - description: The email of the customer. - type: string - format: email - tags: - - Customer - responses: - '204': - description: OK - /customers/password-reset: - post: - operationId: PostCustomersResetPassword - summary: Resets Customer password - description: >- - Resets a Customer's password using a password token created by a - previous /password-token request. - requestBody: - content: - application/json: - schema: - required: - - email - - password - - token - properties: - email: - description: The email of the customer. - type: string - format: email - password: - description: The Customer's password. - type: string - format: password - token: - description: The reset password token - type: string - tags: - - Customer - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - customer: - $ref: '#/components/schemas/customer' - '/orders/cart/{cart_id}': - get: - operationId: GetOrdersOrderCartId - summary: Retrieves Order by Cart id - description: >- - Retrieves an Order by the id of the Cart that was used to create the - Order. - parameters: - - in: path - name: cart_id - required: true - description: The ID of Cart. - schema: - type: string - tags: - - Order - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - order: - $ref: '#/components/schemas/order' - '/orders/{id}': - get: - operationId: GetOrdersOrder - summary: Retrieves an Order - description: Retrieves an Order - parameters: - - in: path - name: id - required: true - description: The id of the Order. - schema: - type: string - tags: - - Order - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - order: - $ref: '#/components/schemas/order' - /orders: - get: - operationId: GetOrders - summary: Look Up an Order - description: Look up an order using filters. - parameters: - - in: query - name: display_id - required: true - description: The display id given to the Order. - schema: - type: number - - in: query - name: email - style: form - explode: false - description: The email associated with this order. - required: true - schema: - type: string - format: email - - in: query - name: shipping_address - style: form - explode: false - description: The shipping address associated with this order. - schema: - type: object - properties: - postal_code: - type: string - description: The postal code of the shipping address - tags: - - Order - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - order: - $ref: '#/components/schemas/order' '/products/{id}': get: operationId: GetProductsProduct diff --git a/docs/api/store/openapi.yaml b/docs/api/store/openapi.yaml index 09e3890872..cd393a3d88 100644 --- a/docs/api/store/openapi.yaml +++ b/docs/api/store/openapi.yaml @@ -62,6 +62,28 @@ paths: $ref: paths/collections.yaml /gift-cards/{code}: $ref: paths/gift-cards_{code}.yaml + /customers/me/addresses: + $ref: paths/customers_me_addresses.yaml + /customers: + $ref: paths/customers.yaml + /customers/me/addresses/{address_id}: + $ref: paths/customers_me_addresses_{address_id}.yaml + /customers/me: + $ref: paths/customers_me.yaml + /customers/me/payment-methods: + $ref: paths/customers_me_payment-methods.yaml + /customers/me/orders: + $ref: paths/customers_me_orders.yaml + /customers/password-token: + $ref: paths/customers_password-token.yaml + /customers/password-reset: + $ref: paths/customers_password-reset.yaml + /orders/cart/{cart_id}: + $ref: paths/orders_cart_{cart_id}.yaml + /orders/{id}: + $ref: paths/orders_{id}.yaml + /orders: + $ref: paths/orders.yaml /carts/{id}/shipping-methods: $ref: paths/carts_{id}_shipping-methods.yaml /carts/{id}/taxes: @@ -86,28 +108,6 @@ paths: $ref: paths/carts_{id}_payment-sessions_{provider_id}_refresh.yaml /carts/{id}/payment-session: $ref: paths/carts_{id}_payment-session.yaml - /customers/me/addresses: - $ref: paths/customers_me_addresses.yaml - /customers: - $ref: paths/customers.yaml - /customers/me/addresses/{address_id}: - $ref: paths/customers_me_addresses_{address_id}.yaml - /customers/me: - $ref: paths/customers_me.yaml - /customers/me/payment-methods: - $ref: paths/customers_me_payment-methods.yaml - /customers/me/orders: - $ref: paths/customers_me_orders.yaml - /customers/password-token: - $ref: paths/customers_password-token.yaml - /customers/password-reset: - $ref: paths/customers_password-reset.yaml - /orders/cart/{cart_id}: - $ref: paths/orders_cart_{cart_id}.yaml - /orders/{id}: - $ref: paths/orders_{id}.yaml - /orders: - $ref: paths/orders.yaml /products/{id}: $ref: paths/products_{id}.yaml /products: diff --git a/packages/medusa/src/api/routes/admin/price-lists/list-price-list-products.ts b/packages/medusa/src/api/routes/admin/price-lists/list-price-list-products.ts index 02d326f7ca..726bfc65b2 100644 --- a/packages/medusa/src/api/routes/admin/price-lists/list-price-list-products.ts +++ b/packages/medusa/src/api/routes/admin/price-lists/list-price-list-products.ts @@ -19,12 +19,13 @@ import { Type } from "class-transformer" import { pickBy } from "lodash" /** - * @oas [get] /price-lists/:id/products + * @oas [get] /price-lists/{id}/products * operationId: "GetPriceListsPriceListProducts" * summary: "List Product in a Price List" * description: "Retrieves a list of Product that are part of a Price List" * x-authenticated: true * parameters: + * - (path) id=* {string} ID of the price list. * - (query) q {string} Query used for searching product title and description, variant title and sku, and collection title. * - (query) id {string} ID of the product to search for. * - in: query diff --git a/packages/medusa/src/api/routes/admin/tax-rates/add-to-product-types.ts b/packages/medusa/src/api/routes/admin/tax-rates/add-to-product-types.ts index 1b4a88bd2c..0721ceca4c 100644 --- a/packages/medusa/src/api/routes/admin/tax-rates/add-to-product-types.ts +++ b/packages/medusa/src/api/routes/admin/tax-rates/add-to-product-types.ts @@ -1,17 +1,18 @@ import { IsArray, IsOptional } from "class-validator" import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config" +import { EntityManager } from "typeorm" import { TaxRate } from "../../../.." import { TaxRateService } from "../../../../services" import { validator } from "../../../../utils/validator" -import { EntityManager } from "typeorm" /** - * @oas [post] /tax-rates/:id/product-types/batch + * @oas [post] /tax-rates/{id}/product-types/batch * operationId: "PostTaxRatesTaxRateProductTypes" * summary: "Add Tax Rate to Product Types" * description: "Associates a Tax Rate with a list of Product Types" * parameters: + * - (path) id=* {string} ID of the tax rate. * - in: query * name: fields * description: "Which fields should be included in the result." diff --git a/packages/medusa/src/api/routes/admin/tax-rates/add-to-products.ts b/packages/medusa/src/api/routes/admin/tax-rates/add-to-products.ts index 4b6e761727..cc589dbc58 100644 --- a/packages/medusa/src/api/routes/admin/tax-rates/add-to-products.ts +++ b/packages/medusa/src/api/routes/admin/tax-rates/add-to-products.ts @@ -1,17 +1,18 @@ import { IsArray, IsOptional } from "class-validator" import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config" +import { EntityManager } from "typeorm" import { TaxRate } from "../../../.." import { TaxRateService } from "../../../../services" import { validator } from "../../../../utils/validator" -import { EntityManager } from "typeorm" /** - * @oas [post] /tax-rates/:id/products/batch + * @oas [post] /tax-rates/{id}/products/batch * operationId: "PostTaxRatesTaxRateProducts" * summary: "Add Tax Rate to Products" * description: "Associates a Tax Rate with a list of Products" * parameters: + * - (path) id=* {string} ID of the tax rate. * - in: query * name: fields * description: "Which fields should be included in the result." diff --git a/packages/medusa/src/api/routes/admin/tax-rates/add-to-shipping-options.ts b/packages/medusa/src/api/routes/admin/tax-rates/add-to-shipping-options.ts index ba0fb060d6..b12a722b27 100644 --- a/packages/medusa/src/api/routes/admin/tax-rates/add-to-shipping-options.ts +++ b/packages/medusa/src/api/routes/admin/tax-rates/add-to-shipping-options.ts @@ -1,17 +1,18 @@ import { IsArray, IsOptional } from "class-validator" import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config" +import { EntityManager } from "typeorm" import { TaxRate } from "../../../.." import { TaxRateService } from "../../../../services" import { validator } from "../../../../utils/validator" -import { EntityManager } from "typeorm" /** - * @oas [post] /tax-rates/:id/shipping-options/batch + * @oas [post] /tax-rates/{id}/shipping-options/batch * operationId: "PostTaxRatesTaxRateShippingOptions" * summary: "Add Tax Rate to Product Types" * description: "Associates a Tax Rate with a list of Shipping Options" * parameters: + * - (path) id=* {string} ID of the tax rate. * - in: query * name: fields * description: "Which fields should be included in the result." diff --git a/packages/medusa/src/api/routes/admin/tax-rates/get-tax-rate.ts b/packages/medusa/src/api/routes/admin/tax-rates/get-tax-rate.ts index 71e80ac276..ff42468538 100644 --- a/packages/medusa/src/api/routes/admin/tax-rates/get-tax-rate.ts +++ b/packages/medusa/src/api/routes/admin/tax-rates/get-tax-rate.ts @@ -6,11 +6,12 @@ import { TaxRateService } from "../../../../services" import { validator } from "../../../../utils/validator" /** - * @oas [get] /tax-rates/:id + * @oas [get] /tax-rates/{id} * operationId: "GetTaxRatesTaxRate" * summary: "Get Tax Rate" * description: "Retrieves a TaxRate" * parameters: + * - (path) id=* {string} ID of the tax rate. * - in: query * name: fields * description: "Which fields should be included in the result." diff --git a/packages/medusa/src/api/routes/admin/tax-rates/remove-from-product-types.ts b/packages/medusa/src/api/routes/admin/tax-rates/remove-from-product-types.ts index c80190a803..83ec2c5b79 100644 --- a/packages/medusa/src/api/routes/admin/tax-rates/remove-from-product-types.ts +++ b/packages/medusa/src/api/routes/admin/tax-rates/remove-from-product-types.ts @@ -1,17 +1,18 @@ import { IsArray, IsOptional } from "class-validator" import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config" +import { EntityManager } from "typeorm" import { TaxRate } from "../../../.." import { TaxRateService } from "../../../../services" import { validator } from "../../../../utils/validator" -import { EntityManager } from "typeorm" /** - * @oas [delete] /tax-rates/:id/product-types/batch + * @oas [delete] /tax-rates/{id}/product-types/batch * operationId: "DeleteTaxRatesTaxRateProductTypes" * summary: "Remove Tax Rate from Product Types" * description: "Removes a Tax Rate from a list of Product Types" * parameters: + * - (path) id=* {string} ID of the tax rate. * - in: query * name: fields * description: "Which fields should be included in the result." diff --git a/packages/medusa/src/api/routes/admin/tax-rates/remove-from-products.ts b/packages/medusa/src/api/routes/admin/tax-rates/remove-from-products.ts index 1c3b6996ac..a32c292909 100644 --- a/packages/medusa/src/api/routes/admin/tax-rates/remove-from-products.ts +++ b/packages/medusa/src/api/routes/admin/tax-rates/remove-from-products.ts @@ -1,17 +1,18 @@ import { IsArray, IsOptional } from "class-validator" import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config" +import { EntityManager } from "typeorm" import { TaxRate } from "../../../.." import { TaxRateService } from "../../../../services" import { validator } from "../../../../utils/validator" -import { EntityManager } from "typeorm" /** - * @oas [delete] /tax-rates/:id/products/batch + * @oas [delete] /tax-rates/{id}/products/batch * operationId: "DeleteTaxRatesTaxRateProducts" * summary: "Removes Tax Rate from Products" * description: "Removes a Tax Rate from a list of Products" * parameters: + * - (path) id=* {string} ID of the tax rate. * - in: query * name: fields * description: "Which fields should be included in the result." diff --git a/packages/medusa/src/api/routes/admin/tax-rates/remove-from-shipping-options.ts b/packages/medusa/src/api/routes/admin/tax-rates/remove-from-shipping-options.ts index 0a1a13d6d8..74f773f58b 100644 --- a/packages/medusa/src/api/routes/admin/tax-rates/remove-from-shipping-options.ts +++ b/packages/medusa/src/api/routes/admin/tax-rates/remove-from-shipping-options.ts @@ -1,17 +1,18 @@ import { IsArray, IsOptional } from "class-validator" import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config" +import { EntityManager } from "typeorm" import { TaxRate } from "../../../.." import { TaxRateService } from "../../../../services" import { validator } from "../../../../utils/validator" -import { EntityManager } from "typeorm" /** - * @oas [delete] /tax-rates/:id/shipping-options/batch + * @oas [delete] /tax-rates/{id}/shipping-options/batch * operationId: "DeleteTaxRatesTaxRateShippingOptions" * summary: "Removes a Tax Rate from Product Types" * description: "Removes a Tax Rate from a list of Product Types" * parameters: + * - (path) id=* {string} ID of the tax rate. * - in: query * name: fields * description: "Which fields should be included in the result." diff --git a/packages/medusa/src/api/routes/admin/tax-rates/update-tax-rate.ts b/packages/medusa/src/api/routes/admin/tax-rates/update-tax-rate.ts index 2ed36a16e0..5d0e34e6f9 100644 --- a/packages/medusa/src/api/routes/admin/tax-rates/update-tax-rate.ts +++ b/packages/medusa/src/api/routes/admin/tax-rates/update-tax-rate.ts @@ -9,11 +9,12 @@ import { omit } from "lodash" import { validator } from "../../../../utils/validator" /** - * @oas [post] /tax-rates/:id + * @oas [post] /tax-rates/{id} * operationId: "PostTaxRatesTaxRate" * summary: "Update a Tax Rate" * description: "Updates a Tax Rate" * parameters: + * - (path) id=* {string} ID of the tax rate. * - in: query * name: fields * description: "Which fields should be included in the result."