fix: merge

This commit is contained in:
Sebastian Rindom
2021-03-16 22:39:29 +01:00
26 changed files with 2401 additions and 1255 deletions

View File

@@ -87,7 +87,7 @@
"application/json": {
"schema": {
"properties": {
"customer": {
"user": {
"$ref": "#/components/schemas/user"
}
}
@@ -134,7 +134,7 @@
"application/json": {
"schema": {
"properties": {
"customer": {
"user": {
"$ref": "#/components/schemas/user"
}
}
@@ -1904,7 +1904,7 @@
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Swap.",
"description": "The id of the Order.",
"schema": {
"type": "string"
}
@@ -2194,7 +2194,7 @@
"get": {
"operationId": "GetOrders",
"summary": "List Orders",
"description": "Retrieves an list of Orders",
"description": "Retrieves a list of Orders",
"tags": [
"Order"
],
@@ -2205,8 +2205,11 @@
"application/json": {
"schema": {
"properties": {
"order": {
"$ref": "#/components/schemas/order"
"orders": {
"type": "array",
"items": {
"$ref": "#/components/schemas/order"
}
}
}
}
@@ -2503,6 +2506,14 @@
"description": "The id of the Line Item.",
"type": "string"
},
"reason_id": {
"description": "The id of the Return Reason to use.",
"type": "string"
},
"note": {
"description": "An optional note with information about the Return.",
"type": "string"
},
"quantity": {
"description": "The quantity of the Line Item.",
"type": "integer"
@@ -4554,6 +4565,183 @@
}
}
},
"/return-reasons": {
"post": {
"operationId": "PostReturnReasons",
"summary": "Create a Return Reason",
"description": "Creates a Return Reason",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"label": {
"description": "The label to display to the Customer.",
"type": "string"
},
"value": {
"description": "The value that the Return Reason will be identified by. Must be unique.",
"type": "string"
},
"description": {
"description": "An optional description to for the Reason.",
"type": "string"
},
"metadata": {
"description": "An optional set of key-value pairs with additional information.",
"type": "object"
}
}
}
}
}
},
"tags": [
"Return Reason"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"return_reason": {
"$ref": "#/components/schemas/return_reason"
}
}
}
}
}
}
}
},
"get": {
"operationId": "GetReturnReasons",
"summary": "List Return Reasons",
"description": "Retrieves a list of Return Reasons.",
"tags": [
"Return Reason"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"return_reasons": {
"type": "array",
"items": {
"$ref": "#/components/schemas/return_reason"
}
}
}
}
}
}
}
}
}
},
"/return-reasons/{id}": {
"get": {
"operationId": "GetReturnReasonsReason",
"summary": "Retrieve a Return Reason",
"description": "Retrieves a Return Reason.",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Return Reason.",
"schema": {
"type": "string"
}
}
],
"tags": [
"Return Reason"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"return_reason": {
"$ref": "#/components/schemas/return_reason"
}
}
}
}
}
}
}
},
"post": {
"operationId": "PostReturnReasonsReason",
"summary": "Update a Return Reason",
"description": "Updates a Return Reason",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Return Reason.",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"label": {
"description": "The label to display to the Customer.",
"type": "string"
},
"value": {
"description": "The value that the Return Reason will be identified by. Must be unique.",
"type": "string"
},
"description": {
"description": "An optional description to for the Reason.",
"type": "string"
},
"metadata": {
"description": "An optional set of key-value pairs with additional information.",
"type": "object"
}
}
}
}
}
},
"tags": [
"Return Reason"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"return_reason": {
"$ref": "#/components/schemas/return_reason"
}
}
}
}
}
}
}
}
},
"/returns": {
"get": {
"operationId": "GetReturns",
@@ -5051,35 +5239,6 @@
}
}
},
"/swaps": {
"get": {
"operationId": "GetSwaps",
"summary": "List Swaps",
"description": "Retrieves a list of Swaps.",
"tags": [
"Swap"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"swaps": {
"type": "array",
"items": {
"$ref": "#/components/schemas/swap"
}
}
}
}
}
}
}
}
}
},
"/store/currencies/{code}": {
"post": {
"operationId": "PostStoreCurrenciesCode",
@@ -5253,6 +5412,35 @@
}
}
},
"/swaps": {
"get": {
"operationId": "GetSwaps",
"summary": "List Swaps",
"description": "Retrieves a list of Swaps.",
"tags": [
"Swap"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"swaps": {
"type": "array",
"items": {
"$ref": "#/components/schemas/swap"
}
}
}
}
}
}
}
}
}
},
"/variants": {
"get": {
"operationId": "GetVariants",
@@ -7412,6 +7600,60 @@
"description": "The quantity that was received in the warehouse.",
"type": "integer"
},
"reason": {
"description": "The reason for returning the item.",
"anyOf": [
{
"$ref": "#/components/schemas/return_reason"
}
]
},
"note": {
"description": "An optional note with additional details about the Return.",
"type": "string"
},
"metadata": {
"description": "An optional key-value map with additional information.",
"type": "object"
}
}
},
"return_reason": {
"title": "Return Reason",
"description": "A Reason for why a given product is returned. A Return Reason can be used on Return Items in order to indicate why a Line Item was returned.",
"x-resourceId": "return_reason",
"properties": {
"id": {
"description": "The id of the Return Reason will start with `rr_`.",
"type": "string"
},
"description": {
"description": "A description of the Reason.",
"type": "string"
},
"label": {
"description": "A text that can be displayed to the Customer as a reason.",
"type": "string"
},
"value": {
"description": "The value to identify the reason by.",
"type": "string"
},
"created_at": {
"description": "The date with timezone at which the resource was created.",
"type": "string",
"format": "date-time"
},
"updated_at": {
"description": "The date with timezone at which the resource was last updated.",
"type": "string",
"format": "date-time"
},
"deleted_at": {
"description": "The date with timezone at which the resource was deleted.",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "An optional key-value map with additional information.",
"type": "object"

View File

@@ -53,7 +53,7 @@ paths:
application/json:
schema:
properties:
customer:
user:
$ref: '#/components/schemas/user'
requestBody:
content:
@@ -83,7 +83,7 @@ paths:
application/json:
schema:
properties:
customer:
user:
$ref: '#/components/schemas/user'
/collections:
post:
@@ -1314,7 +1314,7 @@ paths:
- in: path
name: id
required: true
description: The id of the Swap.
description: The id of the Order.
schema:
type: string
requestBody:
@@ -1501,7 +1501,7 @@ paths:
get:
operationId: GetOrders
summary: List Orders
description: Retrieves an list of Orders
description: Retrieves a list of Orders
tags:
- Order
responses:
@@ -1511,8 +1511,10 @@ paths:
application/json:
schema:
properties:
order:
$ref: '#/components/schemas/order'
orders:
type: array
items:
$ref: '#/components/schemas/order'
'/orders/{id}/swaps/{swap_id}/process-payment':
post:
operationId: PostOrdersOrderSwapsSwapProcessPayment
@@ -1705,6 +1707,12 @@ paths:
item_id:
description: The id of the Line Item.
type: string
reason_id:
description: The id of the Return Reason to use.
type: string
note:
description: An optional note with information about the Return.
type: string
quantity:
description: The quantity of the Line Item.
type: integer
@@ -2739,24 +2747,6 @@ paths:
type: array
items:
$ref: '#/components/schemas/product_type'
/returns:
get:
operationId: GetReturns
summary: List Returns
description: Retrieves a list of Returns
tags:
- Return
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
returns:
type: array
items:
$ref: '#/components/schemas/return'
'/regions/{id}/countries':
post:
operationId: PostRegionsRegionCountries
@@ -3169,6 +3159,144 @@ paths:
properties:
region:
$ref: '#/components/schemas/region'
/return-reasons:
post:
operationId: PostReturnReasons
summary: Create a Return Reason
description: Creates a Return Reason
requestBody:
content:
application/json:
schema:
properties:
label:
description: The label to display to the Customer.
type: string
value:
description: >-
The value that the Return Reason will be identified by. Must
be unique.
type: string
description:
description: An optional description to for the Reason.
type: string
metadata:
description: >-
An optional set of key-value pairs with additional
information.
type: object
tags:
- Return Reason
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
return_reason:
$ref: '#/components/schemas/return_reason'
get:
operationId: GetReturnReasons
summary: List Return Reasons
description: Retrieves a list of Return Reasons.
tags:
- Return Reason
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
return_reasons:
type: array
items:
$ref: '#/components/schemas/return_reason'
'/return-reasons/{id}':
get:
operationId: GetReturnReasonsReason
summary: Retrieve a Return Reason
description: Retrieves a Return Reason.
parameters:
- in: path
name: id
required: true
description: The id of the Return Reason.
schema:
type: string
tags:
- Return Reason
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
return_reason:
$ref: '#/components/schemas/return_reason'
post:
operationId: PostReturnReasonsReason
summary: Update a Return Reason
description: Updates a Return Reason
parameters:
- in: path
name: id
required: true
description: The id of the Return Reason.
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
label:
description: The label to display to the Customer.
type: string
value:
description: >-
The value that the Return Reason will be identified by. Must
be unique.
type: string
description:
description: An optional description to for the Reason.
type: string
metadata:
description: >-
An optional set of key-value pairs with additional
information.
type: object
tags:
- Return Reason
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
return_reason:
$ref: '#/components/schemas/return_reason'
/returns:
get:
operationId: GetReturns
summary: List Returns
description: Retrieves a list of Returns
tags:
- Return
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
returns:
type: array
items:
$ref: '#/components/schemas/return'
/shipping-options:
post:
operationId: PostShippingOptions
@@ -5441,6 +5569,47 @@ components:
recieved_quantity:
description: The quantity that was received in the warehouse.
type: integer
reason:
description: The reason for returning the item.
anyOf:
- $ref: '#/components/schemas/return_reason'
note:
description: An optional note with additional details about the Return.
type: string
metadata:
description: An optional key-value map with additional information.
type: object
return_reason:
title: Return Reason
description: >-
A Reason for why a given product is returned. A Return Reason can be
used on Return Items in order to indicate why a Line Item was returned.
x-resourceId: return_reason
properties:
id:
description: The id of the Return Reason will start with `rr_`.
type: string
description:
description: A description of the Reason.
type: string
label:
description: A text that can be displayed to the Customer as a reason.
type: string
value:
description: The value to identify the reason by.
type: string
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was last updated.
type: string
format: date-time
deleted_at:
description: The date with timezone at which the resource was deleted.
type: string
format: date-time
metadata:
description: An optional key-value map with additional information.
type: object

File diff suppressed because it is too large Load Diff

View File

@@ -75,6 +75,130 @@
}
],
"paths": {
"/auth": {
"post": {
"operationId": "PostAuth",
"summary": "Authenticate Customer",
"description": "Logs a Customer in and authorizes them to view their details. Successful authentication will set a session cookie in the Customer's browser.",
"parameters": [],
"tags": [
"Auth"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"customer": {
"$ref": "#/components/schemas/customer"
}
}
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string",
"description": "The Customer's email."
},
"password": {
"type": "string",
"description": "The Customer's password."
}
}
}
}
}
}
},
"delete": {
"operationId": "DeleteAuth",
"summary": "Log out",
"description": "Destroys a Customer's authenticated session.",
"tags": [
"Auth"
],
"responses": {
"200": {
"description": "OK"
}
}
},
"get": {
"operationId": "GetAuth",
"summary": "Get Session",
"description": "Gets the currently logged in Customer.",
"tags": [
"Auth"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"customer": {
"$ref": "#/components/schemas/customer"
}
}
}
}
}
}
}
}
},
"/auth/{email}": {
"get": {
"operationId": "GetAuthEmail",
"summary": "Check if email has account",
"description": "Checks if a Customer with the given email has signed up.",
"parameters": [
{
"in": "path",
"name": "email",
"required": true,
"description": "The Customer's email.",
"schema": {
"type": "string"
}
}
],
"tags": [
"Auth"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"exists": {
"type": "boolean"
}
}
}
}
}
}
}
}
},
"/carts/{id}/shipping-methods": {
"post": {
"operationId": "PostCartsCartShippingMethod",
@@ -1357,135 +1481,22 @@
}
}
},
"/auth": {
"post": {
"operationId": "PostAuth",
"summary": "Authenticate Customer",
"description": "Logs a Customer in and authorizes them to view their details. Successful authentication will set a session cookie in the Customer's browser.",
"parameters": [],
"tags": [
"Auth"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"customer": {
"$ref": "#/components/schemas/customer"
}
}
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string",
"description": "The Customer's email."
},
"password": {
"type": "string",
"description": "The Customer's password."
}
}
}
}
}
}
},
"delete": {
"operationId": "DeleteAuth",
"summary": "Log out",
"description": "Destroys a Customer's authenticated session.",
"tags": [
"Auth"
],
"responses": {
"200": {
"description": "OK"
}
}
},
"get": {
"operationId": "GetAuth",
"summary": "Get Session",
"description": "Gets the currently logged in Customer.",
"tags": [
"Auth"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"customer": {
"$ref": "#/components/schemas/customer"
}
}
}
}
}
}
}
}
},
"/auth/{email}": {
"get": {
"operationId": "GetAuthEmail",
"summary": "Check if email has account",
"description": "Checks if a Customer with the given email has signed up.",
"parameters": [
{
"in": "path",
"name": "email",
"required": true,
"description": "The Customer's email.",
"schema": {
"type": "string"
}
}
],
"tags": [
"Auth"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"exists": {
"type": "boolean"
}
}
}
}
}
}
}
}
},
"/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"
],
@@ -1519,6 +1530,228 @@
}
}
},
"/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.",
"tags": [
"Product"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"count": {
"description": "The total number of Products.",
"type": "integer"
},
"offset": {
"description": "The offset for pagination.",
"type": "integer"
},
"limit": {
"description": "The maxmimum number of Products to return,",
"type": "integer"
},
"products": {
"type": "array",
"items": {
"$ref": "#/components/schemas/product"
}
}
}
}
}
}
}
}
}
},
"/return-reasons/{id}": {
"get": {
"operationId": "GetReturnReasonsReason",
"summary": "Retrieve a Return Reason",
"description": "Retrieves a Return Reason.",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Return Reason.",
"schema": {
"type": "string"
}
}
],
"tags": [
"Return Reason"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"return_reason": {
"$ref": "#/components/schemas/return_reason"
}
}
}
}
}
}
}
}
},
"/return-reasons": {
"get": {
"operationId": "GetReturnReasons",
"summary": "List Return Reasons",
"description": "Retrieves a list of Return Reasons.",
"tags": [
"Return Reason"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"return_reasons": {
"type": "array",
"items": {
"$ref": "#/components/schemas/return_reason"
}
}
}
}
}
}
}
}
}
},
"/regions/{id}": {
"get": {
"operationId": "GetRegionsRegion",
"summary": "Retrieves a Region",
"description": "Retrieves a Region.",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Region.",
"schema": {
"type": "string"
}
}
],
"tags": [
"Region"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"region": {
"$ref": "#/components/schemas/region"
}
}
}
}
}
}
}
}
},
"/regions": {
"get": {
"operationId": "GetRegions",
"summary": "List Regions",
"description": "Retrieves a list of Regions.",
"tags": [
"Region"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"count": {
"description": "The total number of regions.",
"type": "integer"
},
"offset": {
"description": "The offset for pagination.",
"type": "integer"
},
"limit": {
"description": "The maxmimum number of regions to return,",
"type": "integer"
},
"regions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/region"
}
}
}
}
}
}
}
}
}
},
"/orders/cart/{cart_id}": {
"get": {
"operationId": "GetOrdersOrderCartId",
@@ -1639,162 +1872,6 @@
}
}
},
"/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.",
"tags": [
"Product"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"count": {
"description": "The total number of Products.",
"type": "integer"
},
"offset": {
"description": "The offset for pagination.",
"type": "integer"
},
"limit": {
"description": "The maxmimum number of Products to return,",
"type": "integer"
},
"products": {
"type": "array",
"items": {
"$ref": "#/components/schemas/product"
}
}
}
}
}
}
}
}
}
},
"/regions/{id}": {
"get": {
"operationId": "GetRegionsRegion",
"summary": "Retrieves a Region",
"description": "Retrieves a Region.",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Region.",
"schema": {
"type": "string"
}
}
],
"tags": [
"Region"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"region": {
"$ref": "#/components/schemas/region"
}
}
}
}
}
}
}
}
},
"/regions": {
"get": {
"operationId": "GetRegions",
"summary": "List Regions",
"description": "Retrieves a list of Regions.",
"tags": [
"Region"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"count": {
"description": "The total number of regions.",
"type": "integer"
},
"offset": {
"description": "The offset for pagination.",
"type": "integer"
},
"limit": {
"description": "The maxmimum number of regions to return,",
"type": "integer"
},
"regions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/region"
}
}
}
}
}
}
}
}
}
},
"/returns": {
"post": {
"operationId": "PostReturns",
@@ -4199,6 +4276,60 @@
"description": "The quantity that was received in the warehouse.",
"type": "integer"
},
"reason": {
"description": "The reason for returning the item.",
"anyOf": [
{
"$ref": "#/components/schemas/return_reason"
}
]
},
"note": {
"description": "An optional note with additional details about the Return.",
"type": "string"
},
"metadata": {
"description": "An optional key-value map with additional information.",
"type": "object"
}
}
},
"return_reason": {
"title": "Return Reason",
"description": "A Reason for why a given product is returned. A Return Reason can be used on Return Items in order to indicate why a Line Item was returned.",
"x-resourceId": "return_reason",
"properties": {
"id": {
"description": "The id of the Return Reason will start with `rr_`.",
"type": "string"
},
"description": {
"description": "A description of the Reason.",
"type": "string"
},
"label": {
"description": "A text that can be displayed to the Customer as a reason.",
"type": "string"
},
"value": {
"description": "The value to identify the reason by.",
"type": "string"
},
"created_at": {
"description": "The date with timezone at which the resource was created.",
"type": "string",
"format": "date-time"
},
"updated_at": {
"description": "The date with timezone at which the resource was last updated.",
"type": "string",
"format": "date-time"
},
"deleted_at": {
"description": "The date with timezone at which the resource was deleted.",
"type": "string",
"format": "date-time"
},
"metadata": {
"description": "An optional key-value map with additional information.",
"type": "object"

View File

@@ -121,338 +121,6 @@ paths:
properties:
exists:
type: boolean
'/customers/{id}/addresses':
post:
operationId: PostCustomersCustomerAddresses
summary: Add a Shipping Address
description: Adds a Shipping Address to a Customer's saved addresses.
parameters:
- in: path
name: id
required: true
description: The Customer id.
schema:
type: string
requestBody:
content:
application/json:
schema:
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.
parameters: []
tags:
- Customer
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
customer:
$ref: '#/components/schemas/customer'
requestBody:
content:
application/json:
schema:
type: object
required:
- email
- first_name
- last_name
- password
properties:
email:
type: string
description: The Customer's email address.
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 for login.
phone:
type: string
description: The Customer's phone number.
'/customers/{id}/addresses/{address_id}':
delete:
operationId: DeleteCustomersCustomerAddressesAddress
summary: Delete an Address
description: Removes an Address from the Customer's saved addresse.
parameters:
- in: path
name: id
required: true
description: The id of the Customer.
schema:
type: string
- 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.
parameters:
- in: path
name: id
required: true
description: The Customer id.
schema:
type: string
- in: path
name: address_id
required: true
description: The id of the Address to update.
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
address:
description: The updated Address.
anyOf:
- $ref: '#/components/schemas/address'
tags:
- Customer
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
customer:
$ref: '#/components/schemas/customer'
'/customers/{id}':
get:
operationId: GetCustomersCustomer
summary: Retrieves a Customer
description: >-
Retrieves a Customer - the Customer must be logged in to retrieve their
details.
parameters:
- in: path
name: id
required: true
description: The id of 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 Customer details
description: Updates a Customer's saved details.
parameters:
- in: path
name: id
required: true
description: The id of the Customer.
schema:
type: string
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
password:
description: The Customer's password.
type: string
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'
'/customers/{id}/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.
parameters:
- in: path
name: id
required: true
description: The id of the Customer.
schema:
type: string
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/{id}/orders':
get:
operationId: GetCustomersCustomerOrders
summary: Retrieve Customer Orders
description: Retrieves a list of a Customer's Orders.
parameters:
- in: path
name: id
required: true
description: The id of the Customer.
schema:
type: string
tags:
- Customer
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
payment_methods:
type: array
items:
$ref: '#/components/schemas/order'
'/customers/{id}/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.
parameters:
- in: path
name: id
required: true
description: The id of the Customer.
schema:
type: string
tags:
- Customer
responses:
'204':
description: OK
'/customers/{id}/reset-password':
post:
operationId: PostCustomersCustomerResetPassword
summary: Resets Customer password
description: >-
Resets a Customer's password using a password token created by a
previous /password-token request.
parameters:
- in: path
name: id
required: true
description: The id of the Customer.
schema:
type: string
tags:
- Customer
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
customer:
$ref: '#/components/schemas/customer'
requestBody:
content:
application/json:
schema:
type: object
required:
- email
- token
- password
properties:
email:
type: string
description: The Customer's email.
token:
type: string
description: The password token created by a /password-token request.
password:
type: string
description: The new password to set for the Customer.
'/carts/{id}/shipping-methods':
post:
operationId: PostCartsCartShippingMethod
@@ -986,11 +654,350 @@ paths:
data:
type: object
description: The data to update the payment session with.
'/customers/{id}/addresses':
post:
operationId: PostCustomersCustomerAddresses
summary: Add a Shipping Address
description: Adds a Shipping Address to a Customer's saved addresses.
parameters:
- in: path
name: id
required: true
description: The Customer id.
schema:
type: string
requestBody:
content:
application/json:
schema:
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.
parameters: []
tags:
- Customer
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
customer:
$ref: '#/components/schemas/customer'
requestBody:
content:
application/json:
schema:
type: object
required:
- email
- first_name
- last_name
- password
properties:
email:
type: string
description: The Customer's email address.
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 for login.
phone:
type: string
description: The Customer's phone number.
'/customers/{id}/addresses/{address_id}':
delete:
operationId: DeleteCustomersCustomerAddressesAddress
summary: Delete an Address
description: Removes an Address from the Customer's saved addresse.
parameters:
- in: path
name: id
required: true
description: The id of the Customer.
schema:
type: string
- 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.
parameters:
- in: path
name: id
required: true
description: The Customer id.
schema:
type: string
- in: path
name: address_id
required: true
description: The id of the Address to update.
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
address:
description: The updated Address.
anyOf:
- $ref: '#/components/schemas/address'
tags:
- Customer
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
customer:
$ref: '#/components/schemas/customer'
'/customers/{id}':
get:
operationId: GetCustomersCustomer
summary: Retrieves a Customer
description: >-
Retrieves a Customer - the Customer must be logged in to retrieve their
details.
parameters:
- in: path
name: id
required: true
description: The id of 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 Customer details
description: Updates a Customer's saved details.
parameters:
- in: path
name: id
required: true
description: The id of the Customer.
schema:
type: string
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
password:
description: The Customer's password.
type: string
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'
'/customers/{id}/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.
parameters:
- in: path
name: id
required: true
description: The id of the Customer.
schema:
type: string
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/{id}/orders':
get:
operationId: GetCustomersCustomerOrders
summary: Retrieve Customer Orders
description: Retrieves a list of a Customer's Orders.
parameters:
- in: path
name: id
required: true
description: The id of the Customer.
schema:
type: string
tags:
- Customer
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
payment_methods:
type: array
items:
$ref: '#/components/schemas/order'
'/customers/{id}/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.
parameters:
- in: path
name: id
required: true
description: The id of the Customer.
schema:
type: string
tags:
- Customer
responses:
'204':
description: OK
'/customers/{id}/reset-password':
post:
operationId: PostCustomersCustomerResetPassword
summary: Resets Customer password
description: >-
Resets a Customer's password using a password token created by a
previous /password-token request.
parameters:
- in: path
name: id
required: true
description: The id of the Customer.
schema:
type: string
tags:
- Customer
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
customer:
$ref: '#/components/schemas/customer'
requestBody:
content:
application/json:
schema:
type: object
required:
- email
- token
- password
properties:
email:
type: string
description: The Customer's email.
token:
type: string
description: The password token created by a /password-token request.
password:
type: string
description: The new password to set for the 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:
@@ -1140,6 +1147,47 @@ paths:
type: array
items:
$ref: '#/components/schemas/product'
'/return-reasons/{id}':
get:
operationId: GetReturnReasonsReason
summary: Retrieve a Return Reason
description: Retrieves a Return Reason.
parameters:
- in: path
name: id
required: true
description: The id of the Return Reason.
schema:
type: string
tags:
- Return Reason
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
return_reason:
$ref: '#/components/schemas/return_reason'
/return-reasons:
get:
operationId: GetReturnReasons
summary: List Return Reasons
description: Retrieves a list of Return Reasons.
tags:
- Return Reason
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
return_reasons:
type: array
items:
$ref: '#/components/schemas/return_reason'
'/regions/{id}':
get:
operationId: GetRegionsRegion
@@ -3183,6 +3231,47 @@ components:
recieved_quantity:
description: The quantity that was received in the warehouse.
type: integer
reason:
description: The reason for returning the item.
anyOf:
- $ref: '#/components/schemas/return_reason'
note:
description: An optional note with additional details about the Return.
type: string
metadata:
description: An optional key-value map with additional information.
type: object
return_reason:
title: Return Reason
description: >-
A Reason for why a given product is returned. A Return Reason can be
used on Return Items in order to indicate why a Line Item was returned.
x-resourceId: return_reason
properties:
id:
description: The id of the Return Reason will start with `rr_`.
type: string
description:
description: A description of the Reason.
type: string
label:
description: A text that can be displayed to the Customer as a reason.
type: string
value:
description: The value to identify the reason by.
type: string
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was last updated.
type: string
format: date-time
deleted_at:
description: The date with timezone at which the resource was deleted.
type: string
format: date-time
metadata:
description: An optional key-value map with additional information.
type: object