chore: remove legacy individual spec files

Replaced by comprehensive per-service openapi.yaml specs.
Old commerce/*.yaml and platform/*.yaml fragments are now
fully covered in commerce/openapi.yaml and platform/openapi.yaml.
This commit is contained in:
2026-02-21 13:45:20 -08:00
parent 1ddf949e51
commit ff464dde69
17 changed files with 0 additions and 3511 deletions
-29
View File
@@ -1,29 +0,0 @@
BSD License
Copyright (c) 2015-present, Hanzo, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name Hanzo nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-313
View File
@@ -1,313 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Cart API
description: ""
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
/cart:
post:
operationId: createCart
description: Creates a new Cart
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Cart'
responses:
'201':
description: ''
schema:
$ref: '#/definitions/Cart'
get:
operationId: retrieveAllCarts
description: >
Gets a list of all available carts.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/CartArray'
'/cart/{id}':
parameters:
- name: id
in: path
required: true
type: string
patch:
operationId: updateCart
description: >
Replaces a cart piecemeal. Parameters not passed are not updated.
parameters:
- name: token
in: query
required: false
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Cart'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Cart'
get:
operationId: getCart
description: >
Retrieves a specified cart
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Cart'
delete:
operationId: deleteCart
description: >
Permanently deletes a specified cart. Cannot be undone.
produces:
- text/html
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'204':
description: ''
schema:
type: object
properties: {}
examples:
application/json: null
put:
operationId: replaceCart
description: >
Wholly replaces a given cart. Parameters not passed are blanked.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Cart'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Cart'
'/cart/{id}/set':
parameters:
- name: id
in: path
required: true
type: string
post:
operationId: setCart
description: >
Sets a given quantity of a given product or variant to a cart.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Cart'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Cart'
'/cart/{id}/discard':
parameters:
- name: id
in: path
required: true
type: string
get:
operationId: discardCart
description: >
Marks a cart as discarded.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Cart'
definitions:
Cart:
title: Cart
type: object
properties:
id:
type: string
description: The hanzo-assigned guid to identify this item.
createdAt:
type: string
description: The time this Cart was created. Conforms to RFC3339.
updatedAt:
type: string
description: The time this Cart was last updated. Conforms to RFC3339.
userId:
type: string
description: The user ID that this Cart belings to.
email:
type: string
description: The email of the user (or someone else, if no user ID exists)
orderId:
type: string
description: The associated order ID (if one's created)
currency:
type: string
description: >
The three-digit identifier for the currency the payment
was made in. USD = United States Dollar, JPY = Japanese Yen, etc.
lineTotal:
type: integer
format: int64
description: >
Sum of line item amounts. Represented in the least significant
unit in the associated currency (so cent for USD, which has partial Dollars, but Yen
for JPY, which has no concept of partial Yen.)
discount:
type: integer
format: int64
description: >
Sum of any discounts applied. Represented in the least significant
unit in the associated currency (so cent for USD, which has partial Dollars, but Yen
for JPY, which has no concept of partial Yen.)
subtotal:
type: integer
format: int64
description: >
Line item totals, less discounts. Represented in the least significant
unit in the associated currency (so cent for USD, which has partial Dollars, but Yen
for JPY, which has no concept of partial Yen.)
shipping:
type: integer
format: int64
description: >
Shipping costs applied. Represented in the least significant
unit in the associated currency (so cent for USD, which has partial Dollars, but Yen
for JPY, which has no concept of partial Yen.)
tax:
type: integer
format: int64
description: >
Sales tax applied. Represented in the least significant
unit in the associated currency (so cent for USD, which has partial Dollars, but Yen
for JPY, which has no concept of partial Yen.)
total:
type: integer
format: int64
description: >
Subtotal + shipping + taxes + adjustments. Represented in the least significant
unit in the associated currency (so cent for USD, which has partial Dollars, but Yen
for JPY, which has no concept of partial Yen.)
company:
type: string
description: The company name associated with this cart.
billingAddress:
type: object
description: The location the charges are billed to.
shippingAddress:
type: object
description: The location any items are to be shipped to.
items:
type: array
description: Individual line items for the cart.
items:
type: object
coupons:
type: array
description: Individual coupons applied to the cart.
items:
type: object
gift:
type: boolean
description: Denotes whether or not the cart is for a gift purchase.
giftMessage:
type: string
description: The message to be used on a gift.
giftEmail:
type: string
description: The email to be used with a gift.
CartArray:
title: CartArray
description: An array of carts
type: array
items:
$ref: '#/definitions/Cart'
-112
View File
@@ -1,112 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Checkout API
description: >
The Checkout API enables you to quickly create a new order and capture payment in a single call.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
'/checkout/capture/{id}':
parameters:
- name: id
in: path
required: true
type: string
post:
operationId: capturePayment
description: >
Captures a specified order. Second step in the two-step payment process.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
type: object
properties:
orderId:
type: string
example:
orderId: 3NiN5emSwHRrAvlTlZgO
- name: Accept
in: header
type: string
- name: Content-Type
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Order'
/checkout/charge:
post:
operationId: chargePayment
description: >
Authorizes and charges an included order in a one-step process.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
- name: Content-Type
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Order'
/checkout/authorize:
post:
operationId: authorizePayment
description: >
Captures a specified order. First step in the two-step payment process.
parameters:
- name: token
in: query
required: false
type: string
- name: Content-Type
in: header
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Order'
-153
View File
@@ -1,153 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Collection API
description: >
A collection represents a set of Products designed to be sold together,
usually for some sort of discount or special deal. They can be used for
anything from clearance offers to ease-of-use upsells.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
'/collection/{id}':
parameters:
- name: id
in: path
required: true
type: string
patch:
operationId: updateCollection
description: >
Updates the Collection piecemeal. Parameters not included in the request are not updated.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Collection'
responses:
'200':
description: 'Everything is okay!'
schema:
$ref: '#/definitions/Collection'
delete:
operationId: deleteCollection
description: >
Deletes a Collection. Cannot be undone.
responses:
'200':
description: ''
get:
operationId: getCollection
description: >
Returns a given Collection.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Collection'
put:
operationId: replaceCollection
description: >
Entirely replaces the given Collection with what is passed.
Any unpassed parameters will be blanked.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Collection'
responses:
'200':
description: 'Everything is OK.'
schema:
$ref: '#/definitions/Collection'
/collection:
get:
operationId: retrieveAllCollections
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Collection'
post:
operationId: createCollection
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Collection'
responses:
'201':
description: ''
schema:
$ref: '#/definitions/Collection'
definitions:
Collection:
title: Collection
description: >
A Collection model, usable in POST, PUT, or PATCH requests,
and returned from GET, POST, PUT, and PATCH.
type: object
properties:
id:
type: string
description: The hanzo-assigned guid to identify this item.
createdAt:
type: string
description: The time this Variant was created. Conforms to RFC3339.
updatedAt:
type: string
description: The time this Variant was last updated. Conforms to RFC3339.
slug:
type: string
description: The human-readable unique identifier for use in URLs.
name:
type: string
description: A short name for the collection.
description:
type: string
description: The long-form description of what the collection is.
productIds:
type: string
description: A list of IDs relating to Products included in the Collection.
variantIds:
type: string
description: A list of IDs relating to Variants include in the Collection.
-50
View File
@@ -1,50 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Hanzo Commerce
description: >
Hanzo Commerce provides a set of APIs for building and managing ecommerce
stores and online sales.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
# 'x-headers':
# - key: Authorization
# value: SANDBOXTOKEN
'x-send-defaults': false
'x-explorer-enabled': false
'x-proxy-enabled': false
'x-samples-enabled': true
'x-samples-languages':
- curl
- node
- go
- java
- php
- python
- ruby
- swift
# See other .yaml files for full definition
-198
View File
@@ -1,198 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Coupon API
description: >
A Coupon represents a special offer attached to a code or certificate
that is redeemable in your store. This API supports everything from
flat and percentage discounts, free shipping vouchers, and even
one-time or limited redemption offers.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
/coupon:
get:
operationId: ReturnAllCoupons
description: >
Returns all available coupons.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/CouponArray'
post:
operationId: CreateCoupon
description: >
Creates a new coupon.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Coupon'
responses:
'201':
description: 'Everything is OK - new coupon created.'
schema:
$ref: '#/definitions/Coupon'
'/coupon/{id}':
parameters:
- name: id
in: path
required: true
type: string
put:
operationId: replaceCoupon
description: >
Wholly replaces the requested coupon. Any fields not provided are blanked.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Coupon'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Coupon'
patch:
operationId: updateCoupon
description: >
Replaces the requested coupon piecemeal. Any fields not provided are not changed.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Coupon'
responses:
'200':
description: 'Everything is OK'
schema:
$ref: '#/definitions/Coupon'
delete:
operationId: deleteCoupon
description: >
Deletes the specified coupon. Cannot be undone.
responses:
'204':
description: 'Everything is OK.'
schema:
type: object
properties: {}
get:
operationId: getCoupon
description: >
Returns the specified coupon.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Coupon'
definitions:
Coupon:
title: Coupon
type: object
properties:
id:
type: string
description: The hanzo-assigned guid to identify this item.
createdAt:
type: string
description: The time this Coupon was created. Conforms to RFC3339.
updatedAt:
type: string
description: The time this Coupon was last updated. Conforms to RFC3339.
name:
type: string
description: The human-friendly identifier for the coupon.
type:
type: string
description: The general class of Coupon, such as a discount, free shipping, etc.
code:
type: string
description: The unique key, preferably human friendly, that users will enter
to use the coupon on your store.
startDate:
type: string
description: The time the Coupon becomes valid. Conforms to RFC3339.
endDate:
type: string
description: The time the Coupon stops being valid. Conforms to RFC3339.
filter:
type: string
once:
type: boolean
description: A switch indicating whether this is a one-use coupon or not.
productId:
type: string
description: The hanzo-provided unique product ID that this coupon applies to.
enabled:
type: boolean
description: Whether or not the coupon is active.
amount:
type: integer
format: int64
description: The monetary value the coupon is good for. Represented in least
valuable denomination available (so cents for USD, yen for JPY, etc)
used:
type: integer
format: int64
description: How many times the coupon has been redeemed.
CouponArray:
title: CouponArray
description: An array of Coupons
type: array
items:
$ref: '#/definitions/Coupon'
-240
View File
@@ -1,240 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Discount API
description: >
A Discount represents a special offer attached to a code or certificate
that is redeemable in your store. This API supports everything from
flat and percentage discounts, free shipping vouchers, and even
one-time or limited redemption offers.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
/discount:
get:
operationId: ReturnAllDiscounts
description: >
Returns all available discounts.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/DiscountArray'
post:
operationId: CreateDiscount
description: >
Creates a new discount.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Discount'
responses:
'201':
description: 'Everything is OK - new discount created.'
schema:
$ref: '#/definitions/Discount'
'/discount/{id}':
parameters:
- name: id
in: path
required: true
type: string
put:
operationId: replaceDiscount
description: >
Wholly replaces the requested discount. Any fields not provided are blanked.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Discount'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Discount'
patch:
operationId: updateDiscount
description: >
Replaces the requested discount piecemeal. Any fields not provided are not changed.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Discount'
responses:
'200':
description: 'Everything is OK'
schema:
$ref: '#/definitions/Discount'
delete:
operationId: deleteDiscount
description: >
Deletes the specified discount. Cannot be undone.
responses:
'204':
description: 'Everything is OK.'
schema:
type: object
properties: {}
get:
operationId: getDiscount
description: >
Returns the specified discount.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Discount'
definitions:
Discount:
title: Discount
type: object
properties:
id:
type: string
description: The hanzo-assigned guid to identify this item.
createdAt:
type: string
description: The time this Discount was created. Conforms to RFC3339.
updatedAt:
type: string
description: The time this Discount was last updated. Conforms to RFC3339.
startDate:
type: string
description: The date the Discount begins being valid. Conforms to RFC3339.
endDate:
type: string
description: The date the Discount ceases being valid. Conforms to RFC3339.
scope:
$ref: '#/definitions/Scope'
target:
$ref: '#/definitions/Target'
type:
type: string
description: >
The general class of Discount: one of 'flat', 'percent', 'free-shipping',
'free-item', and 'bulk'.
enabled:
type: boolean
description: Whether or not the discount is active.
rules:
$ref: '#/definitions/RuleArray'
Scope:
title: Scope
description: How broadly a discount applies.
type: object
properties:
type:
type: string
description: The scope of the rules to qualify against.
storeId:
type: string
description: The store ID to scope to.
collectionId:
type: string
description: The collection ID to scope to.
productId:
type: string
description: The product ID to scope to.
variantId:
type: string
description: The variant ID to scope to.
Target:
title: Target
description: The intended object for the Discount.
type: object
properties:
type:
type: string
description: The scope of the rules to qualify against.
productId:
type: string
description: The product ID to scope to.
variantId:
type: string
description: The variant ID to scope to.
Rule:
title: Rule
description: Logic for this discount.
type: object
properties:
trigger:
type: string
description: >
The circumstances under which this rule activates. One of:
'price' or 'quantity'.
action:
type: string
description: What happens when this rule activates. Always 'discount'.
RuleArray:
title: RuleArray
description: An array of Rules
type: array
items:
$ref: '#/definitions/Rule'
DiscountArray:
title: DiscountArray
description: An array of Discounts
type: array
items:
$ref: '#/definitions/Discount'
-363
View File
@@ -1,363 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Order API
description: >
An Order represents a confirmed request for goods or services.
These are generally what a business wants a lot of to make money.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
'/order/{id}':
parameters:
- name: id
in: path
required: true
type: string
delete:
operationId: deleteOrder
description: >
Completely deletes the associated Order. Cannot be undone.
produces:
- text/html
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'204':
description: 'Everything is OK.'
schema:
type: object
properties: {}
examples:
application/json: null
get:
operationId: getOrder
description: >
Returns a specified order.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Order'
patch:
operationId: updateOrder
description: >
Updates the specified Order object piecemeal. Any fields not
included are not updated.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Order'
responses:
'200':
description: 'Everything is OK.'
schema:
$ref: '#/definitions/Order'
put:
operationId: replaceOrder
description: >
Wholly replaces the specified Order object in-place. Any fields not
included will be blanked.
responses:
'200':
description: 'Everything is OK.'
schema:
$ref: '#/definitions/Order'
/order:
post:
operationId: createOrder
description: >
Creates a new Order.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Order'
responses:
'201':
description: 'Everything is OK. New order created.'
schema:
$ref: '#/definitions/Order'
get:
operationId: retrieveOrder
description: Returns a list of all available orders.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/OrderArray'
'/order/{id}/refund':
parameters:
- name: id
in: path
required: true
type: string
post:
operationId: createOrderRefund
description: >
Issues a refund for the amount (specified in the POST body) to
the order specified by the given ID.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
type: object
properties:
id:
type: string
amount:
type: integer
example:
id: 0WizkeyjF2HwmEKFD1gJ
amount: 2400
- name: Accept
in: header
type: string
- name: Content-Type
in: header
type: string
responses:
'200':
description: 'Everything is OK.'
schema:
$ref: '#/definitions/Order'
'/order/{id}/payments':
parameters:
- name: id
in: path
required: true
type: string
get:
operationId: listOrderPayments
description: >
Retrieves payments on an order with the given ID.
responses:
'200':
description: ''
schema:
$ref: '#/definitions/PaymentArray'
'/order/{id}/capture':
parameters:
- name: id
in: path
required: true
type: string
post:
operationId: captureOrderPayment
description: >
Captures a pre-Authorized payment.
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Payment'
definitions:
Payment:
title: Payment
type: object
properties:
account:
type: object
currency:
type: string
description: >
The three-digit identifier for the currency the payment
was made in. USD = United States Dollar, JPY = Japanese Yen, etc.
chargeid:
type: string
description: The unique identiifer for the charge associated with the payment.
amount:
type: integer
format: int64
description: >
The specific quantity of money paid. Represented in the least significant
unit in the associated currency (so cent for USD, which has partial Dollars, but Yen
for JPY, which has no concept of partial Yen.)
amountrefunded:
type: integer
format: int64
description: >
The specific quantity of money refunded. Represented in the least significant
unit in the associated currency (so cent for USD, which has partial Dollars, but Yen
for JPY, which has no concept of partial Yen.)
status:
type: string
description: A marker describing the current state of the payment.
captured:
type: boolean
description: Whether or not the payment has been officially acquired.
live:
type: boolean
description: Whether or not the paymnet is a live one (false implies it's a test)
PaymentArray:
title: PaymentArray
description: An array of Payments
type: array
items:
$ref: '#/definitions/Payment'
Order:
title: Order
description: An Order model
type: object
properties:
createdAt:
type: string
description: The time this object was created. Conforms to RFCE3339.
updatedAt:
type: string
description: The time this object was last updated. Conforms to RFCE3339.
id:
type: string
description: The hanzo-assigned guid to identify this item.
userId:
type: string
description: The ID of the user responsible for creating this order.
shipping:
type: integer
format: int64
description: >
A monetary measure of shipping charges. Represented in the least
significant measure of the store's set currency (so cents for USD, yen for
JPY, etc).
tax:
type: integer
format: int64
description: >
A monetary measure of all taxes assessed on the order.
Represented in the least significant measure of the store's set
currency (so cents for USD, yen for JPY, etc).
subtotal:
type: integer
format: int64
description: >
A monetary measure of the order's line items, without any
extra charges such as shipping or tax. Represented in the least
significant measure of the store's set currency (so cents for
USD, yen for JPY, etc).
total:
type: integer
format: int64
description: >
A monetary measure of the order's grand total, including
extra charges such as shipping or tax. Represented in the least
significant measure of the store's set currency (so cents for
USD, yen for JPY, etc).
items:
$ref: '#/definitions/LineItemArray'
balance:
type: integer
format: int64
description: >
The amount currently due on this order. Represented in the least
significant measure of the store's set currency (so cents for
USD, yen for JPY, etc).
paid:
type: integer
format: int64
description: >
The amount that has been paid on this order. Represented
in the least significant measure of the store's setcurrency (so
cents for USD, yen for JPY, etc).
refunded:
type: integer
format: int64
description: >
The amount that has been refunded on this order.
Represented in the least significant measure of the store's
set currency (so cents for USD, yen for JPY, etc).
billingAddress:
type: object
description: The location the charges are billed to.
shippingAddress:
type: object
description: The location any items are to be shipped to.
discounts:
type: array
items:
type: string
description: >
A listing of non-payment adjustments that have
been applied to this order.
payments:
type: array
items:
type: object
description: A listing of charges collected for this order.
fulfillment:
type: object
description: Details on delivery of the order.
cancelled:
type: boolean
description: Whether or not the order has been cancelled.
shipped:
type: boolean
description: Whether or not the order has been shipped.
test:
type: boolean
description: Whether or not the order is a test.
OrderArray:
title: OrderArray
description: An array of Orders
type: array
items:
$ref: '#/definitions/Order'
-196
View File
@@ -1,196 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Product API
description: >
A product represents a specific offering in your store. Typically,
these are unique and distinct things or services; for closely related things
or services, consider using the Variant API.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
/product:
post:
operationId: createProduct
description: Creates a new product
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Product'
responses:
'201':
description: ''
schema:
$ref: '#/definitions/Product'
get:
operationId: getProduct
description: >
Gets a list of all available products.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/ProductArray'
'/product/{id}':
parameters:
- name: id
in: path
required: true
type: string
patch:
operationId: updateProduct
description: >
Replaces a product piecemeal. Parameters not passed are not updated.
parameters:
- name: token
in: query
required: false
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Product'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Product'
get:
operationId: retrieveProduct
description: >
Retrieves a specified product
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Product'
delete:
operationId: deleteProduct
description: >
Permanently deletes a specified product. Cannot be undone.
produces:
- text/html
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'204':
description: ''
schema:
type: object
properties: {}
examples:
application/json: null
put:
operationId: replaceProduct
description: >
Wholly replaces a given product. Parameters not passed are blanked.
parameters:
- name: token
in: query
required: false
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Product'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Product'
definitions:
Product:
title: Product
type: object
properties:
id:
type: string
description: The hanzo-assigned guid to identify this item.
createdAt:
type: string
description: The time this Product was created. Conforms to RFC3339.
updatedAt:
type: string
description: The time this Product was last updated. Conforms to RFC3339.
slug:
type: string
description: The human-readable URL extension for this product.
title:
type: string
description: The human-friendly banner for this product.
headline:
type: string
description: The tag line for this product.
excerpt:
type: string
description: A high visiblity selection.
description:
type: string
description: The long form depiction.
released:
type: string
description: The date this product was released. Conforms to RFC3339.
available:
type: boolean
description: Whether or not the product is able to be purchased.
ProductArray:
title: ProductArray
description: An array of Products
type: array
items:
$ref: '#/definitions/Product'
-434
View File
@@ -1,434 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Return API
description: >
An Return represents a confirmed request for goods or services.
These are generally what a business wants a lot of to make money.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
'/return/{id}':
parameters:
- name: id
in: path
required: true
type: string
delete:
operationId: deleteReturn
description: >
Completely deletes the associated Return. Cannot be undone.
produces:
- text/html
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'204':
description: 'Everything is OK.'
schema:
type: object
properties: {}
examples:
application/json: null
get:
operationId: getReturn
description: >
Returns a specified return.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Return'
patch:
operationId: updateReturn
description: >
Updates the specified Return object piecemeal. Any fields not
included are not updated.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Return'
responses:
'200':
description: 'Everything is OK.'
schema:
$ref: '#/definitions/Return'
put:
operationId: replaceReturn
description: >
Wholly replaces the specified Return object in-place. Any fields not
included will be blanked.
responses:
'200':
description: 'Everything is OK.'
schema:
$ref: '#/definitions/Return'
/return:
post:
operationId: createReturn
description: >
Creates a new Return.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Return'
responses:
'201':
description: 'Everything is OK. New return created.'
schema:
$ref: '#/definitions/Return'
get:
operationId: retrieveReturn
description: Returns a list of all available returns.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/ReturnArray'
definitions:
Return:
title: Return
description: An Return model
type: object
properties:
createdAt:
type: string
description: The time this object was created. Conforms to RFCE3339.
updatedAt:
type: string
description: The time this object was last updated. Conforms to RFCE3339.
id:
type: string
description: The hanzo-assigned guid to identify this item.
storeId:
type: string
description: The ID of the store affected by this return.
userId:
type: string
description: The ID of the user that initiated this return.
orderId:
type: string
description: The ID of the order affected by this return.
externalId:
type: string
description: The ID of the external resource affected by this return.
shipping:
type: integer
format: int64
description: >
A monetary measure of shipping charges. Represented in the least
significant measure of the store's set currency (so cents for USD, yen for
JPY, etc).
tax:
type: integer
format: int64
description: >
A monetary measure of all taxes assessed on the return.
Represented in the least significant measure of the store's set
currency (so cents for USD, yen for JPY, etc).
subtotal:
type: integer
format: int64
description: >
A monetary measure of the return's line items, without any
extra charges such as shipping or tax. Represented in the least
significant measure of the store's set currency (so cents for
USD, yen for JPY, etc).
total:
type: integer
format: int64
description: >
A monetary measure of the return's grand total, including
extra charges such as shipping or tax. Represented in the least
significant measure of the store's set currency (so cents for
USD, yen for JPY, etc).
items:
$ref: '#/definitions/LineItemArray'
fulfillment:
type: object
description: Details on delivery of the return.
cancelled:
type: boolean
description: Whether or not the return has been cancelled.
shipped:
type: boolean
description: Whether or not the return has been shipped.
test:
type: boolean
description: Whether or not the return is a test.
Fulfillment:
title: Fulfillment
description: Shipping and filling information for an order or return.
type: object
properties:
type:
type: string
description: >
The shipping integration used for this shipment. One of: 'shipwire',
'shipstation', 'manual'.
status:
type: string
description: >
The current state of the shipment. One of: 'pending', 'processed', 'cancelled',
'completed', 'delivered', 'returned', 'submitted', 'held', 'tracked'.
service:
type: string
description: The specific service used to move the item.
carrier:
type: string
description: The courier used to move the item.
pricing:
type: integer
description: The price levied to move the item.
pricingEstimate:
type: integer
description: The price esitmated to move the item.
createdAt:
type: string
description: The time this fulfillment request was created. Conforms to RFC3339.
updatedAt:
type: string
description: The time this fulfillment request was last updated. Conforms to RFC3339.
submittedAt:
type: string
description: The time this fulfillment request was submitted. Conforms to RFC3339.
processedAt:
type: string
description: The time this fulfillment request was processed. Conforms to RFC3339.
completedAt:
type: string
description: The time this fulfillment request was completed. Conforms to RFC3339.
expectedAt:
type: string
description: The time this fulfillment request was expected. Conforms to RFC3339.
cancelledAt:
type: string
description: The time this fulfillment request was cancelled. Conforms to RFC3339.
returnedAt:
type: string
description: The time this fulfillment request was cancelled. Conforms to RFC3339.
expectedSubmittedAt:
type: string
description: The time this fulfillment request is expected to be submitted. Conforms to RFC3339.
expectedCompletedAt:
type: string
description: The time this fulfillment request is expected to be completed. Conforms to RFC3339.
warehouseId:
type: string
description: An external identifier for the warehouse involved in the shipment.
warehouseRegion:
type: string
description: The geographic region the warehouse is located.
holds:
$ref: '#/definitions/HoldArray'
trackings:
$ref: '#/definitions/TrackingArray'
Hold:
title: Hold
description: A hold on a shipment.
type: object
properties:
type:
type: string
description: The external descriptor for the nature of the hold.
description:
type: string
description: The long form verbiage of the nature of the hold.
externalId:
type: string
description: The external ID that uniquely identifies the hold.
appliedAt:
type: string
description: The time the hold was applied. Conforms to RFC3339.
Tracking:
title: Tracking
description: An entry in the shipment's tracking history.
type: object
properties:
number:
type: string
description: The tracking number assigned by the courier.
externalId:
type: string
description: The external unique identifier for this tracking entry.
createdAt:
type: string
description: The time this entry was created. Conforms to RFC3339.
carrier:
type: string
description: The courier responsible for the tracking entry.
summary:
type: string
description: A brief description of the tracking entry's data.
summaryAt:
type: string
description: When the summary was submitted.
labelCreatedAt:
type: string
description: When the shipping label was created.
firstScanRegion:
type: string
description: What region first scan occurred in.
firstScanPostalCode:
type: string
description: The postal code the first scan occurred in.
firstScanAt:
type: string
description: The time the first scan occurred
deliveryCity:
type: string
description: The intended delivery city.
deliveryRegion:
type: string
description: The intended deivery region.
deliveryPostalCode:
type: string
description: The intended delivery postal code.
deliveryCountry:
type: string
description: The intended delivery country.
deliveredAt:
type: string
description: The time the delivery actually occurred.
LineItem:
title: LineItem
description: A specific line on a receipt.
type: object
properties:
collectionId:
type: string
description: A specific collection used on this line item.
productId:
type: string
description: A specific product's ID, as used on this line item.
productName:
type: string
description: A specific product's name, as used on this line item.
productSlug:
type: string
description: A specific product's slug, as used on this line item.
productSKU:
type: string
description: A specific product's SKU, as used on this line item.
variantId:
type: string
description: A specific variant's ID, as used on this line item.
variantName:
type: string
description: A specific variant's name, as used on this line item.
variantSlug:
type: string
description: A specific variant's slug, as used on this line item.
variantSKU:
type: string
description: A specific variant's SKU, as used on this line item.
price:
type: integer
description: >
How much this particular line costs, in terms of the currency
used by the parent return/order/whatever.
weight:
type: number
description: >
How much this line item weighs, in the unit provided on this same
line item.
weightUnit:
type: string
description: >
The unit of weight used by this line item. One of: 'Pound',
'Ounce', 'Kilogram', 'Gram'
taxable:
type: boolean
description: Whether or not taxes appy to this line item.
free:
type: boolean
description: >
Whether or not item should be considered free (after
discounts, coupons, etc).
addedBy:
type: string
description: The non-user party which added this item (coupon, etc).
LineItemArray:
title: LineItemArray
description: An array of Line Items
type: array
items:
$ref: '#/definitions/LineItem'
ReturnArray:
title: ReturnArray
description: An array of Returns
type: array
items:
$ref: '#/definitions/Return'
HoldArray:
title: HoldArray
description: An array of Holds
type: array
items:
$ref: '#/definitions/Hold'
TrackingArray:
title: TrackingArray
description: An array of Tracking entries
type: array
items:
$ref: '#/definitions/Tracking'
-179
View File
@@ -1,179 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Review API
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
/review:
get:
operationId: returnAllReviews
description: >
Returns all available reviews.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/ReviewArray'
post:
operationId: createReview
description: >
Creates a new review.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Review'
responses:
'201':
description: 'Everything is OK - new review created.'
schema:
$ref: '#/definitions/Review'
'/review/{id}':
parameters:
- name: id
in: path
required: true
type: string
put:
operationId: replaceReview
description: >
Wholly replaces the requested review. Any fields not provided are blanked.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Review'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Review'
patch:
operationId: updateReview
description: >
Replaces the requested review piecemeal. Any fields not provided are not changed.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Review'
responses:
'200':
description: 'Everything is OK'
schema:
$ref: '#/definitions/Review'
delete:
operationId: deleteReview
description: >
Deletes the specified review. Cannot be undone.
responses:
'204':
description: 'Everything is OK.'
schema:
type: object
properties: {}
get:
operationId: retrieveReview
description: >
Returns the specified review.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Review'
definitions:
Review:
title: Review
type: object
properties:
id:
type: string
description: The hanzo-assigned guid to identify this item.
createdAt:
type: string
description: The time this review was created. Conforms to RFC3339.
updatedAt:
type: string
description: The time this review was last updated. Conforms to RFC3339.
userId:
type: string
description: The user that created this review.
name:
type: string
description: The name of the review.
comment:
type: string
description: The review's text.
rating:
type: integer
description: The numeric rating attached to the review.
device:
type: string
description: The device the review was created on.
productId:
type: string
description: The hanzo-provided unique product ID that this review applies to.
variantId:
type: string
description: The hanzo-provided unique variant ID that this review applies to.
ReviewArray:
title: ReviewArray
description: An array of reviews
type: array
items:
$ref: '#/definitions/Review'
-359
View File
@@ -1,359 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Store API
description: >
A Store represents your sales presence on the Hanzo platform.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
'/store/{id}':
parameters:
- name: id
in: path
required: true
type: string
get:
operationId: retrieveStore
description: >
Returns a specific store.
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Store'
delete:
operationId: deleteStore
description: >
Permanently deletes a Store
produces:
- text/html
parameters:
- name: token
in: query
required: false
type: string
description: The unique identifier for the Store.
- name: Accept
in: header
required: false
type: string
responses:
'204':
description: 'Everything is OK.'
schema:
type: object
properties: {}
patch:
operationId: updateStore
description: >
Updates a store partially. Parameters not passed are not updated.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Store'
responses:
'200':
description: 'Everything is OK.'
schema:
$ref: '#/definitions/Store'
put:
operationId: replaceStore
description: >
Replaces the object wholly. Unpassed parameters are blanked.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Store'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Store'
'/store':
post:
operationId: createStore
description: >
Creates a new Store.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Store'
responses:
'201':
description: 'Everything is OK. New store created.'
schema:
$ref: '#/definitions/Store'
get:
operationId: retrieveAllStores
description: >
Returns a list of all available Stores.
parameters:
- name: token
in: query
type: string
- name: accept
in: header
type: string
responses:
'200':
description: 'Everything is OK.'
schema:
$ref: '#/definitions/StoreArray'
'/site/{siteid}/deploy':
parameters:
- name: siteid
in: path
required: true
type: string
post:
operationId: deploySite
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
type: object
properties:
siteId:
type: string
files:
type: object
properties:
index.html:
type: string
example:
siteId: 7lUOzwphlox9
files:
index.html: ca08d7cc98edaa9481224faba78eb80f2160ddea
- name: Content-Type
in: header
type: string
- name: Accept
in: header
type: string
responses:
'201':
description: ''
schema:
type: object
properties:
id:
type: string
siteId:
type: string
state:
type: string
required:
type: array
items:
type: string
deployUrl:
type: string
url:
type: string
createdAt:
type: string
updatedAt:
type: string
examples:
application/json:
id: 571073f5d6865d30969f33fa
siteId: 7lUOzwphlox9
state: uploading
required:
- ca08d7cc98edaa9481224faba78eb80f2160ddea
deployUrl: 'http://571073f5d6865d30969f33fa.site-02mg.hanzo.ai'
url: 'http://site-02mg.hanzo.ai'
createdAt: '2016-04-15T04:54:13Z'
updatedAt: '2016-04-15T04:54:13Z'
'/store/{id}/product/{key}':
parameters:
- name: id
in: path
required: true
type: string
- name: key
in: path
required: true
type: string
get:
operationId: retrieveStoreProduct
description: >
Gets a specific product that the store has access to.
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Product'
'/store/{id}/variant/{key}':
parameters:
- name: id
in: path
required: true
type: string
- name: key
in: path
required: true
type: string
get:
operationId: retrieveStoreVariant
description: >
Returns a specific Variant if it is accessible inside the store.
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Variant'
patch:
operationId: updateStoreVariant
description: >
Updates a variant the store has access to partially. Parameters
not included are ignored.
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Variant'
delete:
operationId: deleteStoreVariant
description: >
Deletes a variant the store has access to. Cannot be undone.
responses:
'204':
description: 'Everything is OK.'
schema:
type: object
properties: {}
put:
operationId: replaceStoreVariant
description: >
Wholly replaces a variant the store has access to. Parameters
not included are blanked.
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Variant'
definitions:
Variant:
title: Variant
description: >
A Variant model, usable in POST, PUT, or PATCH requests,
and returned as a response from GET, POST, PUT, and PATCH.
type: object
properties:
id:
type: string
description: The hanzo-assigned guid to identify this item.
productId:
type: string
description: >
The ID of the product this Variant is
associated with (or, a variant of).
sku:
type: string
description: >
The unique identifier for stock-keeping.
Can technically be whatever as long as it is unique,
but recommended to be the same as UPC if you have
one available for your product.
createdAt:
type: string
description: The time this Variant was created. Conforms to RFC3339.
updatedAt:
type: string
description: The time this Variant was last updated. Conforms to RFC3339.
price:
type: integer
format: int64
description: >
How much something costs, in the lowest
value unit available in the currency your store runs
in. USD stores will use cents, JPY stores will use yen, etc.
inventory:
type: integer
format: int64
description: The number of items on hand and ready for sale.
weight:
type: integer
format: int64
description: The mass of the item. Traditionally kept in grams.
dimensions:
type: string
description: >
The physical measurements of the item. Traditionally
kept in length x width x height and in centimeters.
options:
type: object
Store:
title: Store
type: object
properties:
id:
type: string
description: The hanzo-assigned guid to identify this item.
createdAt:
type: string
description: The time this Variant was created. Conforms to RFC3339.
updatedAt:
type: string
description: The time this Variant was last updated. Conforms to RFC3339.
name:
type: string
description: The human-friendly identifier for the store.
slug:
type: string
description: The human-readable identifier for the store, mostly used in URLs.
hostname:
type: string
description: The off-site host this store lives at.
currency:
type: string
description: The money denomination this store operates with.
StoreArray:
title: StoreArray
description: An array of Stores
type: array
items:
$ref: '#/definitions/Store'
-200
View File
@@ -1,200 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Variant API
description: >
A Variant represents a specific kind of Product. Typically,
they are used to represent a particular color, size, color/size
combination, etc.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
'/variant/{id}':
parameters:
- name: id
in: path
required: true
type: string
delete:
operationId: deleteVariant
description: >
Permanently deletes a Variant
produces:
- text/html
parameters:
- name: token
in: query
required: false
type: string
description: The unique identifier for the Variant.
- name: Accept
in: header
required: false
type: string
responses:
'204':
description: 'Everything is OK.'
schema:
type: object
properties: {}
patch:
operationId: updateVariant
description: >
Updates a variant partially. Parameters not passed are not updated.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Variant'
responses:
'200':
description: 'Everything is OK.'
schema:
$ref: '#/definitions/Variant'
put:
operationId: replaceVariant
description: >
Updates the object wholly. Unpassed parameters are blanked.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Variant'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Variant'
get:
operationId: retrieveVariant
description: >
Gets a specific Variant, keyed by ID.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Variant'
/variant:
post:
operationId: createVariant
description: >
Creates a new Variant.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Variant'
responses:
'201':
description: 'Everything is ok!'
schema:
$ref: '#/definitions/Variant'
get:
operationId: retrieveVariants
description: >
Returns a list of all available Variants.
parameters:
- name: token
in: query
type: string
- name: accept
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/VariantArray'
definitions:
Variant:
title: Variant
description: >
A Variant model, usable in POST, PUT, or PATCH requests,
and returned as a response from GET, POST, PUT, and PATCH.
type: object
properties:
id:
type: string
description: The hanzo-assigned guid to identify this item.
productId:
type: string
description: >
The ID of the product this Variant is
associated with (or, a variant of).
sku:
type: string
description: >
The unique identifier for stock-keeping.
Can technically be whatever as long as it is unique,
but recommended to be the same as UPC if you have
one available for your product.
createdAt:
type: string
description: The time this Variant was created. Conforms to RFC3339.
updatedAt:
type: string
description: The time this Variant was last updated. Conforms to RFC3339.
price:
type: integer
format: int64
description: >
How much something costs, in the lowest
value unit available in the currency your store runs
in. USD stores will use cents, JPY stores will use yen, etc.
inventory:
type: integer
format: int64
description: The number of items on hand and ready for sale.
weight:
type: integer
format: int64
description: The mass of the item. Traditionally kept in grams.
dimensions:
type: string
description: >
The physical measurements of the item. Traditionally
kept in length x width x height and in centimeters.
options:
type: object
VariantArray:
title: VariantArray
description: An array of Variants
type: array
items:
$ref: '#/definitions/Variant'
-183
View File
@@ -1,183 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Media API
description: >
Media are objects which represent some underlying audio or visual content.
Media can be referenced in products, variants and are automatically served
via our CDN backend.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
/media:
get:
operationId: listMedia
description: >
Returns a list of media.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/MediaArray'
post:
operationId: createMedia
description: >
Creates a new media.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Media'
responses:
'201':
description: 'Everything is OK - new media created.'
schema:
$ref: '#/definitions/Media'
'/media/{id}':
parameters:
- name: id
in: path
required: true
type: string
put:
operationId: replaceMedia
description: >
Wholly replaces the requested media. Any fields not provided are blanked.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Media'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Media'
patch:
operationId: updateMedia
description: >
Replaces the requested media piecemeal. Any fields not provided are not changed.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Media'
responses:
'200':
description: 'Everything is OK'
schema:
$ref: '#/definitions/Media'
delete:
operationId: deleteMedia
description: >
Deletes the specified media. Cannot be undone.
responses:
'204':
description: 'Everything is OK.'
schema:
type: object
properties: {}
get:
operationId: getMedia
description: >
Returns the specified media.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Media'
definitions:
Media:
title: Media
type: object
properties:
id:
type: string
description: The hanzo-assigned guid to identify this item.
createdAt:
type: string
description: The time this Media was created. Conforms to RFC3339.
updatedAt:
type: string
description: The time this Media was last updated. Conforms to RFC3339.
type:
type: string
description: The general classification of Media. One of 'image', 'video', 'webgl', 'audio', 'embed'.
alt:
type: string
description: The alt text description for this item.
url:
type: string
description: URL to media item
x:
type: string
description: Width of media item
y:
type: string
description: Height of media item
# usage:
# type: string
# description: The expected usage for this component. One of 'ad', 'product', 'unknown'.
productId:
type: string
description: The ID of the product this media depicts.
MediaArray:
title: MediaArray
description: An array of Media items
type: array
items:
$ref: '#/definitions/Media'
-272
View File
@@ -1,272 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Organization API
description: >
A Organization represents a business. Generally speaking, there's only
one of these per Hanzo account, representing the business subscribing
to Hanzo.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
'/organization/{id}':
parameters:
- name: id
in: path
required: true
type: string
get:
operationId: getOrganization
description: >
Returns the details of specified organization.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Organization'
patch:
operationId: updateOrganization
description: >
Updates the settings of a given organization. Any fields not included
are not updated.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Organization'
responses:
'200':
description: 'Everything is OK.'
schema:
$ref: '#/definitions/Organization'
put:
operationId: replaceOrganization
description: >
Replaces the settings of a given Organization. Any fields omitted will
be null or zeroed.
responses:
'200':
description: 'Everything is OK.'
schema:
$ref: '#/definitions/Organization'
/organization:
post:
operationId: createOrganization
description: >
Creates a new Organization.
parameters:
- name: body
in: body
schema:
$ref: '#/definitions/Organization'
responses:
'201':
description: 'New organization created.'
schema:
$ref: '#/definitions/Organization'
get:
operationId: listOrganizations
description: Returns a list of all available organizations.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/OrganizationArray'
'/organization/{id}/integrations':
parameters:
- name: id
in: path
required: true
type: string
get:
operationId: listOrganizationIntegrations
description: Returns a list of an organization's integrations.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: 'OK'
schema:
$ref: '#/definitions/IntegrationArray'
post:
operationId: createOrganizationIntegrations
description: Creates or replaces a list of an organization's integrations.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: 'OK'
schema:
$ref: '#/definitions/IntegrationArray'
'/organization/{id}/integrations/{integrationId}':
parameters:
- name: id
in: path
required: true
type: string
- name: integrationId
in: path
required: true
type: string
delete:
operationId: deleteOrganizationIntegration
description: Deletes a specific integration.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: 'OK'
schema:
$ref: '#/definitions/IntegrationArray'
definitions:
Organization:
title: Organization
type: object
properties:
createdAt:
type: string
description: The time this object was created. Conforms to RFCE3339.
updatedAt:
type: string
description: The time this object was last updated. Conforms to RFCE3339.
id:
type: string
description: The hanzo-assigned guid to identify this item.
name:
type: string
description: The business name.
owners:
type: array
description: An array of strings denoting the owners by user id.
items:
type: string
admins:
type: array
description: An array of strings denoting the admins by user id.
items:
type: string
moderators:
type: array
description: An array of strings denoting the moderators by user id.
items:
type: string
enabled:
type: boolean
description: Whether or not the organization is active.
billingEmail:
type: string
description: The email used for billing.
phone:
type: string
description: The phone number for the business.
address:
type: string
description: The address for the business.
website:
type: string
description: The website for the business.
country:
type: string
description: The business's host country.
Integration:
title: Integration
type: object
properties:
createdAt:
type: string
description: The time this object was created. Conforms to RFCE3339.
updatedAt:
type: string
description: The time this object was last updated. Conforms to RFCE3339.
id:
type: string
description: The hanzo-assigned ID of this integration.
enabled:
type: boolean
description: Whether or not this integration is enabled.
show:
type: boolean
description: Whether or not this integration should be shown.
type:
type: string
description: >
The general classification of an integration. One of
'analytics-custom', 'analytics-facebook-pixel',
'analytics-facebook-conversions', 'analytics-google-adwords',
'analytics-google-analytics', 'analytics-heap', 'analytics-sentry',
'bitcoin', 'ethereum', 'mailchimp', 'mandrill', 'netlify', 'reamaze',
'recaptcha', 'salesforce', 'shipwire', 'stripe'
IntegrationArray:
title: IntegrationArray
description: An array of Integrations
type: array
items:
$ref: '#/definitions/Integration'
OrganizationArray:
title: OrganizationArray
description: An array of Organizations
type: array
items:
$ref: '#/definitions/Organization'
-49
View File
@@ -1,49 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Hanzo Platform
description: >
Hanzo Platform provides a system of APIs that allow business infrastructure
build-outs.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
# 'x-headers':
# - key: Authorization
# value: SANDBOXTOKEN
'x-send-defaults': false
'x-explorer-enabled': false
'x-proxy-enabled': false
'x-samples-enabled': true
'x-samples-languages':
- curl
- node
- go
- java
- php
- python
- ruby
- swift
# See other .yaml files for full definition
-181
View File
@@ -1,181 +0,0 @@
swagger: '2.0'
info:
version: v1.0
title: Webhook API
description: >
A Webhook represents a custom callback to allow responsive programming
to specific event happening.
host: api.hanzo.ai
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.ai/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
/webhook:
get:
operationId: ReturnAllWebhooks
description: >
Returns all available webhooks.
parameters:
- name: token
in: query
type: string
- name: Accept
in: header
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/WebhookArray'
post:
operationId: CreateWebhook
description: >
Creates a new webhook.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Webhook'
responses:
'201':
description: 'Everything is OK - new webhook created.'
schema:
$ref: '#/definitions/Webhook'
'/webhook/{id}':
parameters:
- name: id
in: path
required: true
type: string
put:
operationId: replaceWebhook
description: >
Wholly replaces the requested webhook. Any fields not provided are blanked.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Webhook'
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Webhook'
patch:
operationId: updateWebhook
description: >
Replaces the requested webhook piecemeal. Any fields not provided are not changed.
parameters:
- name: token
in: query
type: string
- name: body
in: body
schema:
$ref: '#/definitions/Webhook'
responses:
'200':
description: 'Everything is OK'
schema:
$ref: '#/definitions/Webhook'
delete:
operationId: deleteWebhook
description: >
Deletes the specified webhook. Cannot be undone.
responses:
'204':
description: 'Everything is OK.'
schema:
type: object
properties: {}
get:
operationId: getWebhook
description: >
Returns the specified webhook.
parameters:
- name: token
in: query
required: false
type: string
- name: Accept
in: header
required: false
type: string
responses:
'200':
description: ''
schema:
$ref: '#/definitions/Webhook'
definitions:
Webhook:
title: Webhook
type: object
properties:
id:
type: string
description: The hanzo-assigned guid to identify this item.
createdAt:
type: string
description: The time this Webhook was created. Conforms to RFC3339.
updatedAt:
type: string
description: The time this Webhook was last updated. Conforms to RFC3339.
name:
type: string
description: The human-friendly identifier for the webhook.
url:
type: string
description: The endpoint to deliver events to.
live:
type: boolean
description: Whether to use live or test data.
all:
type: boolean
description: >
Whether to send all Events, or selectively send them using the Events
object.
accessToken:
type: string
description: A token to selectively check against.
events:
type: array
description: An array of strings mapped to booleans, describing which user events to send.
WebhookArray:
title: WebhookArray
description: An array of Webhooks
type: array
items:
$ref: '#/definitions/Webhook'