fix: merge api

This commit is contained in:
Sebastian Rindom
2021-03-15 08:28:53 +01:00
35 changed files with 5117 additions and 2358 deletions

View File

@@ -71,14 +71,14 @@
}
],
"paths": {
"/customers": {
"/auth": {
"post": {
"operationId": "PostCustomers",
"summary": "Create a Customer",
"description": "Creates a Customer.",
"operationId": "PostAuth",
"summary": "Authenticate a User",
"description": "Logs a User in and authorizes them to manage Store settings.",
"parameters": [],
"tags": [
"Customer"
"Auth"
],
"responses": {
"200": {
@@ -88,7 +88,7 @@
"schema": {
"properties": {
"customer": {
"$ref": "#/components/schemas/customer"
"$ref": "#/components/schemas/user"
}
}
}
@@ -103,25 +103,16 @@
"type": "object",
"required": [
"email",
"first_name",
"last_name"
"password"
],
"properties": {
"email": {
"type": "string",
"description": "The Customer's email address."
"description": "The User's email."
},
"first_name": {
"password": {
"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."
"description": "The User's password."
}
}
}
@@ -130,11 +121,11 @@
}
},
"get": {
"operationId": "GetCustomers",
"summary": "List Customers",
"description": "Retrieves a list of Customers.",
"operationId": "GetAuth",
"summary": "Get Session",
"description": "Gets the currently logged in User.",
"tags": [
"Customer"
"Auth"
],
"responses": {
"200": {
@@ -144,101 +135,7 @@
"schema": {
"properties": {
"customer": {
"$ref": "#/components/schemas/customer"
}
}
}
}
}
}
}
}
},
"/customers/{id}": {
"get": {
"operationId": "GetCustomersCustomer",
"summary": "Retrieve a Customer",
"description": "Retrieves a Customer.",
"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 a Customer",
"description": "Updates a Customer.",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Customer.",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"first_name": {
"type": "string",
"description": "The Customer's first name."
},
"last_name": {
"type": "string",
"description": "The Customer's last name."
},
"phone": {
"description": "The Customer's phone number.",
"type": "object"
}
}
}
}
}
},
"tags": [
"Customer"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"customer": {
"$ref": "#/components/schemas/customer"
"$ref": "#/components/schemas/user"
}
}
}
@@ -460,14 +357,14 @@
}
}
},
"/auth": {
"/customers": {
"post": {
"operationId": "PostAuth",
"summary": "Authenticate a User",
"description": "Logs a User in and authorizes them to manage Store settings.",
"operationId": "PostCustomers",
"summary": "Create a Customer",
"description": "Creates a Customer.",
"parameters": [],
"tags": [
"Auth"
"Customer"
],
"responses": {
"200": {
@@ -477,7 +374,7 @@
"schema": {
"properties": {
"customer": {
"$ref": "#/components/schemas/user"
"$ref": "#/components/schemas/customer"
}
}
}
@@ -492,16 +389,25 @@
"type": "object",
"required": [
"email",
"password"
"first_name",
"last_name"
],
"properties": {
"email": {
"type": "string",
"description": "The User's email."
"description": "The Customer's email address."
},
"password": {
"first_name": {
"type": "string",
"description": "The User's password."
"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."
}
}
}
@@ -510,11 +416,11 @@
}
},
"get": {
"operationId": "GetAuth",
"summary": "Get Session",
"description": "Gets the currently logged in User.",
"operationId": "GetCustomers",
"summary": "List Customers",
"description": "Retrieves a list of Customers.",
"tags": [
"Auth"
"Customer"
],
"responses": {
"200": {
@@ -524,7 +430,7 @@
"schema": {
"properties": {
"customer": {
"$ref": "#/components/schemas/user"
"$ref": "#/components/schemas/customer"
}
}
}
@@ -534,111 +440,24 @@
}
}
},
"/gift-cards": {
"post": {
"operationId": "PostGiftCards",
"summary": "Create a Gift Card",
"description": "Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"value": {
"type": "integer",
"description": "The value (excluding VAT) that the Gift Card should represent."
},
"is_disabled": {
"type": "boolean",
"description": "Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers."
},
"ends_at": {
"type": "string",
"format": "date-time",
"description": "The time at which the Gift Card should no longer be available."
},
"region_id": {
"description": "The id of the Region in which the Gift Card can be used.",
"type": "array",
"items": {
"type": "string"
}
},
"metadata": {
"description": "An optional set of key-value pairs to hold additional information.",
"type": "object"
}
}
}
}
}
},
"tags": [
"Gift Card"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"gift_card": {
"$ref": "#/components/schemas/gift_card"
}
}
}
}
}
}
}
},
"/customers/{id}": {
"get": {
"operationId": "GetGiftCards",
"summary": "List Gift Cards",
"description": "Retrieves a list of Gift Cards.",
"tags": [
"Gift Card"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"gift_cards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/gift_card"
}
}
}
}
}
}
}
}
}
},
"/gift-cards/{id}": {
"delete": {
"operationId": "DeleteGiftCardsGiftCard",
"summary": "Delete a Gift Card",
"description": "Deletes a Gift Card",
"operationId": "GetCustomersCustomer",
"summary": "Retrieve a Customer",
"description": "Retrieves a Customer.",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Gift Card to delete.",
"description": "The id of the Customer.",
"schema": {
"type": "string"
}
}
],
"tags": [
"Gift Card"
"Customer"
],
"responses": {
"200": {
@@ -647,51 +466,8 @@
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string",
"description": "The id of the deleted Gift Card"
},
"object": {
"type": "string",
"description": "The type of the object that was deleted."
},
"deleted": {
"type": "boolean"
}
}
}
}
}
}
}
},
"get": {
"operationId": "GetGiftCardsGiftCard",
"summary": "Retrieve a Gift Card",
"description": "Retrieves a Gift Card.",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Gift Card.",
"schema": {
"type": "string"
}
}
],
"tags": [
"Gift Card"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"gift_card": {
"$ref": "#/components/schemas/gift_card"
"customer": {
"$ref": "#/components/schemas/customer"
}
}
}
@@ -701,15 +477,15 @@
}
},
"post": {
"operationId": "PostGiftCardsGiftCard",
"summary": "Create a Gift Card",
"description": "Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region.",
"operationId": "PostCustomersCustomer",
"summary": "Update a Customer",
"description": "Updates a Customer.",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Gift Card.",
"description": "The id of the Customer.",
"schema": {
"type": "string"
}
@@ -720,28 +496,16 @@
"application/json": {
"schema": {
"properties": {
"balance": {
"type": "integer",
"description": "The value (excluding VAT) that the Gift Card should represent."
},
"is_disabled": {
"type": "boolean",
"description": "Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers."
},
"ends_at": {
"first_name": {
"type": "string",
"format": "date-time",
"description": "The time at which the Gift Card should no longer be available."
"description": "The Customer's first name."
},
"region_id": {
"description": "The id of the Region in which the Gift Card can be used.",
"type": "array",
"items": {
"type": "string"
}
"last_name": {
"type": "string",
"description": "The Customer's last name."
},
"metadata": {
"description": "An optional set of key-value pairs to hold additional information.",
"phone": {
"description": "The Customer's phone number.",
"type": "object"
}
}
@@ -750,7 +514,7 @@
}
},
"tags": [
"Gift Card"
"Customer"
],
"responses": {
"200": {
@@ -759,8 +523,8 @@
"application/json": {
"schema": {
"properties": {
"gift_card": {
"$ref": "#/components/schemas/gift_card"
"customer": {
"$ref": "#/components/schemas/customer"
}
}
}
@@ -1274,6 +1038,242 @@
}
}
},
"/gift-cards": {
"post": {
"operationId": "PostGiftCards",
"summary": "Create a Gift Card",
"description": "Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"value": {
"type": "integer",
"description": "The value (excluding VAT) that the Gift Card should represent."
},
"is_disabled": {
"type": "boolean",
"description": "Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers."
},
"ends_at": {
"type": "string",
"format": "date-time",
"description": "The time at which the Gift Card should no longer be available."
},
"region_id": {
"description": "The id of the Region in which the Gift Card can be used.",
"type": "array",
"items": {
"type": "string"
}
},
"metadata": {
"description": "An optional set of key-value pairs to hold additional information.",
"type": "object"
}
}
}
}
}
},
"tags": [
"Gift Card"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"gift_card": {
"$ref": "#/components/schemas/gift_card"
}
}
}
}
}
}
}
},
"get": {
"operationId": "GetGiftCards",
"summary": "List Gift Cards",
"description": "Retrieves a list of Gift Cards.",
"tags": [
"Gift Card"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"gift_cards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/gift_card"
}
}
}
}
}
}
}
}
}
},
"/gift-cards/{id}": {
"delete": {
"operationId": "DeleteGiftCardsGiftCard",
"summary": "Delete a Gift Card",
"description": "Deletes a Gift Card",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Gift Card to delete.",
"schema": {
"type": "string"
}
}
],
"tags": [
"Gift Card"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"id": {
"type": "string",
"description": "The id of the deleted Gift Card"
},
"object": {
"type": "string",
"description": "The type of the object that was deleted."
},
"deleted": {
"type": "boolean"
}
}
}
}
}
}
}
},
"get": {
"operationId": "GetGiftCardsGiftCard",
"summary": "Retrieve a Gift Card",
"description": "Retrieves a Gift Card.",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Gift Card.",
"schema": {
"type": "string"
}
}
],
"tags": [
"Gift Card"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"gift_card": {
"$ref": "#/components/schemas/gift_card"
}
}
}
}
}
}
}
},
"post": {
"operationId": "PostGiftCardsGiftCard",
"summary": "Create a Gift Card",
"description": "Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region.",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"description": "The id of the Gift Card.",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"balance": {
"type": "integer",
"description": "The value (excluding VAT) that the Gift Card should represent."
},
"is_disabled": {
"type": "boolean",
"description": "Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers."
},
"ends_at": {
"type": "string",
"format": "date-time",
"description": "The time at which the Gift Card should no longer be available."
},
"region_id": {
"description": "The id of the Region in which the Gift Card can be used.",
"type": "array",
"items": {
"type": "string"
}
},
"metadata": {
"description": "An optional set of key-value pairs to hold additional information.",
"type": "object"
}
}
}
}
}
},
"tags": [
"Gift Card"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"properties": {
"gift_card": {
"$ref": "#/components/schemas/gift_card"
}
}
}
}
}
}
}
}
},
"/notifications": {
"get": {
"operationId": "GetNotifications",
@@ -3915,35 +3915,6 @@
}
}
},
"/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",
@@ -4583,6 +4554,35 @@
}
}
},
"/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",

View File

@@ -695,6 +695,178 @@ paths:
properties:
discount:
$ref: '#/components/schemas/discount'
/gift-cards:
post:
operationId: PostGiftCards
summary: Create a Gift Card
description: >-
Creates a Gift Card that can redeemed by its unique code. The Gift Card
is only valid within 1 region.
requestBody:
content:
application/json:
schema:
properties:
value:
type: integer
description: >-
The value (excluding VAT) that the Gift Card should
represent.
is_disabled:
type: boolean
description: >-
Whether the Gift Card is disabled on creation. You will have
to enable it later to make it available to Customers.
ends_at:
type: string
format: date-time
description: >-
The time at which the Gift Card should no longer be
available.
region_id:
description: The id of the Region in which the Gift Card can be used.
type: array
items:
type: string
metadata:
description: >-
An optional set of key-value pairs to hold additional
information.
type: object
tags:
- Gift Card
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
gift_card:
$ref: '#/components/schemas/gift_card'
get:
operationId: GetGiftCards
summary: List Gift Cards
description: Retrieves a list of Gift Cards.
tags:
- Gift Card
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
gift_cards:
type: array
items:
$ref: '#/components/schemas/gift_card'
'/gift-cards/{id}':
delete:
operationId: DeleteGiftCardsGiftCard
summary: Delete a Gift Card
description: Deletes a Gift Card
parameters:
- in: path
name: id
required: true
description: The id of the Gift Card to delete.
schema:
type: string
tags:
- Gift Card
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
id:
type: string
description: The id of the deleted Gift Card
object:
type: string
description: The type of the object that was deleted.
deleted:
type: boolean
get:
operationId: GetGiftCardsGiftCard
summary: Retrieve a Gift Card
description: Retrieves a Gift Card.
parameters:
- in: path
name: id
required: true
description: The id of the Gift Card.
schema:
type: string
tags:
- Gift Card
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
gift_card:
$ref: '#/components/schemas/gift_card'
post:
operationId: PostGiftCardsGiftCard
summary: Create a Gift Card
description: >-
Creates a Gift Card that can redeemed by its unique code. The Gift Card
is only valid within 1 region.
parameters:
- in: path
name: id
required: true
description: The id of the Gift Card.
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
balance:
type: integer
description: >-
The value (excluding VAT) that the Gift Card should
represent.
is_disabled:
type: boolean
description: >-
Whether the Gift Card is disabled on creation. You will have
to enable it later to make it available to Customers.
ends_at:
type: string
format: date-time
description: >-
The time at which the Gift Card should no longer be
available.
region_id:
description: The id of the Region in which the Gift Card can be used.
type: array
items:
type: string
metadata:
description: >-
An optional set of key-value pairs to hold additional
information.
type: object
tags:
- Gift Card
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
gift_card:
$ref: '#/components/schemas/gift_card'
/notifications:
get:
operationId: GetNotifications
@@ -1662,178 +1834,6 @@ paths:
properties:
order:
$ref: '#/components/schemas/order'
/gift-cards:
post:
operationId: PostGiftCards
summary: Create a Gift Card
description: >-
Creates a Gift Card that can redeemed by its unique code. The Gift Card
is only valid within 1 region.
requestBody:
content:
application/json:
schema:
properties:
value:
type: integer
description: >-
The value (excluding VAT) that the Gift Card should
represent.
is_disabled:
type: boolean
description: >-
Whether the Gift Card is disabled on creation. You will have
to enable it later to make it available to Customers.
ends_at:
type: string
format: date-time
description: >-
The time at which the Gift Card should no longer be
available.
region_id:
description: The id of the Region in which the Gift Card can be used.
type: array
items:
type: string
metadata:
description: >-
An optional set of key-value pairs to hold additional
information.
type: object
tags:
- Gift Card
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
gift_card:
$ref: '#/components/schemas/gift_card'
get:
operationId: GetGiftCards
summary: List Gift Cards
description: Retrieves a list of Gift Cards.
tags:
- Gift Card
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
gift_cards:
type: array
items:
$ref: '#/components/schemas/gift_card'
'/gift-cards/{id}':
delete:
operationId: DeleteGiftCardsGiftCard
summary: Delete a Gift Card
description: Deletes a Gift Card
parameters:
- in: path
name: id
required: true
description: The id of the Gift Card to delete.
schema:
type: string
tags:
- Gift Card
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
id:
type: string
description: The id of the deleted Gift Card
object:
type: string
description: The type of the object that was deleted.
deleted:
type: boolean
get:
operationId: GetGiftCardsGiftCard
summary: Retrieve a Gift Card
description: Retrieves a Gift Card.
parameters:
- in: path
name: id
required: true
description: The id of the Gift Card.
schema:
type: string
tags:
- Gift Card
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
gift_card:
$ref: '#/components/schemas/gift_card'
post:
operationId: PostGiftCardsGiftCard
summary: Create a Gift Card
description: >-
Creates a Gift Card that can redeemed by its unique code. The Gift Card
is only valid within 1 region.
parameters:
- in: path
name: id
required: true
description: The id of the Gift Card.
schema:
type: string
requestBody:
content:
application/json:
schema:
properties:
balance:
type: integer
description: >-
The value (excluding VAT) that the Gift Card should
represent.
is_disabled:
type: boolean
description: >-
Whether the Gift Card is disabled on creation. You will have
to enable it later to make it available to Customers.
ends_at:
type: string
format: date-time
description: >-
The time at which the Gift Card should no longer be
available.
region_id:
description: The id of the Region in which the Gift Card can be used.
type: array
items:
type: string
metadata:
description: >-
An optional set of key-value pairs to hold additional
information.
type: object
tags:
- Gift Card
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
gift_card:
$ref: '#/components/schemas/gift_card'
'/products/{id}/options':
post:
operationId: PostProductsProductOptions
@@ -2739,6 +2739,24 @@ 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
@@ -3151,24 +3169,6 @@ paths:
properties:
region:
$ref: '#/components/schemas/region'
/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

View File

@@ -1,7 +1,7 @@
{
"resources": {
"customer": {
"id": "cus_01F0BGFY6ANPB473KJ5H8V889M",
"id": "cus_01F0K18KCA0FNCJHWYV7HYPENX",
"email": "test1@email.com",
"first_name": null,
"last_name": null,
@@ -10,21 +10,21 @@
"phone": null,
"has_account": false,
"orders": [],
"created_at": "2021-03-09T12:48:21.706Z",
"updated_at": "2021-03-09T12:48:21.706Z",
"created_at": "2021-03-12T10:56:08.074Z",
"updated_at": "2021-03-12T10:56:08.074Z",
"deleted_at": null,
"metadata": null
},
"order": {
"id": "order_01F0BGFG2Z0X0ETETP0YS0HRCT",
"id": "order_01F0K17W8Z3T61W1MHSQRRCKH4",
"status": "pending",
"fulfillment_status": "not_fulfilled",
"payment_status": "not_paid",
"display_id": 1,
"cart_id": null,
"customer_id": "cus_01F0BGFG280DRD18VXM1F9GJXA",
"customer_id": "cus_01F0K17W7MAHJX7WWJRM6TK5EY",
"customer": {
"id": "cus_01F0BGFG280DRD18VXM1F9GJXA",
"id": "cus_01F0K17W7MAHJX7WWJRM6TK5EY",
"email": "test@email.com",
"first_name": null,
"last_name": null,
@@ -32,14 +32,14 @@
"password_hash": null,
"phone": null,
"has_account": false,
"created_at": "2021-03-09T12:48:07.240Z",
"updated_at": "2021-03-09T12:48:07.240Z",
"created_at": "2021-03-12T10:55:44.372Z",
"updated_at": "2021-03-12T10:55:44.372Z",
"deleted_at": null,
"metadata": null
},
"email": "test@email.com",
"billing_address": {
"id": "addr_01F0BGFG30PG1NP6V0EDJDF6PW",
"id": "addr_01F0K17W8ZDQS2S1EX8A293RTZ",
"customer_id": null,
"company": null,
"first_name": "lebron",
@@ -51,13 +51,13 @@
"province": null,
"postal_code": null,
"phone": null,
"created_at": "2021-03-09T12:48:07.263Z",
"updated_at": "2021-03-09T12:48:07.263Z",
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"deleted_at": null,
"metadata": null
},
"shipping_address": {
"id": "addr_01F0BGFG30EBKX6C89N35YB2PX",
"id": "addr_01F0K17W8ZV35SS5XHM1RMA4BF",
"customer_id": null,
"company": null,
"first_name": "lebron",
@@ -69,22 +69,22 @@
"province": null,
"postal_code": null,
"phone": null,
"created_at": "2021-03-09T12:48:07.263Z",
"updated_at": "2021-03-09T12:48:07.263Z",
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"deleted_at": null,
"metadata": null
},
"region_id": "reg_01F0BGFG21NC3VQ662FYNF3P4Z",
"region_id": "reg_01F0K17W77HC1F9NB27M6R1AP0",
"region": {
"id": "reg_01F0BGFG21NC3VQ662FYNF3P4Z",
"id": "reg_01F0K17W77HC1F9NB27M6R1AP0",
"name": "Test Region",
"currency_code": "usd",
"tax_rate": "0",
"tax_code": null,
"payment_providers": [],
"fulfillment_providers": [],
"created_at": "2021-03-09T12:48:07.233Z",
"updated_at": "2021-03-09T12:48:07.233Z",
"created_at": "2021-03-12T10:55:44.359Z",
"updated_at": "2021-03-12T10:55:44.359Z",
"deleted_at": null,
"metadata": null
},
@@ -95,25 +95,25 @@
"id": "test-discount",
"code": "TEST134",
"is_dynamic": false,
"rule_id": "dru_01F0BGFG30S3FSBE67PKDCTT0Y",
"rule_id": "dru_01F0K17W8ZM2ZX3F1WSBHK7CGS",
"rule": {
"id": "dru_01F0BGFG30S3FSBE67PKDCTT0Y",
"id": "dru_01F0K17W8ZM2ZX3F1WSBHK7CGS",
"description": "Test Discount",
"type": "percentage",
"value": 10,
"allocation": "total",
"usage_limit": null,
"created_at": "2021-03-09T12:48:07.263Z",
"updated_at": "2021-03-09T12:48:07.263Z",
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"deleted_at": null,
"metadata": null
},
"is_disabled": false,
"parent_discount_id": null,
"starts_at": "2021-03-09T12:48:07.263Z",
"starts_at": "2021-03-12T10:55:44.415Z",
"ends_at": null,
"created_at": "2021-03-09T12:48:07.263Z",
"updated_at": "2021-03-09T12:48:07.263Z",
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"deleted_at": null,
"metadata": null
}
@@ -121,25 +121,25 @@
"gift_cards": [],
"shipping_methods": [
{
"id": "sm_01F0BGFG3SQZC01D8JP4REY0RF",
"shipping_option_id": "so_01F0BGFG2DV0GR6VD87AQ7XAB2",
"order_id": "order_01F0BGFG2Z0X0ETETP0YS0HRCT",
"id": "sm_01F0K17WA1GJXPNM9PZ5TCS2QV",
"shipping_option_id": "so_01F0K17W7VA316M9Y0PHBDCD9P",
"order_id": "order_01F0K17W8Z3T61W1MHSQRRCKH4",
"claim_order_id": null,
"cart_id": null,
"swap_id": null,
"return_id": null,
"shipping_option": {
"id": "so_01F0BGFG2DV0GR6VD87AQ7XAB2",
"id": "so_01F0K17W7VA316M9Y0PHBDCD9P",
"name": "test-option",
"region_id": "reg_01F0BGFG21NC3VQ662FYNF3P4Z",
"profile_id": "sp_01F0BGFG04GKTA9FTYWBT19NKJ",
"region_id": "reg_01F0K17W77HC1F9NB27M6R1AP0",
"profile_id": "sp_01F0K17W52ZB0BKW4S0QKQBSGC",
"provider_id": "test-ful",
"price_type": "flat_rate",
"amount": 1000,
"is_return": false,
"data": {},
"created_at": "2021-03-09T12:48:07.245Z",
"updated_at": "2021-03-09T12:48:07.245Z",
"created_at": "2021-03-12T10:55:44.379Z",
"updated_at": "2021-03-12T10:55:44.379Z",
"deleted_at": null,
"metadata": null
},
@@ -152,7 +152,7 @@
"id": "test-payment",
"swap_id": null,
"cart_id": null,
"order_id": "order_01F0BGFG2Z0X0ETETP0YS0HRCT",
"order_id": "order_01F0K17W8Z3T61W1MHSQRRCKH4",
"amount": 10000,
"currency_code": "usd",
"amount_refunded": 0,
@@ -160,8 +160,8 @@
"data": {},
"captured_at": null,
"canceled_at": null,
"created_at": "2021-03-09T12:48:07.263Z",
"updated_at": "2021-03-09T12:48:07.263Z",
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"metadata": null,
"idempotency_key": null
}
@@ -175,7 +175,7 @@
{
"id": "test-item",
"cart_id": null,
"order_id": "order_01F0BGFG2Z0X0ETETP0YS0HRCT",
"order_id": "order_01F0K17W8Z3T61W1MHSQRRCKH4",
"swap_id": null,
"claim_order_id": null,
"title": "Line Item",
@@ -192,16 +192,16 @@
"fulfilled_quantity": 1,
"returned_quantity": null,
"shipped_quantity": null,
"created_at": "2021-03-09T12:48:07.263Z",
"updated_at": "2021-03-09T12:48:07.263Z",
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"metadata": null,
"refundable": 7200
}
],
"gift_card_transactions": [],
"canceled_at": null,
"created_at": "2021-03-09T12:48:07.263Z",
"updated_at": "2021-03-09T12:48:07.263Z",
"created_at": "2021-03-12T10:55:44.415Z",
"updated_at": "2021-03-12T10:55:44.415Z",
"metadata": null,
"shipping_total": 1000,
"gift_card_total": 0,
@@ -213,7 +213,7 @@
"refundable_amount": 8200
},
"product": {
"id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM",
"id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"title": "Test product",
"subtitle": null,
"description": "test-product-description",
@@ -223,38 +223,38 @@
"thumbnail": null,
"options": [
{
"id": "opt_01F0BGG4N2W8EZJP5KDV0W2250",
"id": "opt_01F0K1814KYQSBS6ESDGGV703V",
"title": "size",
"product_id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM",
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"product_id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
{
"id": "opt_01F0BGG4N3Q09ME0BEZG6XZGFQ",
"id": "opt_01F0K1814MV2PBHXFVTHAD8KA8",
"title": "color",
"product_id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM",
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"product_id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
}
],
"variants": [
{
"id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT",
"id": "variant_01F0K1815DA13R050ETD3QE8CG",
"title": "Test variant",
"product_id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM",
"product_id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"product": {
"id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM",
"id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"title": "Test product",
"subtitle": null,
"description": "test-product-description",
"handle": "test-product",
"is_giftcard": false,
"thumbnail": null,
"profile_id": "sp_01F0BGG4J2RGH25WZVP8S6VNGW",
"profile_id": "sp_01F0K1810TK56G1RQFJJTN3ZCN",
"weight": null,
"length": null,
"height": null,
@@ -265,21 +265,21 @@
"material": null,
"collection_id": "test-collection",
"type_id": "test-type",
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
"prices": [
{
"id": "ma_01F0BGG4P5K0TCMD72MJFS0M65",
"id": "ma_01F0K1815N7BMYYVP6Z63VS49A",
"currency_code": "usd",
"amount": 100,
"sale_amount": null,
"variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"region_id": null,
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null
}
],
@@ -300,33 +300,33 @@
"width": null,
"options": [
{
"id": "optval_01F0BGG4NY1PRPV3FXQ3J66GQH",
"id": "optval_01F0K1815D5D7KMHJ4EF9HFMH2",
"value": "large",
"option_id": "opt_01F0BGG4N2W8EZJP5KDV0W2250",
"variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT",
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"option_id": "opt_01F0K1814KYQSBS6ESDGGV703V",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
{
"id": "optval_01F0BGG4NYTMFH5EXJ4C7QAKSK",
"id": "optval_01F0K1815EZ5KV8N3QB5AAAEED",
"value": "green",
"option_id": "opt_01F0BGG4N3Q09ME0BEZG6XZGFQ",
"variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT",
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"option_id": "opt_01F0K1814MV2PBHXFVTHAD8KA8",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
}
],
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
}
],
"profile_id": "sp_01F0BGG4J2RGH25WZVP8S6VNGW",
"profile_id": "sp_01F0K1810TK56G1RQFJJTN3ZCN",
"weight": null,
"length": null,
"height": null,
@@ -340,8 +340,8 @@
"id": "test-collection",
"title": "Test collection",
"handle": null,
"created_at": "2021-03-09T12:48:28.250Z",
"updated_at": "2021-03-09T12:48:28.250Z",
"created_at": "2021-03-12T10:55:49.309Z",
"updated_at": "2021-03-12T10:55:49.309Z",
"deleted_at": null,
"metadata": null
},
@@ -349,8 +349,8 @@
"type": {
"id": "test-type",
"value": "test-type",
"created_at": "2021-03-09T12:48:28.260Z",
"updated_at": "2021-03-09T12:48:28.260Z",
"created_at": "2021-03-12T10:55:49.332Z",
"updated_at": "2021-03-12T10:55:49.332Z",
"deleted_at": null,
"metadata": null
},
@@ -358,32 +358,32 @@
{
"id": "tag1",
"value": "123",
"created_at": "2021-03-09T12:48:28.257Z",
"updated_at": "2021-03-09T12:48:28.257Z",
"created_at": "2021-03-12T10:55:49.326Z",
"updated_at": "2021-03-12T10:55:49.326Z",
"deleted_at": null,
"metadata": null
},
{
"id": "ptag_01F0BGG4MRHZSMYN9Q1YQZHPWT",
"id": "ptag_01F0K1814933N3JKMQH1VYRY5P",
"value": "456",
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
}
],
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"metadata": null
},
"cart": {
"id": "cart_01F0BGFQA6ETNHS7QGEZD9VTF2",
"id": "cart_01F0K18Q13W272V5GVAKDEX36X",
"email": null,
"billing_address_id": null,
"billing_address": null,
"shipping_address_id": "addr_01F0BGFQA6YF81V6CREDHNCZMZ",
"shipping_address_id": "addr_01F0K18Q13X1YVRPS0QDP1CKEQ",
"shipping_address": {
"id": "addr_01F0BGFQA6YF81V6CREDHNCZMZ",
"id": "addr_01F0K18Q13X1YVRPS0QDP1CKEQ",
"customer_id": null,
"company": null,
"first_name": null,
@@ -395,8 +395,8 @@
"province": null,
"postal_code": null,
"phone": null,
"created_at": "2021-03-09T12:48:14.638Z",
"updated_at": "2021-03-09T12:48:14.638Z",
"created_at": "2021-03-12T10:56:11.787Z",
"updated_at": "2021-03-12T10:56:11.787Z",
"deleted_at": null,
"metadata": null
},
@@ -421,8 +421,8 @@
],
"payment_providers": [],
"fulfillment_providers": [],
"created_at": "2021-03-09T12:48:14.601Z",
"updated_at": "2021-03-09T12:48:14.601Z",
"created_at": "2021-03-12T10:56:11.763Z",
"updated_at": "2021-03-12T10:56:11.763Z",
"deleted_at": null,
"metadata": null
},
@@ -435,11 +435,15 @@
"shipping_methods": [],
"type": "default",
"completed_at": null,
"created_at": "2021-03-09T12:48:14.638Z",
"updated_at": "2021-03-09T12:48:14.777Z",
"created_at": "2021-03-12T10:56:11.787Z",
"updated_at": "2021-03-12T10:56:11.875Z",
"deleted_at": null,
"metadata": null,
"idempotency_key": null,
"context": {
"ip": "::ffff:127.0.0.1",
"user_agent": "axios/0.21.1"
},
"shipping_total": 0,
"discount_total": 0,
"tax_total": 0,
@@ -448,53 +452,53 @@
"total": 0
},
"product_collection": {
"id": "pcol_01F0BGG81W0FERCAHMR79J72G8",
"id": "pcol_01F0K18VNNBZ2PEC74BW6NEF7X",
"title": "Summer Collection",
"handle": "summer-collection",
"created_at": "2021-03-09T12:48:31.804Z",
"updated_at": "2021-03-09T12:48:31.804Z",
"created_at": "2021-03-12T10:56:16.564Z",
"updated_at": "2021-03-12T10:56:16.564Z",
"deleted_at": null,
"metadata": null
},
"discount": {
"id": "disc_01F0BGG1BJH91HJ7J9Q0NR0BR6",
"id": "disc_01F0K188KEVS1K6GZV087EF46E",
"code": "10DISC",
"is_dynamic": false,
"rule_id": "dru_01F0BGG1B3BCZ292BSRRK72JGS",
"rule_id": "dru_01F0K188JR04H4Z843MRMRC6SS",
"rule": {
"id": "dru_01F0BGG1B3BCZ292BSRRK72JGS",
"id": "dru_01F0K188JR04H4Z843MRMRC6SS",
"description": "10 Percent",
"type": "percentage",
"value": 10,
"allocation": "total",
"usage_limit": null,
"created_at": "2021-03-09T12:48:24.921Z",
"updated_at": "2021-03-09T12:48:24.921Z",
"created_at": "2021-03-12T10:55:57.004Z",
"updated_at": "2021-03-12T10:55:57.004Z",
"deleted_at": null,
"metadata": null
},
"is_disabled": false,
"parent_discount_id": null,
"starts_at": "2021-03-09T12:48:24.921Z",
"starts_at": "2021-03-12T10:55:57.004Z",
"ends_at": null,
"created_at": "2021-03-09T12:48:24.921Z",
"updated_at": "2021-03-09T12:48:24.921Z",
"created_at": "2021-03-12T10:55:57.004Z",
"updated_at": "2021-03-12T10:55:57.004Z",
"deleted_at": null,
"metadata": null
},
"product_variant": {
"id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT",
"id": "variant_01F0K1815DA13R050ETD3QE8CG",
"title": "Test variant",
"product_id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM",
"product_id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"product": {
"id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM",
"id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"title": "Test product",
"subtitle": null,
"description": "test-product-description",
"handle": "test-product",
"is_giftcard": false,
"thumbnail": null,
"profile_id": "sp_01F0BGG4J2RGH25WZVP8S6VNGW",
"profile_id": "sp_01F0K1810TK56G1RQFJJTN3ZCN",
"weight": null,
"length": null,
"height": null,
@@ -505,21 +509,21 @@
"material": null,
"collection_id": "test-collection",
"type_id": "test-type",
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
"prices": [
{
"id": "ma_01F0BGG4P5K0TCMD72MJFS0M65",
"id": "ma_01F0K1815N7BMYYVP6Z63VS49A",
"currency_code": "usd",
"amount": 100,
"sale_amount": null,
"variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"region_id": null,
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null
}
],
@@ -540,93 +544,93 @@
"width": null,
"options": [
{
"id": "optval_01F0BGG4NY1PRPV3FXQ3J66GQH",
"id": "optval_01F0K1815D5D7KMHJ4EF9HFMH2",
"value": "large",
"option_id": "opt_01F0BGG4N2W8EZJP5KDV0W2250",
"variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT",
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"option_id": "opt_01F0K1814KYQSBS6ESDGGV703V",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
{
"id": "optval_01F0BGG4NYTMFH5EXJ4C7QAKSK",
"id": "optval_01F0K1815EZ5KV8N3QB5AAAEED",
"value": "green",
"option_id": "opt_01F0BGG4N3Q09ME0BEZG6XZGFQ",
"variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT",
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"option_id": "opt_01F0K1814MV2PBHXFVTHAD8KA8",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
}
],
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
"product_option": {
"id": "opt_01F0BGG4N2W8EZJP5KDV0W2250",
"id": "opt_01F0K1814KYQSBS6ESDGGV703V",
"title": "size",
"product_id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM",
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"product_id": "prod_01F0K1814DVJA4WW8SQA4C2S21",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
"product_option_value": {
"id": "optval_01F0BGG4NY1PRPV3FXQ3J66GQH",
"id": "optval_01F0K1815D5D7KMHJ4EF9HFMH2",
"value": "large",
"option_id": "opt_01F0BGG4N2W8EZJP5KDV0W2250",
"variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT",
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"option_id": "opt_01F0K1814KYQSBS6ESDGGV703V",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null,
"metadata": null
},
"money_amount": {
"id": "ma_01F0BGG4P5K0TCMD72MJFS0M65",
"id": "ma_01F0K1815N7BMYYVP6Z63VS49A",
"currency_code": "usd",
"amount": 100,
"sale_amount": null,
"variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT",
"variant_id": "variant_01F0K1815DA13R050ETD3QE8CG",
"region_id": null,
"created_at": "2021-03-09T12:48:28.304Z",
"updated_at": "2021-03-09T12:48:28.304Z",
"created_at": "2021-03-12T10:55:49.379Z",
"updated_at": "2021-03-12T10:55:49.379Z",
"deleted_at": null
},
"gift_card": {
"id": "gift_01F0BF6H3XHRT2SF4Y05AM95B9",
"code": "HRYB-SMX4-XXQN-2SRL",
"id": "gift_01F0K18FQFN944SHCBRRK0844M",
"code": "O6UW-SZPS-GB62-Y3Q8",
"value": 1000,
"balance": 1000,
"region_id": "reg_01F0BF6H2MZ06R2G2ZGZCAX3NS",
"region_id": "reg_01F0K18FP7NA54BTMGDB75ABA7",
"region": {
"id": "reg_01F0BF6H2MZ06R2G2ZGZCAX3NS",
"id": "reg_01F0K18FP7NA54BTMGDB75ABA7",
"name": "Test Region",
"currency_code": "usd",
"tax_rate": "0",
"tax_code": null,
"payment_providers": [],
"fulfillment_providers": [],
"created_at": "2021-03-09T12:25:44.788Z",
"updated_at": "2021-03-09T12:25:44.788Z",
"created_at": "2021-03-12T10:56:04.295Z",
"updated_at": "2021-03-12T10:56:04.295Z",
"deleted_at": null,
"metadata": null
},
"is_disabled": false,
"ends_at": null,
"created_at": "2021-03-09T12:25:44.818Z",
"updated_at": "2021-03-09T12:25:44.818Z",
"created_at": "2021-03-12T10:56:04.324Z",
"updated_at": "2021-03-12T10:56:04.324Z",
"deleted_at": null,
"metadata": null
},
"shipping_option": {
"id": "so_01F0BGFTXZ6V3GAJHBKHNTR54H",
"id": "so_01F0K184VDZ5AXZXS05RCCNSJH",
"name": "Free Shipping",
"region_id": "reg_01F0BGFTW7J0DGWKJJP3X7AWP9",
"region_id": "reg_01F0K184SWFZH676GN3E59EHMN",
"region": {
"id": "reg_01F0BGFTW7J0DGWKJJP3X7AWP9",
"id": "reg_01F0K184SWFZH676GN3E59EHMN",
"name": "Test Region",
"currency_code": "usd",
"tax_rate": "0",
@@ -638,18 +642,18 @@
"is_installed": true
}
],
"created_at": "2021-03-09T12:48:18.311Z",
"updated_at": "2021-03-09T12:48:18.311Z",
"created_at": "2021-03-12T10:55:53.148Z",
"updated_at": "2021-03-12T10:55:53.148Z",
"deleted_at": null,
"metadata": null
},
"profile_id": "sp_01F0BGFTVGXRBATSDBZN5SK2JP",
"profile_id": "sp_01F0K184SAYPYPHCMVENN6V8KH",
"profile": {
"id": "sp_01F0BGFTVGXRBATSDBZN5SK2JP",
"id": "sp_01F0K184SAYPYPHCMVENN6V8KH",
"name": "Default Shipping Profile",
"type": "default",
"created_at": "2021-03-09T12:48:18.240Z",
"updated_at": "2021-03-09T12:48:18.240Z",
"created_at": "2021-03-12T10:55:53.081Z",
"updated_at": "2021-03-12T10:55:53.081Z",
"deleted_at": null,
"metadata": null
},
@@ -659,13 +663,13 @@
"is_return": false,
"requirements": [],
"data": {},
"created_at": "2021-03-09T12:48:18.354Z",
"updated_at": "2021-03-09T12:48:18.354Z",
"created_at": "2021-03-12T10:55:53.184Z",
"updated_at": "2021-03-12T10:55:53.184Z",
"deleted_at": null,
"metadata": null
},
"region": {
"id": "reg_01F0BGFTW7J0DGWKJJP3X7AWP9",
"id": "reg_01F0K184SWFZH676GN3E59EHMN",
"name": "Test Region",
"currency_code": "usd",
"tax_rate": "0",
@@ -677,17 +681,17 @@
"is_installed": true
}
],
"created_at": "2021-03-09T12:48:18.311Z",
"updated_at": "2021-03-09T12:48:18.311Z",
"created_at": "2021-03-12T10:55:53.148Z",
"updated_at": "2021-03-12T10:55:53.148Z",
"deleted_at": null,
"metadata": null
},
"return": {
"id": "ret_01F0BGFGGVWNV93E789K1DB2QK",
"id": "ret_01F0K17WQFXJ8R8HS0NFQGRWT2",
"status": "requested",
"items": [
{
"return_id": "ret_01F0BGFGGVWNV93E789K1DB2QK",
"return_id": "ret_01F0K17WQFXJ8R8HS0NFQGRWT2",
"item_id": "test-item",
"quantity": 1,
"is_requested": true,
@@ -698,36 +702,36 @@
],
"swap_id": null,
"claim_order_id": null,
"order_id": "order_01F0BGFGBMCTXE6CD7KCTZG5D1",
"order_id": "order_01F0K17WJC0F5K5G111Y53E641",
"shipping_method": null,
"shipping_data": null,
"refund_amount": 7200,
"received_at": null,
"created_at": "2021-03-09T12:48:07.680Z",
"updated_at": "2021-03-09T12:48:07.680Z",
"created_at": "2021-03-12T10:55:44.853Z",
"updated_at": "2021-03-12T10:55:44.853Z",
"metadata": null,
"idempotency_key": "abb55222-1d22-4852-9714-9b63baec3633"
"idempotency_key": "21d6d548-fd78-4ad7-831f-309930b69455"
},
"notification": {
"id": "noti_01F0BGFKZ7P3NC5V1PG10S75N0",
"id": "noti_01F0K18CB6ZS9N2NZYSCFMRY44",
"resource_type": "order",
"resource_id": "order_01F0BF66ZBXNJ98WDQ9SCWH8Y7",
"event_name": "order.placed",
"to": "test@email.com",
"provider_id": "test-not",
"created_at": "2021-03-09T12:48:11.238Z",
"updated_at": "2021-03-09T12:48:11.238Z",
"created_at": "2021-03-12T10:56:00.869Z",
"updated_at": "2021-03-12T10:56:00.869Z",
"resends": []
},
"discount_rule": {
"id": "dru_01F0BGG1B3BCZ292BSRRK72JGS",
"id": "dru_01F0K188JR04H4Z843MRMRC6SS",
"description": "10 Percent",
"type": "percentage",
"value": 10,
"allocation": "total",
"usage_limit": null,
"created_at": "2021-03-09T12:48:24.921Z",
"updated_at": "2021-03-09T12:48:24.921Z",
"created_at": "2021-03-12T10:55:57.004Z",
"updated_at": "2021-03-12T10:55:57.004Z",
"deleted_at": null,
"metadata": null
}

View File

@@ -75,130 +75,6 @@
}
],
"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",
@@ -341,6 +217,10 @@
}
}
}
},
"context": {
"description": "An optional object to provide context to the Cart. The `context` field is automatically populated with `ip` and `user_agent`",
"type": "object"
}
}
}
@@ -881,6 +761,10 @@
"customer_id": {
"description": "The id of the Customer to associate the Cart with.",
"type": "string"
},
"context": {
"description": "An optional object to provide context to the Cart.",
"type": "object"
}
}
}
@@ -1473,6 +1357,130 @@
}
}
},
"/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",
@@ -1499,6 +1507,9 @@
},
"balance": {
"description": "The current balanace of the Gift Card"
},
"region": {
"$ref": "#/components/schemas/region"
}
}
}
@@ -1706,6 +1717,84 @@
}
}
},
"/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",
@@ -1778,6 +1867,14 @@
"summary": "Retrieve Shipping Options",
"description": "Retrieves a list of Shipping Options.",
"parameters": [
{
"in": "query",
"name": "is_return",
"description": "Whether return Shipping Options should be included. By default all Shipping Options are returned.",
"schema": {
"type": "boolean"
}
},
{
"in": "query",
"name": "product_ids",
@@ -1971,84 +2068,6 @@
}
}
}
},
"/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"
}
}
}
}
}
}
}
}
}
}
},
"components": {

View File

@@ -121,6 +121,338 @@ 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
@@ -237,6 +569,12 @@ paths:
quantity:
description: The quantity of the Product Variant to add
type: integer
context:
description: >-
An optional object to provide context to the Cart. The
`context` field is automatically populated with `ip` and
`user_agent`
type: object
tags:
- Cart
responses:
@@ -594,6 +932,9 @@ paths:
customer_id:
description: The id of the Customer to associate the Cart with.
type: string
context:
description: An optional object to provide context to the Cart.
type: object
tags:
- Cart
responses:
@@ -667,388 +1008,8 @@ paths:
description: The original value of the Gift Card.
balance:
description: The current balanace of the Gift Card
'/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.
'/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'
region:
$ref: '#/components/schemas/region'
'/orders/cart/{cart_id}':
get:
operationId: GetOrdersOrderCartId
@@ -1129,44 +1090,20 @@ paths:
properties:
order:
$ref: '#/components/schemas/order'
/returns:
post:
operationId: PostReturns
summary: Create Return
description: Creates a Return for an Order.
requestBody:
content:
application/json:
schema:
properties:
order_id:
type: string
description: The id of the Order to create the Return from.
items:
description: The items to include in the Return.
type: array
items:
properties:
item_id:
description: The id of the Line Item from the Order.
type: string
quantity:
description: The quantity to return.
type: integer
return_shipping:
description: >-
If the Return is to be handled by the store operator the
Customer can choose a Return Shipping Method. Alternatvely
the Customer can handle the Return themselves.
type: object
properties:
option_id:
type: string
description: >-
The id of the Shipping Option to create the Shipping
Method from.
'/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:
- Return
- Product
responses:
'200':
description: OK
@@ -1174,8 +1111,35 @@ paths:
application/json:
schema:
properties:
return:
$ref: '#/components/schemas/return'
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
@@ -1226,12 +1190,66 @@ paths:
type: array
items:
$ref: '#/components/schemas/region'
/returns:
post:
operationId: PostReturns
summary: Create Return
description: Creates a Return for an Order.
requestBody:
content:
application/json:
schema:
properties:
order_id:
type: string
description: The id of the Order to create the Return from.
items:
description: The items to include in the Return.
type: array
items:
properties:
item_id:
description: The id of the Line Item from the Order.
type: string
quantity:
description: The quantity to return.
type: integer
return_shipping:
description: >-
If the Return is to be handled by the store operator the
Customer can choose a Return Shipping Method. Alternatvely
the Customer can handle the Return themselves.
type: object
properties:
option_id:
type: string
description: >-
The id of the Shipping Option to create the Shipping
Method from.
tags:
- Return
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
return:
$ref: '#/components/schemas/return'
/shipping-options:
get:
operationId: GetShippingOptions
summary: Retrieve Shipping Options
description: Retrieves a list of Shipping Options.
parameters:
- in: query
name: is_return
description: >-
Whether return Shipping Options should be included. By default all
Shipping Options are returned.
schema:
type: boolean
- in: query
name: product_ids
description: A comma separated list of Product ids to filter Shipping Options by.