# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T12:06:32+00:00
from __future__ import annotations
from datetime import datetime
from enum import Enum
from typing import Any, Dict, List, Optional
from pydantic import BaseModel, ConfigDict, Field, RootModel
class FrequencyRequest(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
interval: int = Field(
...,
description='Time interval configured between subscription orders, which depends on the periodicity. For a `DAILY` periodicity, the value will be days, for `MONTHLY` it will be months, and so on.',
examples=[3],
)
periodicity: str = Field(
...,
description='Defines the subscriptions recurrence period. The possible values are: \r\n- `DAILY` \r\n- `WEEKLY` \r\n- `MONTHLY` \r\n- `YEARLY`',
examples=['MONTHLY'],
)
class FrequencyResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
interval: int
periodicity: str
class ItemAttachment(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
content: Optional[Dict[str, str]] = None
name: Optional[str] = None
class ItemSimulationStatus(Enum):
integer_0 = 0
integer_1 = 1
integer_2 = 2
integer_3 = 3
integer_4 = 4
class LogisticsInfoDeliveryWindow(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
endDateUtc: Optional[datetime] = None
price: Optional[int] = None
startDateUtc: Optional[datetime] = None
class LogisticsInfoSLA(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
availableDeliveryWindows: Optional[List[LogisticsInfoDeliveryWindow]] = None
deliveryChannel: Optional[str] = None
deliveryWindows: Optional[List[LogisticsInfoDeliveryWindow]] = None
id: Optional[str] = None
lockTtl: Optional[str] = None
pickupPointId: Optional[str] = None
price: Optional[int] = None
shippingEstimate: Optional[str] = None
class PaymentField(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
name: Optional[str] = None
value: Optional[str] = None
class PaymentMethodResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
installments: Optional[int] = None
paymentAccountId: Optional[str] = None
paymentSystem: str
class PaymentMethodThinRequest(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
installments: Optional[int] = Field(
None, description='Number of payment installments.', examples=[3]
)
paymentAccountId: Optional[str] = Field(
None,
description="Data about shoppers' profiles and documents. For example, their credit card number. To obtain that information, use the endpoint [Get client profile by email](https://developers.vtex.com/docs/api-reference/checkout-api#get-/api/checkout/pub/profiles).",
examples=['340357032569595'],
)
paymentSystem: str = Field(..., description="Payment system's ID.", examples=['4'])
class Periodicity(Enum):
integer_0 = 0
integer_1 = 1
integer_2 = 2
integer_3 = 3
integer_4 = 4
class PriceTag(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
identifier: Optional[str] = None
isPercentual: Optional[bool] = None
name: Optional[str] = None
rawValue: Optional[float] = None
valueAsInt: Optional[int] = None
class PurchaseContextAvailableGiftResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
attachments: Optional[List[ItemAttachment]] = None
id: Optional[str] = None
isGift: Optional[bool] = None
isSelected: Optional[bool] = None
name: Optional[str] = None
price: Optional[int] = None
priceTags: Optional[List[PriceTag]] = None
quantity: Optional[int] = Field(
None, description='Amount of units in the cart.', examples=[5], title='quantity'
)
seller: Optional[str] = None
sellingPrice: Optional[int] = None
unitMultiplier: Optional[float] = None
class PurchaseContextSelectableGiftsResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
availableGifts: Optional[List[PurchaseContextAvailableGiftResponse]] = None
availableQuantity: Optional[int] = None
id: Optional[str] = None
class PurchaseDay(Enum):
integer_0 = 0
integer_1 = 1
integer_2 = 2
integer_3 = 3
integer_4 = 4
integer_5 = 5
integer_6 = 6
integer_7 = 7
integer_8 = 8
integer_9 = 9
integer_10 = 10
integer_11 = 11
integer_12 = 12
integer_13 = 13
integer_14 = 14
integer_15 = 15
integer_16 = 16
integer_17 = 17
integer_18 = 18
integer_19 = 19
integer_20 = 20
integer_21 = 21
integer_22 = 22
integer_23 = 23
integer_24 = 24
integer_25 = 25
integer_26 = 26
integer_27 = 27
integer_28 = 28
integer_29 = 29
integer_30 = 30
integer_31 = 31
integer_999 = 999
integer__6 = -6
integer__5 = -5
integer__4 = -4
integer__3 = -3
integer__2 = -2
integer__1 = -1
class PurchaseSettingsResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
currencyCode: str
paymentMethod: PaymentMethodResponse
class PurchaseSettingsThinRequest(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
paymentMethod: PaymentMethodThinRequest
salesChannel: str = Field(
...,
description='Sales channel (or [trade policy](https://help.vtex.com/en/tutorial/how-trade-policies-work--6Xef8PZiFm40kg2STrMkMV)) applied to the subscription being created. You can associate only one sales channel to each subscription. The default value is the main sales channel, which corresponds to `1`.',
)
class ReportResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
canceled: Optional[bool] = None
completedDate: Optional[datetime] = None
email: Optional[str] = None
enqueueDate: Optional[datetime] = None
errorCount: Optional[int] = None
finished: Optional[bool] = None
id: Optional[str] = None
lastErrorMessage: Optional[str] = None
lastUpdateTime: Optional[datetime] = None
linkToDownload: Optional[str] = None
outputType: Optional[str] = None
percentageProcessed: Optional[int] = None
recordsProcessed: Optional[int] = None
recordsSum: Optional[int] = None
startDate: Optional[datetime] = None
statusMessage: Optional[str] = None
zipped: Optional[bool] = None
class ShippingAddressResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
addressId: str
addressType: str
class ShippingEstimate(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
allItemsMatched: Optional[bool] = None
estimate: Optional[str] = None
estimateDeliveryDate: Optional[datetime] = None
name: Optional[str] = None
nextPurchaseDate: Optional[datetime] = None
class SimulateMessageResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
code: Optional[str] = None
status: Optional[str] = None
text: Optional[str] = None
class SimulationItemResult(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
id: Optional[str] = None
quantity: Optional[int] = Field(
None, description='Amount of units in the cart.', examples=[5], title='quantity'
)
status: Optional[ItemSimulationStatus] = None
statusName: Optional[str] = None
unitPrice: Optional[int] = None
class Status(Enum):
integer_0 = 0
integer_1 = 1
integer_2 = 2
integer_3 = 3
class SubscriptionCycleItemContext(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
cycleCount: Optional[int] = None
isSkipped: Optional[bool] = None
quantity: Optional[int] = Field(
None, description='Amount of units in the cart.', examples=[5], title='quantity'
)
skuId: Optional[str] = Field(
None, description='SKU ID.', examples=['12'], title='skuId'
)
status: Optional[Status] = None
subscriptionItemId: Optional[str] = None
class SubscriptionCycleOrderInfo(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
orderGroup: Optional[str] = None
orderId: Optional[str] = None
paymentURL: Optional[str] = None
value: Optional[int] = None
class SubscriptionItemResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
id: str
isSkipped: bool
manualPrice: Optional[int] = Field(
None, description='Manual price.', examples=[40], title='manualPrice'
)
originalOrderId: Optional[str] = None
quantity: int = Field(
..., description='Amount of units in the cart.', examples=[5], title='quantity'
)
skuId: str = Field(..., description='SKU ID.', examples=['12'], title='skuId')
status: str
class SubscriptionReportParam(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
name: Optional[str] = None
type: Optional[str] = None
value: Optional[Any] = None
class SubscriptionThinItemRequest(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
manualPrice: Optional[int] = Field(
None, description='Manual price.', examples=[40], title='manualPrice'
)
quantity: Optional[int] = Field(
None, description='Amount of units in the cart.', examples=[5], title='quantity'
)
skuId: Optional[str] = Field(
None, description='SKU ID.', examples=['12'], title='skuId'
)
class Totalization(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
id: Optional[str] = None
value: Optional[float] = None
class TotalizationResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
id: Optional[str] = None
name: Optional[str] = None
valueAsInt: Optional[int] = None
class UpdateItemInput(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
isSkipped: Optional[bool] = None
manualPrice: Optional[int] = Field(
None, description='Manual price.', examples=[40], title='manualPrice'
)
quantity: Optional[int] = Field(
None, description='Amount of units in the cart.', examples=[5], title='quantity'
)
status: Optional[str] = None
class ValidityRequest(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
begin: Optional[str] = Field(
None,
description="Subscription's beginning date with the format `yyyy-mm-ddThh:mm:ss`.",
examples=['2022-06-10T00:00:00'],
)
end: Optional[str] = Field(
None,
description="Subscription's ending date with the format `yyyy-mm-ddThh:mm:ss`.",
examples=['2023-06-10T00:00:00'],
)
class ValidityResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
begin: datetime
end: Optional[datetime] = None
class Settings(BaseModel):
defaultSla: str = Field(
..., description='Default delivery method.', examples=[None], title='defaultSla'
)
deliveryChannels: List[str] = Field(
...,
description='Array containing delivery channels.',
examples=['delivery'],
title='deliveryChannels',
)
executionHourInUtc: int = Field(
...,
description='Indicates the time future subscription orders will be generated.',
examples=[9],
title='executionHourInUtc',
)
isMultipleInstallmentsEnabledOnCreation: bool = Field(
...,
description='Defines whether or not multiple installments are enabled when a subscription is created.',
examples=[False],
title='isMultipleInstallmentsEnabledOnCreation',
)
isMultipleInstallmentsEnabledOnUpdate: bool = Field(
...,
description='Defines whether or not multiple installments are enabled when a subscription is updated.',
examples=[False],
title='isMultipleInstallmentsEnabledOnUpdate',
)
isUsingV3: bool = Field(
...,
description='Indicates whether or not Subscriptions V3 is enabled.',
examples=[True],
title='isUsingV3',
)
manualPriceAllowed: bool = Field(
...,
description='When set to `true`, this property enables manual price configuration in subscription items. This is valid for all existing subscriptions, provided that there is a manual price configured and that `isUsingV3` is `true`.',
examples=[False],
title='manualPriceAllowed',
)
onMigrationProcess: bool = Field(
...,
description='Indicates whether or not the account is in the migration process to Subscriptions V3.',
examples=[False],
title='onMigrationProcess',
)
orderCustomDataAppId: str = Field(
...,
description='When filled, this field passes along the `customData` infomration in the order to the future recurrent subscription orders.',
examples=[None],
title='orderCustomDataAppId',
)
postponeExpiration: bool = Field(
...,
description='Defines whether or not the expiration of subscriptions can be postponed.',
examples=[False],
title='postponeExpiration',
)
randomIdGeneration: bool = Field(
...,
description='Defines whether or not the subscription order IDs will be randomly generated.',
examples=[False],
title='randomIdGeneration',
)
slaOption: str = Field(
..., description='Delivery method.', examples=['NONE'], title='slaOption'
)
useItemPriceFromOriginalOrder: bool = Field(
...,
description='When set to `true`, this property enables using the manual price for each item from the original subscription order. This is only valid for new subscriptions, created from the moment this configuration is enabled. For this to work, it is mandatory that the `manualPriceAllowed` property is set to `true` and that `isUsingV3` is `true`.',
examples=[False],
title='useItemPriceFromOriginalOrder',
)
workflowVersion: str = Field(
..., description='Workflow version.', examples=['1.1'], title='workflowVersion'
)
class ShippingAddress(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
addressId: str = Field(
..., description='Shipping address ID.', examples=['8109266555005']
)
addressType: str = Field(
...,
description='Type of the address. Possible values are `residential` or `pickup`.',
examples=['residential'],
)
class From(BaseModel):
aliasMaskType: Optional[str] = Field(None, description='Alias mask type.')
conversationRelatedTo: Optional[str] = Field(
None, description='ID of the subscription related to the message.'
)
conversationSubject: Optional[str] = Field(
None, description='Subject of conversation.'
)
email: Optional[str] = Field(None, description='Email address.')
emailAlias: Optional[str] = Field(None, description='Email alias.')
name: Optional[str] = Field(None, description='Name.')
role: Optional[str] = Field(None, description='Role.')
class ToItem(BaseModel):
aliasMaskType: Optional[str] = Field(None, description='Alias mask type.')
conversationRelatedTo: Optional[str] = Field(
None, description='ID of the subscription related to the message.'
)
conversationSubject: Optional[str] = Field(
None, description='Subject of conversation.'
)
email: Optional[str] = Field(None, description='Email address.')
emailAlias: Optional[str] = Field(None, description='Email alias.')
name: Optional[str] = Field(None, description='Name.')
role: Optional[str] = Field(None, description='Role.')
class ApiRnsPubSubscriptionsSubscriptionIdConversationMessageGetResponseItem(BaseModel):
attachmentNames: Optional[List[str]] = Field(None, description='Attachment names.')
body: Optional[str] = Field(None, description="HTML content of the message's body.")
date: Optional[str] = Field(None, description='Date of message.')
firstWords: Optional[str] = Field(
None, description='First words of the message text.'
)
from_: Optional[From] = Field(
None, alias='from', description='Information regarding the message sender.'
)
hasAttachment: Optional[bool] = Field(
None, description='Indicates whether the message has at least one attachment.'
)
id: Optional[str] = Field(None, description='Message ID')
subject: Optional[str] = Field(None, description='Message subject.')
to: Optional[List[ToItem]] = Field(
None, description='Information regarding the message receivers.'
)
class ApiRnsPubSubscriptionsSubscriptionIdConversationMessageGetResponse(
RootModel[
List[ApiRnsPubSubscriptionsSubscriptionIdConversationMessageGetResponseItem]
]
):
root: List[ApiRnsPubSubscriptionsSubscriptionIdConversationMessageGetResponseItem]
class Frequency(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
interval: Optional[int] = None
periodicity: Optional[Periodicity] = None
periodicityAsString: Optional[str] = None
class LogisticsInfo(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
addressId: Optional[str] = None
deliveryWindow: Optional[LogisticsInfoDeliveryWindow] = None
itemIndex: Optional[int] = None
lockTtl: Optional[str] = None
pickupId: Optional[str] = None
price: Optional[int] = None
quantity: Optional[int] = Field(
None, description='Amount of units in the cart.', examples=[5], title='quantity'
)
selectedDeliveryChannel: Optional[str] = None
selectedSla: Optional[str] = None
shippingEstimate: Optional[str] = None
slAs: Optional[List[LogisticsInfoSLA]] = None
class OrderItem(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
attachments: Optional[List[ItemAttachment]] = None
id: Optional[str] = None
isGift: Optional[bool] = None
name: Optional[str] = None
price: Optional[int] = None
priceTags: Optional[List[PriceTag]] = None
quantity: Optional[int] = Field(
None, description='Amount of units in the cart.', examples=[5], title='quantity'
)
seller: Optional[str] = None
sellingPrice: Optional[int] = None
unitMultiplier: Optional[float] = None
class Payment(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
accountId: Optional[str] = None
bin: Optional[str] = None
cardNumber: Optional[str] = None
fields: Optional[List[PaymentField]] = None
group: Optional[str] = None
id: Optional[str] = None
installments: Optional[int] = None
parentAccountId: Optional[str] = None
paymentSystem: Optional[str] = None
referenceValue: Optional[int] = None
url: Optional[str] = None
value: Optional[int] = None
class PlanResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
frequency: FrequencyResponse
id: str
purchaseDay: PurchaseDay
validity: ValidityResponse
class PlanThinRequest(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
frequency: FrequencyRequest
id: str = Field(..., description='ID of the plan.', examples=['store.subscription'])
purchaseDay: str = Field(
...,
description='Day in which recurrent orders will be created.',
examples=['15'],
)
validity: Optional[ValidityRequest] = None
class StorePlan(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
frequencies: Optional[List[Frequency]] = None
id: Optional[str] = None
class SubscriptionCycleContext(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
addressId: Optional[str] = None
addressType: Optional[str] = None
items: Optional[List[SubscriptionCycleItemContext]] = None
paymentAccountId: Optional[str] = None
paymentSystem: Optional[str] = None
paymentSystemGroup: Optional[str] = None
paymentSystemName: Optional[str] = None
class SubscriptionCycleResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
context: Optional[SubscriptionCycleContext] = None
customerEmail: Optional[str] = None
cycleCount: Optional[int] = None
date: Optional[datetime] = None
id: Optional[str] = None
isInRetry: Optional[bool] = None
lastUpdate: Optional[datetime] = None
message: Optional[str] = None
orderInfo: Optional[SubscriptionCycleOrderInfo] = None
simulationItems: Optional[List[SimulationItemResult]] = None
status: Optional[str] = None
subscriptionId: Optional[str] = None
class SubscriptionGroupRequest(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
catalogAttachment: Optional[str] = None
customerEmail: str
items: List[SubscriptionThinItemRequest]
nextPurchaseDate: Optional[datetime] = None
plan: PlanThinRequest
purchaseSettings: PurchaseSettingsThinRequest
shippingAddress: ShippingAddress
status: Optional[str] = None
title: Optional[str] = None
class SubscriptionGroupResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
createdAt: datetime
customerEmail: str
customerId: str
cycleCount: int
id: str
isSkipped: bool
items: List[SubscriptionItemResponse]
lastPurchaseDate: Optional[datetime] = None
lastUpdate: datetime
nextPurchaseDate: datetime
plan: PlanResponse
purchaseSettings: PurchaseSettingsResponse
shippingAddress: ShippingAddressResponse
status: str
title: Optional[str] = None
class SubscriptionReport(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
account: Optional[str] = None
description: Optional[str] = None
entity: Optional[str] = None
key: Optional[str] = None
name: Optional[str] = None
params: Optional[List[SubscriptionReportParam]] = None
query: Optional[str] = None
requesterEmail: Optional[str] = None
schema_: Optional[str] = Field(None, alias='schema')
class SubscriptionUpdateRequestV3(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
isSkipped: Optional[bool] = Field(
None,
description='When set as `true`, it means the shopper asked to skip the next subscription order, and when set as `false`, no subscription order is going to be skipped.',
examples=[False],
)
plan: Optional[PlanThinRequest] = None
purchaseSettings: Optional[PurchaseSettingsThinRequest] = None
shippingAddress: Optional[ShippingAddress] = None
status: Optional[str] = Field(
None,
description='Status to which you wish to update the subscription. The accepted values are: \r\n- `ACTIVE` \r\n- `PAUSED` \r\n- `CANCELLED` \r\n- `EXPIRED` \r\n- `MISSING`',
examples=['ACTIVE'],
)
title: Optional[str] = Field(
None, description='Name of the subscription.', examples=['catFood']
)
class Transaction(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
isActive: Optional[bool] = None
payments: Optional[List[Payment]] = None
class ApiRnsPubCyclesGetResponse(RootModel[List[SubscriptionCycleResponse]]):
root: List[SubscriptionCycleResponse]
class ApiRnsPubSubscriptionsGetResponse(RootModel[List[SubscriptionGroupResponse]]):
root: List[SubscriptionGroupResponse]
class ApiRnsPvtPlansGetResponse(RootModel[List[StorePlan]]):
root: List[StorePlan]
class ApiRnsPvtReportsGetResponse(RootModel[List[SubscriptionReport]]):
root: List[SubscriptionReport]
class PaymentData(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
payments: Optional[List[Payment]] = None
transactions: Optional[List[Transaction]] = None
class SimulateResponse(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
country: Optional[str] = None
items: Optional[List[OrderItem]] = None
logisticsInfo: Optional[List[LogisticsInfo]] = None
messages: Optional[List[SimulateMessageResponse]] = None
paymentData: Optional[PaymentData] = None
postalCode: Optional[str] = None
selectableGiftsResponse: Optional[List[PurchaseContextSelectableGiftsResponse]] = (
None
)
simulationItems: Optional[List[SimulationItemResult]] = None
totals: Optional[List[TotalizationResponse]] = None
class SimulateResponseVO(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
shippingEstimate: Optional[ShippingEstimate] = None
simulateResponse: Optional[SimulateResponse] = None
simulationItems: Optional[List[SimulationItemResult]] = None
totals: Optional[List[Totalization]] = None