__init__.py•67.1 kB
# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T04:06:11+00:00
from __future__ import annotations
from enum import Enum
from typing import List, Optional
from pydantic import AnyUrl, BaseModel, EmailStr, Field, RootModel
class AddProductCustomFieldFields(BaseModel):
id: Optional[int] = Field(
None,
description='Unique identifier of the ProductCustomField (custom_field_id)',
)
value: Optional[str] = Field(
None, description='The value for the ProductCustomField'
)
class AppFields(BaseModel):
author: Optional[str] = Field(None, description='Author of the app')
code: Optional[str] = Field(None, description='Code of the app')
description: Optional[str] = Field(None, description='Description of the app')
js: Optional[bool] = Field(False, description='True if the app is a jsapp')
name: Optional[str] = Field(None, description='Name of the app')
page: Optional[str] = Field(None, description='Page of the app')
class AttachmentEditFields(BaseModel):
filename: Optional[str] = Field(
None, description='Filename of the attachment (with file extensison)'
)
url: Optional[str] = Field(
None,
description='Public accessible URL with the desired file contents. (LIMIT: 100MB)',
)
class AttachmentFields(BaseModel):
id: Optional[int] = Field(None, description='Unique identifier of the attachment')
url: Optional[str] = Field(None, description='Private URL of the attachment')
class BadParams(BaseModel):
message: Optional[str] = None
class BestSold(BaseModel):
count: Optional[int] = Field(None, description='Quantity sold.')
product_id: Optional[int] = None
product_name: Optional[str] = None
total: Optional[float] = Field(None, description='Total sold amount.')
class BillingAddress(BaseModel):
address: Optional[str] = Field(
None, description="Address of the Customer's Billing Address"
)
city: Optional[str] = Field(
None, description="City of the Customer's Billing Address"
)
country: Optional[str] = Field(
None,
description="Country code of the Customer's Billing Address (ISO 3166-1 alpha-2)",
)
municipality: Optional[str] = Field(
None, description="Municipality of the Customer's Billing Address"
)
name: Optional[str] = Field(
None, description="Name of the Customer's Billing Address"
)
postal: Optional[str] = Field(
None, description="Postal code of the Customer's Billing Address"
)
region: Optional[str] = Field(
None,
description="Region code of the Customer's Billing Address (Use the FIPS standard - http://www.geonames.org/countries/)",
)
surname: Optional[str] = Field(
None, description="Surname of the Customer's Billing Address"
)
taxid: Optional[str] = Field(
None, description="Tax id of the Customer's Billing Address"
)
class CategoryEditFields(BaseModel):
name: Optional[str] = Field(None, description='Name of the Category')
parent_id: Optional[int] = Field(
None, description='Unique identifier of the Parent Category'
)
class CategoryFields(BaseModel):
id: Optional[int] = Field(None, description='Unique identifier of the Category')
name: Optional[str] = Field(None, description='Name of the Category')
parent_id: Optional[int] = Field(
None, description='Unique identifier of the Parent Category'
)
permalink: Optional[str] = Field(None, description='Category unique URL path')
class Area(Enum):
contact = 'contact'
billing_shipping = 'billing_shipping'
other = 'other'
class Type(Enum):
text = 'text'
select = 'select'
input = 'input'
checkbox = 'checkbox'
date = 'date'
class CheckoutCustomFieldEditFields(BaseModel):
area: Optional[Area] = Field(None, description='Area of the CheckoutCustomField')
custom_field_select_options: Optional[List[str]] = Field(
None, description='The values for the CheckoutCustomField selection'
)
deletable: Optional[bool] = Field(
False,
description='True if the CheckoutCustomField can be removed from the store',
)
label: Optional[str] = Field(
None, description='Label given to the CheckoutCustomField'
)
position: Optional[int] = Field(
None, description='Position of the CheckoutCustomField'
)
required: Optional[bool] = Field(
False, description='True if the CheckoutCustomField is mandatory'
)
type: Optional[Type] = Field(None, description='Type of the CheckoutCustomField')
class Type1(Enum):
text = 'text'
select = 'select'
input = 'input'
checkbox = 'checkbox'
class CheckoutCustomFieldFields(BaseModel):
area: Optional[Area] = Field(None, description='Area of the CheckoutCustomField')
custom_field_select_options: Optional[List[str]] = Field(
None, description='The values for the CheckoutCustomField selection'
)
deletable: Optional[bool] = Field(
False,
description='True if the CheckoutCustomField can be removed from the store',
)
id: Optional[int] = Field(
None, description='Unique identifier of the CheckoutCustomField'
)
label: Optional[str] = Field(
None, description='Label given to the CheckoutCustomField'
)
position: Optional[int] = Field(
None, description='Position of the CheckoutCustomField'
)
required: Optional[bool] = Field(
False, description='True if the CheckoutCustomField is mandatory'
)
type: Optional[Type1] = Field(None, description='Type of the CheckoutCustomField')
class Count(BaseModel):
count: Optional[int] = None
class Country(BaseModel):
code: Optional[str] = None
name: Optional[str] = None
class Type2(Enum):
text = 'text'
selection = 'selection'
input = 'input'
class CustomFieldEditFields(BaseModel):
label: Optional[str] = Field(None, description='Label given to the Custom Field')
type: Optional[Type2] = Field(None, description='Type of the Custom Field')
values: Optional[List[str]] = Field(
None,
description="All the possible Values of the Custom Field (for type 'selection')",
)
class CustomFieldFields(BaseModel):
id: Optional[int] = Field(None, description='Unique identifier of the Custom Field')
label: Optional[str] = Field(None, description='Label given to the Custom Field')
type: Optional[Type2] = Field(None, description='Type of the Custom Field')
values: Optional[List[str]] = Field(
None,
description="All the possible Values of the Custom Field (for type 'selection')",
)
class CustomFieldSelectOptionEditFields(BaseModel):
value: Optional[str] = Field(
None, description='Value given to the Custom Field Select Option'
)
class CustomFieldSelectOptionFields(BaseModel):
id: Optional[int] = Field(
None, description='Unique identifier of the Custom Field Select Option'
)
value: Optional[str] = Field(
None, description='Value given to the Custom Field Select Option'
)
class CustomerAdditionalFieldEditFields(BaseModel):
checkout_custom_field_id: Optional[int] = Field(
None, description='Unique identifier of the Checkout Custom Field'
)
value: Optional[str] = Field(
None, description='Value of the Customer Additional Field'
)
class CustomerAdditionalFieldFields(BaseModel):
area: Optional[str] = Field(
None, description='Area of the Customer Additional Field'
)
checkout_custom_field_id: Optional[int] = Field(
None, description='Unique identifier of the Checkout Custom Field'
)
customer_id: Optional[int] = Field(
None, description='Unique identifier of the Customer'
)
id: Optional[int] = Field(
None, description='Unique identifier of the Customer Additional Field'
)
label: Optional[str] = Field(
None, description='Label of the Customer Additional Field'
)
value: Optional[str] = Field(
None, description='Value of the Customer Additional Field'
)
class CustomerCategoryEditFields(BaseModel):
name: Optional[str] = Field(None, description='Name of the CustomerCategory')
class CustomerCategoryFields(BaseModel):
code: Optional[str] = Field(None, description='Code of the CustomerCategory')
id: Optional[int] = Field(
None, description='Unique identifier of the CustomerCategory'
)
name: Optional[str] = Field(None, description='Name of the CustomerCategory')
class Status(Enum):
approved = 'approved'
pending = 'pending'
disabled = 'disabled'
class CustomerToCustomerCategory(BaseModel):
email: Optional[str] = Field(None, description='Email of the Customer')
id: Optional[int] = Field(None, description='Unique identifier of the Customer')
class CustomersToCustomerCategory(BaseModel):
customers: Optional[List[CustomerToCustomerCategory]] = None
class DailyVisits(BaseModel):
date: Optional[str] = None
visits: Optional[int] = None
class DigitalProductEditFields(BaseModel):
filename: Optional[str] = Field(
None, description='Filename of the digital product (with file extensison)'
)
url: Optional[str] = Field(
None,
description='Public accessible URL with the desired file contents. (LIMIT: 100MB)',
)
class DigitalProductFields(BaseModel):
expiration_seconds: Optional[int] = Field(
None, description='Time left in seconds before the current private URL expires'
)
id: Optional[int] = Field(
None, description='Unique identifier of the digital product'
)
url: Optional[str] = Field(None, description='Private URL of the digital product')
class ShipmentStatus(Enum):
requested = 'requested'
in_transit = 'in_transit'
delivered = 'delivered'
failed = 'failed'
class Type4(Enum):
manual = 'manual'
shipit = 'shipit'
chilexpress = 'chilexpress'
ctt = 'ctt'
correos_chile = 'correos_chile'
dhl = 'dhl'
servientrega = 'servientrega'
starken = 'starken'
bluexpress = 'bluexpress'
class FulfillmentCreateFields(BaseModel):
expected_arrival_from: Optional[str] = Field(
None,
description='First date expected for the fulfillment to arrive at customer place',
)
expected_arrival_to: Optional[str] = Field(
None,
description='Last date expected for the fulfillment to arrive at customer place',
)
external_id: Optional[str] = Field(
None,
description='Unique identifier of the Fulfillment used by the tracking company',
)
order_id: Optional[str] = Field(
None, description='Order associated with the fulfillment'
)
service_type: Optional[str] = Field(
None, description='Type of Service requested to the tracking company'
)
shipment_status: Optional[ShipmentStatus] = Field(
None, description='Status of the Fulfillment'
)
tracking_company: Optional[str] = Field(
None, description='Tracking company responsible for the fulfillment'
)
tracking_number: Optional[str] = Field(
None, description='Tracking Number associated with the fulfillment'
)
type: Optional[Type4] = Field(None, description='Type of fulfillment Service used')
class FulfillmentEditFields(BaseModel):
expected_arrival_from: Optional[str] = Field(
None,
description='First date expected for the fulfillment to arrive at customer place',
)
expected_arrival_to: Optional[str] = Field(
None,
description='Last date expected for the fulfillment to arrive at customer place',
)
external_id: Optional[str] = Field(
None,
description='Unique identifier of the Fulfillment used by the tracking company',
)
order_id: Optional[str] = Field(
None, description='Order associated with the fulfillment'
)
service_type: Optional[str] = Field(
None, description='Type of Service requested to the tracking company'
)
shipment_status: Optional[ShipmentStatus] = Field(
None, description='Status of the Fulfillment'
)
tracking_company: Optional[str] = Field(
None, description='Tracking company responsible for the fulfillment'
)
tracking_number: Optional[str] = Field(
None, description='Tracking Number associated with the fulfillment'
)
type: Optional[Type4] = Field(None, description='Type of fulfillment Service used')
class FulfillmentFields(BaseModel):
external_id: Optional[str] = Field(
None,
description='Unique identifier of the Fulfillment used by the tracking company',
)
id: Optional[int] = Field(None, description='Unique identifier of the Fulfillment')
order_id: Optional[str] = Field(
None, description='Order associated with the fulfillment'
)
service_type: Optional[str] = Field(
None, description='Type of Service requested to the tracking company'
)
shipment_status: Optional[str] = Field(
None, description='Status of the fulfillment'
)
tracking_company: Optional[str] = Field(
None, description='Tracking company responsible for the fulfillment'
)
tracking_number: Optional[str] = Field(
None, description='Tracking Number associated with the fulfillment'
)
type: Optional[str] = Field(None, description='Type of fulfillment Service used')
class Event(Enum):
order_updated = 'order_updated'
order_pending_payment = 'order_pending_payment'
order_paid = 'order_paid'
order_shipped = 'order_shipped'
order_canceled = 'order_canceled'
order_abandoned = 'order_abandoned'
product_created = 'product_created'
product_updated = 'product_updated'
product_deleted = 'product_deleted'
customer_created = 'customer_created'
customer_updated = 'customer_updated'
customer_deleted = 'customer_deleted'
class HookEditFields(BaseModel):
event: Event = Field(..., description='Event associated with Hook')
url: str = Field(..., description='Hook URL to be notified')
class HookFields(BaseModel):
created_at: Optional[str] = Field(None, description='Hook creation date')
event: Optional[str] = Field(None, description='Event associated with Hook')
id: Optional[int] = Field(None, description='Unique identifier of the Hook')
name: Optional[str] = Field(None, description='Hook name')
url: Optional[str] = Field(None, description='Hook URL to be notified')
class Id(BaseModel):
id: Optional[int] = None
class ImageEditFields(BaseModel):
url: Optional[str] = Field(None, description='Complete URL of the image')
class ImageFields(BaseModel):
id: Optional[int] = Field(None, description='Unique identifier of the image')
position: Optional[int] = Field(None, description='Position of the image')
url: Optional[str] = Field(None, description='Complete URL of the image')
class JSApp(BaseModel):
element: Optional[str] = Field(
None, description='Element of Template to inject HTML'
)
template: Optional[str] = Field(
None, description='Template of Store Theme to inject HTML'
)
url: Optional[str] = Field(None, description='Url of the HTML to inject')
class JSAppEdit(BaseModel):
app: Optional[JSApp] = None
class Language(BaseModel):
code: Optional[str] = None
name: Optional[str] = None
class MessageObject(BaseModel):
message: Optional[str] = None
class Store(BaseModel):
code: Optional[str] = Field(None, description='New Store code.')
email_partner: Optional[EmailStr] = Field(None, description='Partner email.')
name: Optional[str] = Field(None, description='New Store name.')
redirect_url: Optional[AnyUrl] = Field(None, description='New Store redirect url.')
class NewPartnerStore(BaseModel):
store: Optional[Store] = None
class NewVsReturning(BaseModel):
date: Optional[str] = None
new: Optional[int] = None
returning: Optional[int] = None
class NotFound(BaseModel):
message: Optional[str] = None
class OrderAdditionalFields(BaseModel):
label: Optional[str] = Field(None, description='Label of the additional field')
value: Optional[str] = Field(None, description='Value of the additional field')
class OrderBillingAddress(BaseModel):
address: Optional[str] = Field(
None, description="Address of the Order's Billing Address"
)
city: Optional[str] = Field(None, description="City of the Order's Billing Address")
country: Optional[str] = Field(
None,
description="Country code of the Order's Billing Address (ISO 3166-1 alpha-2)",
)
country_name: Optional[str] = Field(
None, description="Country name of the Order's Billing Address"
)
municipality: Optional[str] = Field(
None, description="Municipality of the Order's Billing Address"
)
name: Optional[str] = Field(None, description="Name of the Order's Billing Address")
postal: Optional[str] = Field(
None, description="Postal code of the Order's Billing Address"
)
region: Optional[str] = Field(
None,
description="Region code of the Order's Billing Address (Use the FIPS standard - http://www.geonames.org/countries/)",
)
street_number: Optional[float] = Field(
None, description="Street number of the Order's Billing Address"
)
surname: Optional[str] = Field(
None, description="Surname of the Order's Billing Address"
)
class Status3(Enum):
Abandoned = 'Abandoned'
Canceled = 'Canceled'
Pending_Payment = 'Pending Payment'
Paid = 'Paid'
class ShipmentStatus2(Enum):
requested = 'requested'
in_transit = 'in_transit'
delivered = 'delivered'
failed = 'failed'
pickup_available = 'pickup_available'
class OrderEditFields(BaseModel):
additional_fields: Optional[List[OrderAdditionalFields]] = Field(
None, description='Array of additional fields for the given Order'
)
additional_information: Optional[str] = Field(
None, description='Additional information for the given Order'
)
shipment_status: Optional[ShipmentStatus2] = Field(
None, description='Status of the Order Shipping'
)
status: Optional[Status3] = Field(None, description='Status of the Order')
tracking_company: Optional[str] = Field(
None, description='Shipping Company used for the given Order'
)
tracking_number: Optional[str] = Field(
None, description='Shipping Tracking Number used for the given Order'
)
tracking_url: Optional[str] = Field(
None, description='URL to check delivery information for the given Order'
)
class ShipmentStatus3(Enum):
delivered = 'delivered'
requested = 'requested'
in_transit = 'in_transit'
failed = 'failed'
pickup_available = 'pickup_available'
class ShippingOption(Enum):
delivery = 'delivery'
store_pickup = 'store_pickup'
no_shipping = 'no_shipping'
class OrderHistoryEditFields(BaseModel):
message: Optional[str] = Field(None, description='Message of the Order History')
class OrderHistoryFields(BaseModel):
created_at: Optional[str] = Field(
None, description='Creation date of the order history'
)
id: Optional[int] = Field(
None, description='Unique identifier of the Order History'
)
message: Optional[str] = Field(None, description='Message of the Order History')
class OrderProductOrderCreate(BaseModel):
discount: Optional[float] = Field(None, description='Discount of the Order Product')
id: Optional[int] = Field(
None, description='Unique identifier of the original Product'
)
price: Optional[float] = Field(None, description='Price of the Order Product')
qty: Optional[int] = Field(None, description='Price of the Order Product')
variant_id: Optional[int] = Field(
None, description='Unique identifier of the original Product Variant'
)
class OrderProductTax(BaseModel):
fixed: Optional[bool] = Field(
False, description='False if rate is a percentage and true if rate is monetary'
)
id: Optional[int] = Field(
None, description='Unique identifier of the Order Product Tax'
)
name: Optional[str] = Field(
None,
description='Name of the category that the tax is associated with or the tax name',
)
rate: Optional[float] = Field(None, description='Tax rate')
tax_on_product_price: Optional[bool] = Field(
False, description='False if tax is not included on product price'
)
class OrderShippingAddress(BaseModel):
address: Optional[str] = Field(
None, description="Address of the Order's Shipping Address"
)
city: Optional[str] = Field(
None, description="City of the Order's Shipping Address"
)
country: Optional[str] = Field(
None,
description="Country code of the Order's Shipping Address (ISO 3166-1 alpha-2)",
)
country_name: Optional[str] = Field(
None, description="Country name of the Order's Shipping Address"
)
latitude: Optional[float] = Field(
None, description="Latitude of the Order's Shipping Address"
)
longitude: Optional[float] = Field(
None, description="Longitude of the Order's Shipping Address"
)
municipality: Optional[str] = Field(
None, description="Municipality of the Order's Shipping Address"
)
name: Optional[str] = Field(
None, description="Name of the Order's Shipping Address"
)
postal: Optional[str] = Field(
None, description="Postal code of the Order's Shipping Address"
)
region: Optional[str] = Field(
None,
description="Region code of the Order's Shipping Address (Use the FIPS standard - http://www.geonames.org/countries/)",
)
street_number: Optional[float] = Field(
None, description="Street number of the Order's Shipping Address"
)
surname: Optional[str] = Field(
None, description="Surname of the Order's Shipping Address"
)
class OrderShippingTax(BaseModel):
country: Optional[str] = Field(None, description='Code of the associated country')
fixed: Optional[bool] = Field(
False, description='False if rate is a percentage and true if rate is monetary'
)
id: Optional[int] = Field(
None, description='Unique identifier of the Order Shipping Tax'
)
name: Optional[str] = Field(None, description='Tax name')
rate: Optional[float] = Field(None, description='Tax rate')
region: Optional[str] = Field(None, description='Code of the associated region')
tax_on_shipping_price: Optional[bool] = Field(
False, description='False if shipping tax is not included on shipping price'
)
class OrdersData(BaseModel):
average: Optional[float] = None
count: Optional[float] = None
date: Optional[str] = None
paid: Optional[float] = Field(None, description='Total amount paid.')
pending: Optional[float] = None
total: Optional[float] = None
class PageCategory(BaseModel):
id: Optional[int] = None
name: Optional[str] = None
position: Optional[int] = None
class Image1(BaseModel):
id: Optional[int] = None
url: Optional[str] = None
class Status6(Enum):
public = 'public'
draft = 'draft'
hidden = 'hidden'
class PageModifyFields(BaseModel):
body: Optional[str] = Field(None, description='Body of the Page')
categories: Optional[List[PageCategory]] = Field(
None, description='Page categories to which the Page belongs to'
)
image: Optional[Image1] = Field(None, description='Image of the Page')
meta_description: Optional[str] = Field(
None, description='Meta description of the Page'
)
page_title: Optional[str] = Field(None, description='Meta title of the Page')
permalink: Optional[str] = Field(None, description='URL of the Page')
status: Optional[Status6] = Field(None, description='Status of the Page')
template: Optional[int] = Field(
None,
description="ID of the Page template. Use null for the blank layout ('None')",
)
title: Optional[str] = Field(None, description='Title of the Page')
class PageTemplate(BaseModel):
id: Optional[int] = None
name: Optional[str] = None
class PartnerError(BaseModel):
error: Optional[bool] = Field(None, description='True when an error occurs.')
field: Optional[str] = Field(None, description='Field causing the error.')
message: Optional[str] = Field(None, description='Message describing the error.')
class Store1(BaseModel):
code: Optional[str] = Field(None, description='Store code.')
class PartnerStoreCode(BaseModel):
store: Optional[Store1] = None
class PlanName(Enum):
pro = 'pro'
plus = 'plus'
premium = 'premium'
class PartnerStoreCreate(BaseModel):
aff: Optional[str] = Field(None, description='Partner code.')
email: Optional[EmailStr] = Field(
None, description='New Store administrator email.'
)
locale: Optional[str] = Field(
'en', description='ISO3166-2 code for the store langauge.'
)
password: Optional[str] = Field(
None, description='New Store administrator password.'
)
plan_name: Optional[PlanName] = Field('pro', description='New Store plan name.')
reject_duplicates: Optional[bool] = Field(
False,
description='Indicates whether the request should fail if the Store name provided is already in use.',
)
store_name: Optional[str] = Field(None, description='New Store name.')
class Status8(BaseModel):
message: Optional[str] = Field(
None, description='Message describing the current creation status.'
)
percentage: Optional[str] = Field(
None,
description='Percentage of the creation process that was already completed.',
)
class PartnerStoreStatus(BaseModel):
status: Optional[Status8] = None
class Type6(Enum):
manual = 'manual'
paypal = 'paypal'
pagseguro = 'pagseguro'
moneybookers = 'moneybookers'
webpay_cl = 'webpay_cl'
easypay = 'easypay'
easypaycc = 'easypaycc'
easypayboleto = 'easypayboleto'
ideal_basic = 'ideal_basic'
hipay = 'hipay'
khipu = 'khipu'
mercado_pago = 'mercado_pago'
ifthenpay = 'ifthenpay'
eupago = 'eupago'
stripe = 'stripe'
payu = 'payu'
servipag = 'servipag'
class PaymentMethodFields(BaseModel):
id: Optional[int] = Field(
None, description='Unique identifier of the Payment Method'
)
name: Optional[str] = Field(None, description='Name of the Payment Method')
type: Optional[Type6] = Field(None, description='Type of the Payment Method')
class PaymentMethodFreq(BaseModel):
count: Optional[str] = None
name: Optional[str] = None
class ProductCustomFieldFields(BaseModel):
custom_field_id: Optional[int] = Field(
None, description='Unique identifier of the ProductCustomField'
)
id: Optional[int] = Field(
None, description='Unique identifier of the ProductCustomField value'
)
label: Optional[str] = Field(
None, description='The label for the ProductCustomField'
)
type: Optional[str] = Field(None, description='The type of the ProductCustomField')
value: Optional[str] = Field(
None, description='The value for the ProductCustomField'
)
value_id: Optional[str] = Field(
None, description='The value id for the ProductCustomField'
)
class PackageFormat(Enum):
box = 'box'
cylinder = 'cylinder'
class Status9(Enum):
available = 'available'
not_available = 'not-available'
disabled = 'disabled'
class ProductEditFields(BaseModel):
barcode: Optional[str] = Field(None, description='Barcode of the product')
categories: Optional[List[CategoryFields]] = None
description: Optional[str] = Field(None, description='Description of the product')
diameter: Optional[float] = Field(None, description='Diameter of the product')
featured: Optional[bool] = Field(
False, description='True if the product is featured'
)
google_product_category: Optional[str] = Field(
None, description='Category of a Product based on the Google product taxonomy'
)
height: Optional[float] = Field(None, description='Height of the product')
length: Optional[float] = Field(None, description='Length of the product')
meta_description: Optional[str] = Field(
None, description='SEO meta description of the product'
)
name: str = Field(..., description='Name of the product')
package_format: Optional[PackageFormat] = Field(
'box', description='Format the product package'
)
page_title: Optional[str] = Field(None, description='SEO title of the product')
permalink: Optional[str] = Field(None, description='Product unique URL path')
price: float = Field(..., description='Price of the product')
shipping_required: Optional[bool] = Field(
True, description='False if the product is digital'
)
sku: Optional[str] = Field(None, description='Stock Keeping Unit of the product')
status: Optional[Status9] = Field('available', description='Status of the product')
stock: Optional[int] = Field(100, description='Quantity in stock for the product')
stock_unlimited: Optional[bool] = Field(
None, description='True if the Product has unlimited stock'
)
weight: Optional[float] = Field(1, description='Weight of the product')
width: Optional[float] = Field(None, description='Width of the product')
class OptionType(Enum):
option = 'option'
input = 'input'
text = 'text'
file = 'file'
class ProductOptionEditFields(BaseModel):
name: Optional[str] = Field(None, description='Name of the product option')
option_type: Optional[OptionType] = Field(
None, description='Type of the product option'
)
position: Optional[int] = Field(None, description='Position of the product option')
class ProductOptionValueEditFields(BaseModel):
name: Optional[str] = Field(None, description='Name of the product option value')
position: Optional[int] = Field(
None, description='Position of the product option value'
)
class ProductOptionVariantEdit(BaseModel):
name: Optional[str] = Field(None, description='Name of the product option')
product_option_id: Optional[int] = Field(
None, description='Id of the product option'
)
product_option_position: Optional[int] = Field(
None, description='position of product option'
)
product_option_value_id: Optional[int] = Field(
None, description='Id of product option value'
)
product_value_position: Optional[int] = Field(
None, description='position of product option value'
)
value: Optional[str] = Field(None, description='Value of the product option')
class PromotionEditFields(BaseModel):
begins_at: Optional[str] = Field(
None,
description="Creation date of the promotion (requires 'lasts' param - 'date')",
)
buys_at_least: Optional[str] = Field(
None, description="Controls the promotion's condition ('none', 'price', 'qty')"
)
categories: Optional[List[Id]] = Field(
None,
description="Products Categories where the promotion will be applied (requires 'discount_target' param - 'categories')",
)
code: Optional[str] = Field(None, description='Code of the promotion')
condition_price: Optional[float] = Field(
None,
description="Minimum order amount to validate the promotion (requires 'buys_at_least' param - 'price')",
)
condition_qty: Optional[int] = Field(
None,
description="Minimum quantity of ordered itens to validate the promotion (requires 'buys_at_least' param - 'qty')",
)
cumulative: Optional[bool] = Field(
False, description='True if the promotion can be acumulated with others'
)
customer_categories: Optional[List[Id]] = Field(
None,
description="Customer Categories to whom the promotion will be applied (requires 'customers' param - 'categories')",
)
customers: Optional[str] = Field(
None,
description="Controls to which customers the promotion will be applied ('all', 'loggedin', 'categories', 'guests')",
)
discount_amount_fix: Optional[float] = Field(
None,
description="Fixed discount amount of the promotion (requires 'type' param - 'fix')",
)
discount_amount_percent: Optional[float] = Field(
None,
description="Percentual discount amount of the promotion (requires 'type' param - 'percentage')",
)
discount_target: Optional[str] = Field(
None,
description="Where the promotion will be applied ('order', 'shipping', 'categories', 'buy_x_get_y)",
)
enabled: Optional[bool] = Field(
True, description='If the promotion is to be temporarily disabled'
)
expires_at: Optional[str] = Field(
None,
description="Expiration date of the promotion (requires 'lasts' param - 'date')",
)
lasts: Optional[str] = Field(
None,
description="Controls when the promotion will expire ('none', 'date', 'max_times_used')",
)
max_times_used: Optional[int] = Field(
None,
description="Maximum amount a promotion can be used (requires 'lasts' param - 'max_times_used')",
)
name: Optional[str] = Field(None, description='Name of the product')
products: Optional[List[Id]] = Field(
None,
description="Products where the promotion will be applied (requires 'discount_target' param - 'categories' or 'buy_x_get_y')",
)
products_x: Optional[List[Id]] = Field(
None,
description="Products required to apply the promotion (requires 'discount_target' param - 'buy_x_get_y')",
)
quantity_x: Optional[int] = Field(
None,
description="Number of sets of products_x needed to be able to apply the promotion (requires 'discount_target' param - 'buy_x_get_y')",
)
type: Optional[str] = Field(
None,
description="Controls if the discount will be a fixed area ('fix', 'percentage')",
)
class PromotionFields(BaseModel):
begins_at: Optional[str] = Field(
None,
description="Creation date of the promotion (requires 'lasts' param - 'date')",
)
categories: Optional[List[Id]] = Field(
None,
description="Products Categories where the promotion will be applied (requires 'discount_target' param - 'categories')",
)
code: Optional[str] = Field(None, description='Code of the promotion')
condition_price: Optional[float] = Field(
None, description='Minimum order amount to validate the promotion'
)
condition_qty: Optional[int] = Field(
None, description='Minimum quantity of ordered itens to validate the promotion'
)
cumulative: Optional[bool] = Field(
False, description='True if the promotion can be acumulated with others'
)
customer_categories: Optional[List[Id]] = Field(
None,
description="Customer Categories to whom the promotion will be applied (requires 'customers' param - 'categories')",
)
discount_amount_fix: Optional[float] = Field(
None, description='Fixed discount amount of the promotion'
)
discount_amount_percent: Optional[float] = Field(
None, description='Percentual discount amount of the promotion'
)
discount_target: Optional[str] = Field(
None,
description="Where the promotion will be applied ('order', 'shipping', 'categories', 'buy_x_get_y)",
)
enabled: Optional[bool] = Field(
True, description='If the promotion is currently enabled'
)
expires_at: Optional[str] = Field(
None,
description="Expiration date of the promotion (requires 'lasts' param - 'date')",
)
id: Optional[int] = Field(None, description='Unique identifier of the product')
lasts: Optional[str] = Field(
None,
description="Controls when the promotion will expire ('none', 'date', 'max_times_used')",
)
max_times_used: Optional[int] = Field(
None,
description="Maximum amount a promotion can be used (requires 'lasts' param - 'max_times_used')",
)
name: Optional[str] = Field(None, description='Name of the product')
products: Optional[List[Id]] = Field(
None,
description="Products where the promotion will be applied (requires 'discount_target' param - 'categories' or 'buy_x_get_y')",
)
products_x: Optional[List[Id]] = Field(
None,
description="Products required to apply the promotion (requires 'discount_target' param - 'buy_x_get_y')",
)
quantity_x: Optional[int] = Field(
None,
description="Number of sets of products_x needed to be able to apply the promotion (requires 'discount_target' param - 'buy_x_get_y')",
)
status: Optional[str] = Field(
None, description="Status of the promotion ('active', 'expired')"
)
times_used: Optional[int] = Field(
None, description='Amount of times the promotion was used'
)
class Referrer(BaseModel):
count: Optional[int] = None
source: Optional[str] = None
class Region(BaseModel):
code: Optional[str] = None
name: Optional[str] = None
class RegionOrders(BaseModel):
city: Optional[str] = None
code: Optional[int] = None
country: Optional[int] = None
class ShippingAddress(BaseModel):
address: Optional[str] = Field(
None, description="Address of the Customer's Shipping Address"
)
city: Optional[str] = Field(
None, description="City of the Customer's Shipping Address"
)
country: Optional[str] = Field(
None,
description="Country code of the Customer's Shipping Address (ISO 3166-1 alpha-2)",
)
municipality: Optional[str] = Field(
None, description="Municipality of the Customer's Shipping Address"
)
name: Optional[str] = Field(
None, description="Name of the Customer's Shipping Address"
)
postal: Optional[str] = Field(
None, description="Postal code of the Customer's Shipping Address"
)
region: Optional[str] = Field(
None,
description="Region code of the Customer's Shipping Address (Use the FIPS standard - http://www.geonames.org/countries/)",
)
surname: Optional[str] = Field(
None, description="Surname of the Customer's Shipping Address"
)
class ShippingMethod1(BaseModel):
callback_url: Optional[str] = Field(
None, description='URL that receives the shipping data and returns rates'
)
city: Optional[str] = Field(None, description='City/Municipality name of origin')
fetch_services_url: Optional[str] = Field(
None, description='URL that returns available shipping services'
)
name: Optional[str] = Field(None, description='Name of the Shipping Method')
postal: Optional[str] = Field(None, description='Postal/Zipcode of origin')
state: Optional[str] = Field(None, description='State/Region code of origin')
token: Optional[str] = Field(
None, description='Token used to authentica on the the fetch_services_url'
)
class ShippingMethodEdit(BaseModel):
shipping_method: Optional[ShippingMethod1] = None
class Type7(Enum):
free = 'free'
tables = 'tables'
correiosbr = 'correiosbr'
correos_chile = 'correos_chile'
chilexpress = 'chilexpress'
flat = 'flat'
ups = 'ups'
external = 'external'
class ShippingMethodFreq(BaseModel):
count: Optional[str] = None
name: Optional[str] = None
class ShippingService(BaseModel):
id: Optional[int] = Field(
None, description='Unique identifier of the Shipping Service'
)
name: Optional[str] = Field(None, description='Name of the Shipping Service')
service_code: Optional[str] = Field(
None, description='Code of the Shipping Service'
)
class StatusInvalid(BaseModel):
message: Optional[str] = None
class StoreAddress(BaseModel):
address: Optional[str] = Field(None, description="Address of the Store's Address")
city: Optional[str] = Field(None, description="City of the Store's Address")
country: Optional[str] = Field(
None, description="Country of the Store's Address (ISO 3166-1 alpha-2)"
)
country_code: Optional[str] = Field(
None, description="Country code of the Store's Address"
)
postal: Optional[str] = Field(
None, description="Postal code of the Store's Address"
)
region: Optional[str] = Field(None, description="Region of the Store's Address")
region_code: Optional[str] = Field(
None, description="Region code of the Store's Address"
)
class Conversions(BaseModel):
added_to_cart: Optional[float] = Field(
None, description='Total add to cart conversions.'
)
checkout: Optional[float] = Field(None, description='Total checkout conversions.')
paid: Optional[float] = Field(None, description='Total paid conversions.')
class NewVsReturningCustomers(BaseModel):
global_: Optional[int] = Field(
None,
alias='global',
description='Global percentage of new vs returning customers.',
)
per_day: Optional[List[NewVsReturning]] = Field(
None, description='Numbers of new and returning customers per day.'
)
class NewVsReturningOrders(BaseModel):
global_: Optional[int] = Field(
None,
alias='global',
description='Global percentage of new vs returning customers.',
)
per_day: Optional[List[NewVsReturning]] = Field(
None, description='Numbers of new and returning customers per day.'
)
class Orders(BaseModel):
average: Optional[float] = Field(None, description='Average order amount.')
count: Optional[int] = Field(None, description='Total number of orders.')
data: Optional[List[OrdersData]] = Field(None, description='Orders data.')
total: Optional[float] = Field(None, description='Total amount from all orders.')
class TaxEditFields(BaseModel):
category_id: Optional[int] = Field(
None, description='Unique identifier of the category of the Tax'
)
country: Optional[str] = Field(None, description='Country where the Tax applies')
fixed: Optional[bool] = Field(
False, description='True if the tax has a fixed valued amount'
)
name: Optional[str] = Field(None, description='Name that identifies tax')
region: Optional[str] = Field(None, description='Region where the Tax applies')
shipping: Optional[bool] = Field(
False, description='True if the tax should be applied to shipping costs'
)
tax: Optional[float] = Field(None, description='Tax value for the given Tax')
class TaxFields(BaseModel):
category_id: Optional[int] = Field(
None, description='Unique identifier of the category of the Tax'
)
country: Optional[str] = Field(
None, description='Country name where the Tax applies'
)
fixed: Optional[bool] = Field(
False, description='True if the tax has a fixed valued amount'
)
id: Optional[int] = Field(None, description='Unique identifier of the Tax')
name: Optional[str] = Field(None, description='Name that identifies tax')
region: Optional[str] = Field(None, description='Region name where the Tax applies')
shipping: Optional[bool] = Field(
False, description='True if the tax should be applied to shipping costs'
)
tax_amount: Optional[float] = Field(None, description='Tax value for the given Tax')
class TrafficSource(BaseModel):
campaign: Optional[str] = Field(
None, description='The campaign that referred the customer to the checkout'
)
first_page_visited: Optional[str] = Field(
None, description='The first url visited by the customer'
)
first_page_visited_at: Optional[str] = Field(
None, description='The date when the customer visited the first page'
)
medium: Optional[str] = Field(
None, description='The medium that referred the customer to the checkout'
)
referral_code: Optional[str] = Field(
None, description='The code that referred the customer to the checkout'
)
referral_source: Optional[str] = Field(
None, description='The source that referred the customer to the website'
)
referral_url: Optional[str] = Field(
None, description='The website that referred the customer to the checkout'
)
source_name: Optional[str] = Field(
None, description='Where the checkout originated'
)
user_agent: Optional[str] = Field(
None, description='User agent of the referred request to checkout'
)
class TrafficType(BaseModel):
count: Optional[int] = None
name: Optional[str] = None
class VariantEditFields(BaseModel):
image_id: Optional[int] = Field(
None,
description='Unique identifier of the product image to associate with this variant',
)
options: Optional[List[ProductOptionVariantEdit]] = None
price: Optional[float] = Field(None, description='Price of the product')
sku: Optional[str] = Field(
None, description="Stock Keeping Unit of the Product's Variant"
)
stock: Optional[int] = Field(
100, description="Quantity in stock for the Product's Variant"
)
stock_unlimited: Optional[bool] = Field(
None, description="True if the Product's Variant has unlimited stock"
)
class VariantFields(BaseModel):
id: Optional[int] = Field(None, description='Unique identifier of the product')
image: Optional[ImageFields] = None
options: Optional[List[ProductOptionVariantEdit]] = None
price: Optional[float] = Field(None, description='Price of the product')
sku: Optional[str] = Field(
None, description="Stock Keeping Unit of the Product's Variant"
)
stock: Optional[int] = Field(
100, description="Quantity in stock for the Product's Variant"
)
stock_unlimited: Optional[bool] = Field(
None, description="True if the Product's Variant has unlimited stock"
)
class Status11(Enum):
Abandoned = 'Abandoned'
Canceled = 'Canceled'
Pending_Payment = 'Pending Payment'
Paid = 'Paid'
class Fields(Enum):
sku = 'sku'
barcode = 'barcode'
brand = 'brand'
name = 'name'
description = 'description'
variants = 'variants'
option_name = 'option_name'
custom_fields = 'custom_fields'
custom_fields_selects = 'custom_fields_selects'
class Status12(Enum):
available = 'available'
not_available = 'not-available'
disabled = 'disabled'
class AddProductCustomField(BaseModel):
field: Optional[AddProductCustomFieldFields] = None
class App(BaseModel):
apps: Optional[List[AppFields]] = None
class Attachment(BaseModel):
attachment: Optional[AttachmentFields] = None
class AttachmentEdit(BaseModel):
attachment: Optional[AttachmentEditFields] = None
class Category(BaseModel):
category: Optional[CategoryFields] = None
class CategoryEdit(BaseModel):
category: Optional[CategoryEditFields] = None
class CheckoutCustomField(BaseModel):
checkout_custom_field: Optional[CheckoutCustomFieldFields] = None
class CheckoutCustomFieldEdit(BaseModel):
checkout_custom_field: Optional[CheckoutCustomFieldEditFields] = None
class CountryOrders(BaseModel):
code: Optional[str] = None
count: Optional[int] = Field(None, description='Number of country orders.')
country: Optional[str] = None
orders: Optional[List[RegionOrders]] = Field(None, description='Orders per region.')
class CustomField(BaseModel):
custom_field: Optional[CustomFieldFields] = None
class CustomFieldEdit(BaseModel):
custom_field: Optional[CustomFieldEditFields] = None
class CustomFieldSelectOption(BaseModel):
custom_field_select_option: Optional[CustomFieldSelectOptionFields] = None
class CustomFieldSelectOptionEdit(BaseModel):
custom_field_select_option: Optional[CustomFieldSelectOptionEditFields] = None
class CustomerAdditionalField(BaseModel):
customer_additional_field: Optional[CustomerAdditionalFieldFields] = None
class CustomerAdditionalFieldEdit(BaseModel):
customer_additional_field: Optional[CustomerAdditionalFieldEditFields] = None
class CustomerCategory(BaseModel):
category: Optional[CustomerCategoryFields] = None
class CustomerCategoryEdit(BaseModel):
category: Optional[CustomerCategoryEditFields] = None
class CustomerFields(BaseModel):
billing_address: Optional[BillingAddress] = None
customer_additional_fields: Optional[List[CustomerAdditionalField]] = None
customer_categories: Optional[List[CustomerCategory]] = None
email: Optional[str] = Field(None, description='Email of the Customer')
id: Optional[int] = Field(None, description='Unique identifier of the Customer')
name: Optional[str] = Field(None, description='Name of the Customer')
phone: Optional[str] = Field(None, description='Phone of the Customer')
shipping_address: Optional[ShippingAddress] = None
status: Optional[Status] = Field(None, description='Status of the Customer')
surname: Optional[str] = Field(None, description='Surname of the Customer')
class CustomerFieldsWithBillingAddressAndShippingAddressFields(BaseModel):
billing_address: Optional[BillingAddress] = None
id: Optional[int] = Field(None, description='Unique identifier of the Customer')
shipping_address: Optional[ShippingAddress] = None
class CustomerFieldsWithPassword(BaseModel):
billing_address: Optional[BillingAddress] = None
email: Optional[str] = Field(None, description='Email of the Customer')
id: Optional[int] = Field(None, description='Unique identifier of the Customer')
password: Optional[str] = Field(None, description='Password')
phone: Optional[str] = Field(None, description='Phone of the Customer')
shipping_address: Optional[ShippingAddress] = None
status: Optional[Status] = Field(None, description='Status of the Customer')
class CustomerFieldsWithPasswordNoID(BaseModel):
billing_address: Optional[BillingAddress] = None
customer_category: Optional[List[int]] = None
email: Optional[str] = Field(None, description='Email of the Customer')
password: Optional[str] = Field(None, description='Password')
phone: Optional[str] = Field(None, description='Phone of the Customer')
shipping_address: Optional[ShippingAddress] = None
status: Optional[Status] = Field(None, description='Status of the Customer')
class CustomerWithPassword(BaseModel):
customer: Optional[CustomerFieldsWithPassword] = None
class CustomerWithPasswordNoID(BaseModel):
customer: Optional[CustomerFieldsWithPasswordNoID] = None
class DigitalProduct(BaseModel):
digital_product: Optional[DigitalProductFields] = None
class DigitalProductEdit(BaseModel):
digital_product: Optional[DigitalProductEditFields] = None
class Fulfillment(BaseModel):
category: Optional[FulfillmentFields] = None
class FulfillmentCreate(BaseModel):
order: Optional[FulfillmentCreateFields] = None
class FulfillmentEdit(BaseModel):
order: Optional[FulfillmentEditFields] = None
class Hook(BaseModel):
hook: Optional[HookFields] = None
class HookEdit(BaseModel):
hook: Optional[HookEditFields] = None
class Image(BaseModel):
image: Optional[ImageFields] = None
class ImageEdit(BaseModel):
image: Optional[ImageEditFields] = None
class OrderCreateFields(BaseModel):
customer: Optional[CustomerFieldsWithBillingAddressAndShippingAddressFields] = None
products: Optional[List[OrderProductOrderCreate]] = None
shipping_method_id: Optional[int] = Field(None, description='Shipping method id')
shipping_method_name: Optional[str] = Field(
None, description='Shipping method name e.g. Royal Mail'
)
shipping_price: Optional[float] = Field(
None,
description="Shipping method's price (applicable if shipping_method_name is provided instead of a shipping_method_id)",
)
status: Optional[Status3] = Field(None, description='Status of the Order')
class OrderEdit(BaseModel):
order: Optional[OrderEditFields] = None
class OrderHistory(BaseModel):
order_history: Optional[OrderHistoryFields] = None
class OrderHistoryEdit(BaseModel):
order_history: Optional[OrderHistoryEditFields] = None
class OrderProduct(BaseModel):
discount: Optional[float] = Field(None, description='Discount of the Order Product')
id: Optional[int] = Field(
None, description='Unique identifier of the original Product'
)
image: Optional[str] = Field(None, description='Image URL of the Order Product')
name: Optional[str] = Field(None, description='Name of the Order Product')
price: Optional[float] = Field(None, description='Price of the Order Product')
qty: Optional[int] = Field(None, description='Price of the Order Product')
sku: Optional[str] = Field(
None, description='Stock Keeping Unit of the Order Product'
)
taxes: Optional[List[OrderProductTax]] = None
variant_id: Optional[int] = Field(
None, description='Unique identifier of the original Product Variant'
)
weight: Optional[float] = Field(1, description='Weight of the Order Product')
class PageFields(BaseModel):
body: Optional[str] = Field(None, description='Body of the Page')
categories: Optional[List[PageCategory]] = Field(
None, description='Page categories to which the Page belongs to'
)
id: Optional[int] = Field(None, description='Id of the Page')
image: Optional[Image1] = Field(None, description='Image of the Page')
legal: Optional[bool] = Field(None, description='True if it is a legal page')
meta_description: Optional[str] = Field(
None, description='Meta description of the Page'
)
page_title: Optional[str] = Field(None, description='Meta title of the Page')
permalink: Optional[str] = Field(None, description='URL of the Page')
status: Optional[Status6] = Field(None, description='Status of the Page')
template: Optional[PageTemplate] = None
title: Optional[str] = Field(None, description='Title of the Page')
class PageModify(BaseModel):
page: Optional[PageModifyFields] = None
class PaymentMethod(BaseModel):
payment_method: Optional[PaymentMethodFields] = None
class ProductCustomField(BaseModel):
field: Optional[ProductCustomFieldFields] = None
class ProductEdit(BaseModel):
product: Optional[ProductEditFields] = None
class ProductFields(BaseModel):
barcode: Optional[str] = Field(None, description='Barcode of the product')
categories: Optional[List[CategoryFields]] = None
created_at: Optional[str] = Field(None, description='Date of product creation')
description: Optional[str] = Field(None, description='Description of the product')
diameter: Optional[float] = Field(None, description='Diameter of the product')
discount: Optional[float] = Field(None, description='Discount of the product')
featured: Optional[bool] = Field(
False, description='True if the product is featured'
)
google_product_category: Optional[str] = Field(
None, description='Category of a Product based on the Google product taxonomy'
)
height: Optional[float] = Field(None, description='Height of the product')
id: Optional[int] = Field(None, description='Unique identifier of the product')
images: Optional[List[ImageFields]] = None
length: Optional[float] = Field(None, description='Length of the product')
name: Optional[str] = Field(None, description='Name of the product')
package_format: Optional[PackageFormat] = Field(
'box', description='Format the product package'
)
permalink: Optional[str] = Field(None, description='Product unique URL path')
price: Optional[float] = Field(None, description='Price of the product')
sku: Optional[str] = Field(None, description='Stock Keeping Unit of the product')
status: Optional[Status9] = Field('available', description='Status of the product')
stock: Optional[int] = Field(100, description='Quantity in stock for the product')
stock_unlimited: Optional[bool] = Field(
None, description='True if the Product has unlimited stock'
)
variants: Optional[List[VariantFields]] = None
weight: Optional[float] = Field(1, description='Weight of the product')
width: Optional[float] = Field(None, description='Width of the product')
class ProductOptionEdit(BaseModel):
option: Optional[ProductOptionEditFields] = None
class ProductOptionValueEdit(BaseModel):
value: Optional[ProductOptionValueEditFields] = None
class Promotion(BaseModel):
promotion: Optional[PromotionFields] = None
class PromotionEdit(BaseModel):
promotion: Optional[PromotionEditFields] = None
class ShippingMethodFields(BaseModel):
callback_url: Optional[str] = Field(
None, description='URL that receives the shipping data and returns rates'
)
city: Optional[str] = Field(None, description='City/Municipality name of origin')
fetch_services_url: Optional[str] = Field(
None, description='URL that returns available shipping services'
)
id: Optional[int] = Field(
None, description='Unique identifier of the Shipping Method'
)
name: Optional[str] = Field(None, description='Name of the Shipping Method')
postal: Optional[str] = Field(None, description='Postal/Zipcode of origin')
services: Optional[List[ShippingService]] = None
state: Optional[str] = Field(None, description='State/Region code of origin')
type: Optional[Type7] = Field(None, description='Type of the Shipping Method')
class Store2(BaseModel):
address: Optional[StoreAddress] = None
code: Optional[str] = Field(None, description='Store Code')
country: Optional[str] = Field(None, description='Store Country')
currency: Optional[str] = Field(None, description='Store Currency')
email: Optional[str] = Field(None, description='Store Admin Email')
hooks_token: Optional[str] = Field(None, description='Store Hooks Auth token')
logo: Optional[str] = Field(None, description='Store Logo URL')
name: Optional[str] = Field(None, description='Store Name')
timezone: Optional[str] = Field(None, description='Store Timezone')
url: Optional[str] = Field(None, description='Store URL')
weight_unit: Optional[str] = Field(None, description='Store Weight Unit')
class RegionOrders1(BaseModel):
display_mode: Optional[str] = Field(
None,
description="Can be 'regions' when orders are specific of 1 country or 'auto'.",
)
regions_orders: Optional[List[CountryOrders]] = Field(
None, description='Orders per country and region(inside the country).'
)
class StoreStats(BaseModel):
best_sold: Optional[List[BestSold]] = Field(
None, description='Top 10 best sold products.'
)
conversions: Optional[Conversions] = None
currency: Optional[str] = Field(None, description='Store currency.')
daily_visits: Optional[List[DailyVisits]] = Field(
None, description='Visits per day.'
)
from_: Optional[str] = Field(
None, alias='from', description='Statistics start date.'
)
new_vs_returning_customers: Optional[NewVsReturningCustomers] = None
new_vs_returning_orders: Optional[NewVsReturningOrders] = None
orders: Optional[Orders] = None
payment_methods: Optional[List[PaymentMethodFreq]] = Field(
None, description='Store payment methods and their frequency.'
)
referrers: Optional[List[Referrer]] = Field(
None, description='Top 10 referrer sources and their frequency.'
)
region_orders: Optional[RegionOrders1] = None
search_frequencies_all: Optional[List] = Field(
None,
description='Number of times each search was conducted under the form of an aggregation query.',
)
search_frequencies_without_results: Optional[List] = Field(
None,
description='Number of times each search with zero results was conducted under the form of an aggregation query.',
)
shipping_methods: Optional[List[ShippingMethodFreq]] = Field(
None, description='Store shipping methods and their frequency.'
)
to: Optional[str] = Field(None, description='Statistics end date.')
traffic_type: Optional[List[TrafficType]] = Field(
None, description='Type of store traffic and its frequency.'
)
visits: Optional[int] = Field(None, description='Total number of visits.')
class Tax(BaseModel):
tax: Optional[TaxFields] = None
class TaxEdit(BaseModel):
tax: Optional[TaxEditFields] = None
class Variant(BaseModel):
variant: Optional[VariantFields] = None
class VariantEdit(BaseModel):
variant: Optional[VariantEditFields] = None
class Type8(BaseModel):
code: Optional[str] = Field(None, description='Store code.')
stats: Optional[StoreStats] = None
class CustomersIdFieldsGetResponse(RootModel[List[CustomerAdditionalField]]):
root: List[CustomerAdditionalField]
class Customer(BaseModel):
customer: Optional[CustomerFields] = None
class OrderCreate(BaseModel):
order: Optional[OrderCreateFields] = None
class OrderFields(BaseModel):
additional_fields: Optional[List[OrderAdditionalFields]] = Field(
None, description='Array of additional fields for the given Order'
)
additional_information: Optional[str] = Field(
None, description='Additional information for the given Order'
)
billing_address: Optional[OrderBillingAddress] = None
checkout_url: Optional[str] = Field(
None, description='Store Checkout Order URL for the given Order'
)
coupons: Optional[str] = Field(
None, description='Promotion Coupons used on the given Order'
)
created_at: Optional[str] = Field(None, description='Order date')
currency: Optional[str] = Field(None, description='Currency of the Order')
customer: Optional[Customer] = None
discount: Optional[float] = Field(
None, description='Discount value for the given Order'
)
duplicate_url: Optional[str] = Field(
None, description='Duplicate Order URL for the given Order'
)
external_shipping_rate_id: Optional[str] = Field(
None, description='Rate id for selected External Shipping Method rate'
)
id: Optional[int] = Field(None, description='Unique identifier of the Order')
payment_information: Optional[str] = Field(
None, description='Payment information for the given Order'
)
payment_method_name: Optional[str] = Field(
None, description='Payment Method name used e.g. PayPal'
)
payment_method_type: Optional[str] = Field(
None, description='Payment Method type used e.g. paypal'
)
products: Optional[List[OrderProduct]] = None
recovery_url: Optional[str] = Field(
None, description='Recovery Order URL for the given Order'
)
shipment_status: Optional[ShipmentStatus3] = Field(
None, description='Shipment Status for Order Fulfillment.'
)
shipping: Optional[float] = Field(
None, description='Shipping value for the given Order'
)
shipping_address: Optional[OrderShippingAddress] = None
shipping_discount: Optional[float] = Field(
None, description='Shipping Discount value for the given order'
)
shipping_method_id: Optional[int] = Field(
None, description='Shipping method e.g. Royal Mail'
)
shipping_method_name: Optional[str] = Field(
None, description='Shipping method e.g. Royal Mail'
)
shipping_option: Optional[ShippingOption] = Field(
None, description='Shipping option for this order.'
)
shipping_required: Optional[bool] = Field(
True, description='False if the order is digital.'
)
shipping_tax: Optional[float] = Field(
None, description='Shipping Tax value for the given order'
)
shipping_taxes: Optional[List[OrderShippingTax]] = None
source: Optional[TrafficSource] = None
status: Optional[Status3] = Field(None, description='Status of the Order')
subtotal: Optional[float] = Field(
None,
description='Subtotal value for the given Order. Excluding taxes, shipping and discounts',
)
tax: Optional[float] = Field(None, description='Tax value for the given order')
total: Optional[float] = Field(
None,
description='Total value for the given Order. Including taxes, shipping and discounts',
)
tracking_company: Optional[str] = Field(
None, description='Company Used for Order Fulfillment.'
)
tracking_number: Optional[str] = Field(
None, description='Tracking Number for Order Fulfillment.'
)
tracking_url: Optional[str] = Field(
None, description='Tracking URL for Order Fulfillment.'
)
class Page(BaseModel):
page: Optional[PageFields] = None
class Product(BaseModel):
product: Optional[ProductFields] = None
class ShippingMethod(BaseModel):
shipping_method: Optional[ShippingMethodFields] = None
class Order(BaseModel):
order: Optional[OrderFields] = None
class ProductOption(BaseModel):
option: Optional[ProductOptionFields] = None
class ProductOptionFields(BaseModel):
id: Optional[int] = Field(
None, description='Unique identifier of the product option'
)
name: Optional[str] = Field(None, description='Name of the product option')
option_type: Optional[OptionType] = Field(
None, description='Type of the product option'
)
position: Optional[int] = Field(None, description='Position of the product option')
values: Optional[List[ProductOptionValueFields]] = None
class ProductOptionValue(BaseModel):
value: Optional[ProductOptionValueFields] = None
class ProductOptionValueFields(BaseModel):
id: Optional[int] = Field(
None, description='Unique identifier of the product option value'
)
name: Optional[str] = Field(None, description='Name of the product option value')
position: Optional[int] = Field(
None, description='Position of the product option value'
)
product_option: Optional[ProductOption] = None
variants: Optional[List[Variant]] = None
ProductOption.model_rebuild()
ProductOptionFields.model_rebuild()
ProductOptionValue.model_rebuild()