openapi: 3.0.0 info: title: VTex Subscriptions API (v3) description: "\r\nA **Subscription** is a list of items (SKUs) tied to certain recurring purchase settings:\r\n\r\n- User profile\r\n- Address\r\n- Payment method\r\n- Frequency\r\n- Cycle\r\n\r\nOnce you have [configured subscriptions](https://help.vtex.com/tutorial/how-to-configure-subscriptions%20--1FA9dfE7vJqxBna9Nft5Sj) in your store, the Subscriptions API allows you to create, manage and monitor your customers' subscriptions.\r\n\r\n![image](https://user-images.githubusercontent.com/77292838/213024675-9407863b-0c55-4282-9442-306352716abe.png)\r\n\r\nTo read more about the Subscriptions feature, check our article [How Subscription works](https://help.vtex.com/tutorial/how-subscriptions-work--frequentlyAskedQuestions_4453)." contact: {} version: '1.0' servers: - url: https://{accountName}.{environment}.com.br description: VTEX server URL. variables: accountName: description: Name of the VTEX account. Used as part of the URL. default: apiexamples environment: description: Environment to use. Used as part of the URL. enum: - vtexcommercestable default: vtexcommercestable paths: /api/rns/pub/cycles/{cycleId}: get: tags: - Cycles summary: VTex Get cycle details description: Retrieve a specific cycle by its ID. parameters: - name: cycleId in: path description: ID from the desired cycle. required: true schema: type: string nullable: true - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: OK content: text/plain: schema: $ref: '#/components/schemas/SubscriptionCycleResponse' application/json: schema: $ref: '#/components/schemas/SubscriptionCycleResponse' text/json: schema: $ref: '#/components/schemas/SubscriptionCycleResponse' /api/rns/pub/cycles: get: tags: - Cycles summary: VTex List cycles description: List cycles filtering by some arguments. parameters: - name: beginDate in: query description: Lower limit for the date of creation of the cycle schema: type: string nullable: true - name: endDate description: Upper limit for the date of creation of the cycle in: query schema: type: string nullable: true - name: subscriptionId description: Id from the subscription that generated the cycle in: query schema: type: string nullable: true - name: customerEmail in: query description: Customer that owns the subscription. Defaults to the current logged user schema: type: string nullable: true - name: status in: query description: Current cycle status schema: type: string nullable: true - name: page in: query description: Page used for pagination schema: type: integer format: int32 default: 1 - name: size in: query description: Page size used for pagination schema: type: integer format: int32 default: 15 - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: OK content: text/plain: schema: type: array items: $ref: '#/components/schemas/SubscriptionCycleResponse' application/json: schema: type: array items: $ref: '#/components/schemas/SubscriptionCycleResponse' text/json: schema: type: array items: $ref: '#/components/schemas/SubscriptionCycleResponse' /api/rns/pub/cycles/{cycleId}/retry: post: tags: - Cycles summary: VTex Retry cycle description: Every subscription order has an execution count called cycle, which determines the position of an order counting from when the shopper subscribed. This endpoint reruns a cycle that is currently in error state. parameters: - name: cycleId in: path description: Id from the cycle that will be retried required: true schema: type: string nullable: true - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: OK /api/rns/pvt/plans: get: tags: - Plans summary: VTex List plans description: List plans filtering by some arguments. parameters: - name: periodicity in: query description: Filter plans by available periodicity schema: type: string nullable: true - name: interval in: query description: Filter plans by available interval schema: type: string nullable: true - name: page in: query description: Page used for pagination schema: type: integer format: int32 default: 1 - name: size in: query description: Page size used for pagination schema: type: integer format: int32 default: 15 - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: Requested plans content: text/plain: schema: type: array items: $ref: '#/components/schemas/StorePlan' application/json: schema: type: array items: $ref: '#/components/schemas/StorePlan' text/json: schema: type: array items: $ref: '#/components/schemas/StorePlan' /api/rns/pvt/plans/{id}: get: tags: - Plans summary: VTex Get plan details description: This endpoint retrieves a specific plan by its ID. parameters: - name: id in: path description: Id from the desired plan required: true schema: type: string nullable: true - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: Requested plan content: text/plain: schema: $ref: '#/components/schemas/StorePlan' application/json: schema: $ref: '#/components/schemas/StorePlan' text/json: schema: $ref: '#/components/schemas/StorePlan' /api/rns/pvt/reports: get: tags: - Reports summary: VTex List report templates description: List all report templates available. parameters: - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: Requested report templates content: text/plain: schema: type: array items: $ref: '#/components/schemas/SubscriptionReport' application/json: schema: type: array items: $ref: '#/components/schemas/SubscriptionReport' text/json: schema: type: array items: $ref: '#/components/schemas/SubscriptionReport' /api/rns/pvt/reports/{reportName}/documents/{documentId}: get: tags: - Reports summary: VTex Get report document details description: Retrieve a specific report document by its Id. parameters: - name: reportName in: path required: true description: Name of the report schema: type: string nullable: true - name: documentId in: path required: true description: Id from the desired report document schema: type: string nullable: true - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: Requested report document content: text/plain: schema: $ref: '#/components/schemas/ReportResponse' application/json: schema: $ref: '#/components/schemas/ReportResponse' text/json: schema: $ref: '#/components/schemas/ReportResponse' /api/rns/pvt/reports/{reportName}/documents: post: tags: - Reports summary: VTex Generate report description: |- This endpoint creates a new report in the format of a CSV file and sends it via email. You can generate one of the following reports: - subscriptionsWithStatus - subscriptionsScheduledBetweenDate - subscriptionsUpdatedBetweenDate - subscriptionsCreatedBetweenDate - executionsBetweenDate parameters: - name: reportName in: path required: true description: |- Name of the type of report in wish to generate. The following values are accepted: - `subscriptionsWithStatus` - `subscriptionsScheduledBetweenDate` - `subscriptionsUpdatedBetweenDate` - `subscriptionsCreatedBetweenDate` - `executionsBetweenDate` schema: type: string nullable: true - name: email in: query description: The report is sent to the email in this field. schema: type: string nullable: false default: receiver@email.com - name: beginDate in: query description: Start date of the report with the format `yyyy-mm-dd`. This field is required for any type of report. schema: type: string default: '2022-09-01' - name: endDate in: query description: End date of the report with the format `yyyy-mm-dd`. This field is required for any type of report. schema: type: string default: '2022-10-01' - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: Requested report content: text/plain: schema: $ref: '#/components/schemas/ReportResponse' application/json: schema: $ref: '#/components/schemas/ReportResponse' text/json: schema: $ref: '#/components/schemas/ReportResponse' /api/rns/pub/subscriptions/{id}: get: tags: - Subscriptions summary: VTex Get subscription details description: Retrieve a specific subscription by its ID. parameters: - name: id in: path required: true description: ID from the target subscription. schema: type: string nullable: true - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: Requested subscription content: text/plain: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' application/json: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' text/json: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' patch: tags: - Subscriptions summary: VTex Update subscription description: Update a specific subscription. parameters: - name: id in: path required: true description: ID from the given subscription. schema: type: string example: '4002961' nullable: false - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json requestBody: content: application/json-patch+json: schema: $ref: '#/components/schemas/SubscriptionUpdateRequestV3' application/json: schema: $ref: '#/components/schemas/SubscriptionUpdateRequestV3' text/json: schema: $ref: '#/components/schemas/SubscriptionUpdateRequestV3' application/*+json: schema: $ref: '#/components/schemas/SubscriptionUpdateRequestV3' responses: '200': description: Subscription successfully updated content: text/plain: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' application/json: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' text/json: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' /api/rns/pub/subscriptions: get: tags: - Subscriptions summary: VTex List subscriptions description: List subscriptions filtering by some arguments. parameters: - name: customerEmail in: query description: Customer that owns the subscription. Defaults to the current logged user. schema: type: string nullable: true - name: status in: query description: Current subscription status schema: type: string nullable: true - name: addressId in: query description: Id from the address used as shipping address schema: type: string nullable: true - name: paymentId in: query description: Id from the payment used as payment method schema: type: string nullable: true - name: planId in: query description: Id from the plan that the subscription belongs to schema: type: string nullable: true - name: nextPurchaseDate in: query description: Date for the next cycle schema: type: string nullable: true - name: originalOrderId in: query description: Id from the order that generated the subscription schema: type: string nullable: true - name: page in: query description: Page used for pagination schema: type: integer format: int32 default: 1 - name: size in: query description: Page size used for pagination schema: type: integer format: int32 default: 15 - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: Requested subscriptions content: text/plain: schema: type: array items: $ref: '#/components/schemas/SubscriptionGroupResponse' application/json: schema: type: array items: $ref: '#/components/schemas/SubscriptionGroupResponse' text/json: schema: type: array items: $ref: '#/components/schemas/SubscriptionGroupResponse' post: tags: - Subscriptions summary: VTex Create subscription description: Create a new subscription. parameters: - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json requestBody: content: application/json-patch+json: schema: $ref: '#/components/schemas/SubscriptionGroupRequest' application/json: schema: $ref: '#/components/schemas/SubscriptionGroupRequest' text/json: schema: $ref: '#/components/schemas/SubscriptionGroupRequest' application/*+json: schema: $ref: '#/components/schemas/SubscriptionGroupRequest' responses: '201': description: Subscription created content: text/plain: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' application/json: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' text/json: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' /api/rns/pub/subscriptions/{id}/items/{itemId}: delete: tags: - Subscriptions summary: VTex Remove items from a subscription. description: Removes a specific item from a given subscription parameters: - name: id in: path description: Id from the target subscription required: true schema: type: string nullable: true - name: itemId in: path description: Id from the subscription item that will be removed required: true schema: type: string nullable: true - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: Success patch: tags: - Subscriptions summary: VTex Edit items on a subscription. description: Edit a given item on a specific subscription parameters: - name: id in: path required: true description: Id from the target subscription schema: type: string nullable: true - name: itemId in: path required: true description: Id from the target item schema: type: string nullable: true - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json requestBody: content: application/json-patch+json: schema: $ref: '#/components/schemas/UpdateItemInput' application/json: schema: $ref: '#/components/schemas/UpdateItemInput' text/json: schema: $ref: '#/components/schemas/UpdateItemInput' application/*+json: schema: $ref: '#/components/schemas/UpdateItemInput' responses: '200': description: Subscription updated content: text/plain: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' application/json: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' text/json: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' /api/rns/pub/subscriptions/{id}/items: post: tags: - Subscriptions summary: VTex Add item to subscription description: Add a new item to a given subscription. parameters: - name: id in: path description: ID from the target subscription required: true schema: type: string nullable: true - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json requestBody: content: application/json-patch+json: schema: $ref: '#/components/schemas/SubscriptionThinItemRequest' application/json: schema: $ref: '#/components/schemas/SubscriptionThinItemRequest' text/json: schema: $ref: '#/components/schemas/SubscriptionThinItemRequest' application/*+json: schema: $ref: '#/components/schemas/SubscriptionThinItemRequest' responses: '200': description: Subscription successfully updated content: text/plain: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' application/json: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' text/json: schema: $ref: '#/components/schemas/SubscriptionGroupResponse' /api/rns/pub/subscriptions/{id}/simulate: post: tags: - Subscriptions summary: VTex Calculate the current prices for a specific subscription description: Simulates an order made by the specific subscription on checkout and retrieves the current price for items and shipping. parameters: - name: id in: path required: true description: Id from the target subscription schema: type: string nullable: true - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: Simulation result content: text/plain: schema: $ref: '#/components/schemas/SimulateResponseVO' application/json: schema: $ref: '#/components/schemas/SimulateResponseVO' text/json: schema: $ref: '#/components/schemas/SimulateResponseVO' /api/rns/pub/subscriptions/simulate: post: tags: - Subscriptions summary: VTex Calculate the current prices for the provided subscription template description: Simulates an order made by subscriptions on checkout and retrieves the current price for items and shipping. parameters: - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json requestBody: content: application/json-patch+json: schema: $ref: '#/components/schemas/SubscriptionGroupRequest' application/json: schema: $ref: '#/components/schemas/SubscriptionGroupRequest' text/json: schema: $ref: '#/components/schemas/SubscriptionGroupRequest' application/*+json: schema: $ref: '#/components/schemas/SubscriptionGroupRequest' responses: '200': description: Simulation result content: text/plain: schema: $ref: '#/components/schemas/SimulateResponseVO' application/json: schema: $ref: '#/components/schemas/SimulateResponseVO' text/json: schema: $ref: '#/components/schemas/SimulateResponseVO' /api/rns/pub/subscriptions/{subscriptionId}/conversation-message: get: tags: - Subscriptions summary: VTex Get conversation messages description: Retrieve all conversation messages sent to a customer regarding a given subscription. parameters: - name: subscriptionId in: path description: ID of the subscription. required: true style: simple schema: type: string default: 123456789abc - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string example: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string example: application/json responses: '200': description: '' content: application/json: schema: type: array items: type: object properties: id: type: string description: Message ID from: type: object description: Information regarding the message sender. properties: conversationRelatedTo: type: string description: ID of the subscription related to the message. conversationSubject: type: string description: Subject of conversation. emailAlias: type: string description: Email alias. aliasMaskType: type: string description: Alias mask type. email: type: string description: Email address. name: type: string description: Name. role: type: string description: Role. to: type: array description: Information regarding the message receivers. items: type: object properties: conversationRelatedTo: type: string description: ID of the subscription related to the message. conversationSubject: type: string description: Subject of conversation. emailAlias: type: string description: Email alias. aliasMaskType: type: string description: Alias mask type. email: type: string description: Email address. name: type: string description: Name. role: type: string description: Role. subject: type: string description: Message subject. firstWords: type: string description: First words of the message text. body: type: string description: HTML content of the message's body. hasAttachment: type: boolean description: Indicates whether the message has at least one attachment. attachmentNames: type: array description: Attachment names. items: type: string date: type: string description: Date of message. example: - id: string from: conversationRelatedTo: string conversationSubject: string emailAlias: string aliasMaskType: string email: string name: string role: string to: - conversationRelatedTo: string conversationSubject: string emailAlias: string aliasMaskType: string email: string name: string role: string subject: string firstWords: string body: string hasAttachment: true attachmentNames: - string date: '2021-08-31T22:50:53.564Z' /api/rns/settings: get: tags: - Settings summary: VTex Get Subscription Settings description: List the details of the settings of a given subscription. operationId: GetSettings parameters: - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string default: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string default: application/json responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/settings' deprecated: false post: tags: - Settings summary: VTex Edit Subscriptions settings description: Edits Subscriptions settings in your store. operationId: EditSettings parameters: - name: Content-Type in: header description: Type of the content being sent. required: true style: simple schema: type: string default: application/json - name: Accept in: header description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand. required: true style: simple schema: type: string default: application/json requestBody: description: Request body content: application/json: schema: $ref: '#/components/schemas/settings' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/settings' deprecated: false security: - appKey: [] appToken: [] tags: - name: Cycles - name: Plans - name: Reports - name: Settings - name: Subscriptions components: securitySchemes: appKey: type: apiKey in: header name: X-VTEX-API-AppKey appToken: type: apiKey in: header name: X-VTEX-API-AppToken schemas: SubscriptionCycleOrderInfo: type: object properties: orderId: type: string nullable: true orderGroup: type: string nullable: true paymentURL: type: string nullable: true value: type: integer format: int64 additionalProperties: false Status: enum: - 0 - 1 - 2 - 3 type: integer format: int32 SubscriptionCycleItemContext: type: object properties: subscriptionItemId: type: string nullable: true skuId: type: string nullable: true title: skuId description: SKU ID. example: '12' quantity: type: integer format: int32 title: quantity description: Amount of units in the cart. example: 5 status: $ref: '#/components/schemas/Status' isSkipped: type: boolean cycleCount: type: integer format: int32 additionalProperties: false SubscriptionCycleContext: type: object properties: items: type: array items: $ref: '#/components/schemas/SubscriptionCycleItemContext' nullable: true paymentSystem: type: string nullable: true paymentSystemName: type: string nullable: true paymentSystemGroup: type: string nullable: true paymentAccountId: type: string nullable: true addressId: type: string nullable: true addressType: type: string nullable: true additionalProperties: false ItemSimulationStatus: enum: - 0 - 1 - 2 - 3 - 4 type: integer format: int32 SimulationItemResult: type: object properties: id: type: string nullable: true quantity: type: integer format: int32 title: quantity description: Amount of units in the cart. example: 5 unitPrice: type: integer format: int64 nullable: true status: $ref: '#/components/schemas/ItemSimulationStatus' statusName: type: string nullable: true additionalProperties: false SubscriptionCycleResponse: type: object properties: id: type: string nullable: true subscriptionId: type: string nullable: true status: type: string nullable: true customerEmail: type: string nullable: true date: type: string format: date-time lastUpdate: type: string format: date-time cycleCount: type: integer format: int32 isInRetry: type: boolean message: type: string nullable: true orderInfo: $ref: '#/components/schemas/SubscriptionCycleOrderInfo' context: $ref: '#/components/schemas/SubscriptionCycleContext' simulationItems: type: array items: $ref: '#/components/schemas/SimulationItemResult' nullable: true additionalProperties: false Periodicity: enum: - 0 - 1 - 2 - 3 - 4 type: integer format: int32 Frequency: type: object properties: periodicityAsString: type: string nullable: true periodicity: $ref: '#/components/schemas/Periodicity' interval: type: integer format: int32 additionalProperties: false StorePlan: type: object properties: id: type: string nullable: true frequencies: type: array items: $ref: '#/components/schemas/Frequency' nullable: true additionalProperties: false SubscriptionReportParam: type: object properties: name: type: string nullable: true type: type: string nullable: true value: nullable: true additionalProperties: false SubscriptionReport: type: object properties: account: type: string nullable: true key: type: string nullable: true name: type: string nullable: true description: type: string nullable: true requesterEmail: type: string nullable: true entity: type: string nullable: true schema: type: string nullable: true query: type: string nullable: true params: type: array items: $ref: '#/components/schemas/SubscriptionReportParam' nullable: true additionalProperties: false ReportResponse: type: object properties: id: type: string nullable: true finished: type: boolean recordsProcessed: type: integer format: int64 readOnly: true recordsSum: type: integer format: int64 nullable: true startDate: type: string format: date-time nullable: true lastUpdateTime: type: string format: date-time nullable: true completedDate: type: string format: date-time nullable: true errorCount: type: integer format: int64 nullable: true percentageProcessed: type: integer format: int64 enqueueDate: type: string format: date-time nullable: true email: type: string nullable: true canceled: type: boolean outputType: type: string nullable: true zipped: type: boolean linkToDownload: type: string nullable: true lastErrorMessage: type: string nullable: true statusMessage: type: string nullable: true readOnly: true additionalProperties: false FrequencyResponse: title: Frequency required: - interval - periodicity type: object properties: periodicity: type: string nullable: true interval: type: integer format: int32 additionalProperties: false ValidityResponse: title: Validity required: - begin type: object properties: begin: type: string format: date-time end: type: string format: date-time nullable: true additionalProperties: false PurchaseDay: enum: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 - 999 - -6 - -5 - -4 - -3 - -2 - -1 type: integer format: int32 PlanResponse: title: Plan required: - frequency - id - purchaseDay - validity type: object properties: id: type: string nullable: true frequency: $ref: '#/components/schemas/FrequencyResponse' validity: $ref: '#/components/schemas/ValidityResponse' purchaseDay: $ref: '#/components/schemas/PurchaseDay' additionalProperties: false ShippingAddressResponse: title: Address required: - addressId - addressType type: object properties: addressId: type: string nullable: true addressType: type: string nullable: true additionalProperties: false PaymentMethodResponse: title: PaymentMethod required: - paymentSystem type: object properties: paymentAccountId: type: string nullable: true paymentSystem: type: string nullable: true installments: type: integer format: int32 nullable: true additionalProperties: false PurchaseSettingsResponse: title: PurchaseSettings required: - currencyCode - paymentMethod type: object properties: paymentMethod: $ref: '#/components/schemas/PaymentMethodResponse' currencyCode: type: string nullable: true additionalProperties: false SubscriptionItemResponse: title: SubscriptionItem required: - id - isSkipped - quantity - skuId - status type: object properties: id: type: string nullable: true skuId: type: string nullable: true title: skuId description: SKU ID. example: '12' quantity: type: integer format: int32 title: quantity description: Amount of units in the cart. example: 5 isSkipped: type: boolean status: type: string nullable: true manualPrice: type: integer format: int32 title: manualPrice description: Manual price. default: nullable: true example: 40 originalOrderId: type: string nullable: true additionalProperties: false SubscriptionGroupResponse: title: Subscription required: - createdAt - customerEmail - customerId - cycleCount - id - isSkipped - items - lastUpdate - nextPurchaseDate - plan - purchaseSettings - shippingAddress - status type: object properties: id: type: string nullable: true customerId: type: string nullable: true customerEmail: type: string nullable: true title: type: string nullable: true status: type: string nullable: true isSkipped: type: boolean nextPurchaseDate: type: string format: date-time lastPurchaseDate: type: string format: date-time nullable: true plan: $ref: '#/components/schemas/PlanResponse' shippingAddress: $ref: '#/components/schemas/ShippingAddressResponse' purchaseSettings: $ref: '#/components/schemas/PurchaseSettingsResponse' cycleCount: type: integer format: int32 createdAt: type: string format: date-time lastUpdate: type: string format: date-time items: type: array items: $ref: '#/components/schemas/SubscriptionItemResponse' nullable: true additionalProperties: false FrequencyRequest: required: - interval - periodicity type: object description: Information about subscriptions' recurrence. properties: periodicity: type: string nullable: true description: "Defines the subscriptions recurrence period. The possible values are: \r\n- `DAILY` \r\n- `WEEKLY` \r\n- `MONTHLY` \r\n- `YEARLY`" example: MONTHLY interval: type: integer format: int32 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. example: 3 additionalProperties: false ValidityRequest: type: object description: Information about the period during which the subscription will be valid. properties: begin: type: string nullable: true description: Subscription's beginning date with the format `yyyy-mm-ddThh:mm:ss`. example: '2022-06-10T00:00:00' end: type: string nullable: true description: Subscription's ending date with the format `yyyy-mm-ddThh:mm:ss`. example: '2023-06-10T00:00:00' additionalProperties: false PlanThinRequest: title: PlanRequest description: Information about the plan. required: - frequency - id - purchaseDay type: object properties: id: type: string nullable: true description: ID of the plan. example: store.subscription frequency: $ref: '#/components/schemas/FrequencyRequest' validity: $ref: '#/components/schemas/ValidityRequest' purchaseDay: type: string description: Day in which recurrent orders will be created. nullable: true example: '15' additionalProperties: false shippingAddress: title: shippingAddress required: - addressId - addressType type: object properties: addressId: type: string nullable: true description: Shipping address ID. example: '8109266555005' addressType: type: string nullable: true description: Type of the address. Possible values are `residential` or `pickup`. example: residential additionalProperties: false PaymentMethodThinRequest: title: PaymentMethodRequest description: Object containing information about the payment method. required: - paymentSystem type: object properties: paymentAccountId: type: string nullable: true 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). example: '340357032569595' paymentSystem: type: string description: Payment system's ID. nullable: true example: '4' installments: type: integer format: int32 description: Number of payment installments. nullable: true example: 3 additionalProperties: false PurchaseSettingsThinRequest: title: PurchaseSettingsRequest description: Object containing purchase settings information. required: - paymentMethod - salesChannel type: object properties: paymentMethod: $ref: '#/components/schemas/PaymentMethodThinRequest' salesChannel: type: string 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`. default: '1' additionalProperties: false SubscriptionUpdateRequestV3: title: SubscriptionUpdateRequest type: object properties: title: type: string nullable: true description: Name of the subscription. example: catFood status: type: string nullable: true description: "Status to which you wish to update the subscription. The accepted values are: \r\n- `ACTIVE` \r\n- `PAUSED` \r\n- `CANCELED` \r\n- `EXPIRED` \r\n- `MISSING`" example: ACTIVE isSkipped: type: boolean nullable: true 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. example: false plan: $ref: '#/components/schemas/PlanThinRequest' shippingAddress: $ref: '#/components/schemas/shippingAddress' purchaseSettings: $ref: '#/components/schemas/PurchaseSettingsThinRequest' additionalProperties: false SubscriptionThinItemRequest: type: object properties: skuId: type: string nullable: true title: skuId description: SKU ID. example: '12' quantity: type: integer format: int32 title: quantity description: Amount of units in the cart. example: 5 manualPrice: type: integer format: int32 title: manualPrice description: Manual price. default: nullable: true example: 40 additionalProperties: false SubscriptionGroupRequest: title: SubscriptionRequest required: - customerEmail - items - plan - purchaseSettings - shippingAddress type: object properties: customerEmail: type: string nullable: true title: type: string nullable: true status: type: string nullable: true nextPurchaseDate: type: string format: date-time nullable: true catalogAttachment: type: string nullable: true plan: $ref: '#/components/schemas/PlanThinRequest' shippingAddress: $ref: '#/components/schemas/shippingAddress' purchaseSettings: $ref: '#/components/schemas/PurchaseSettingsThinRequest' items: type: array items: $ref: '#/components/schemas/SubscriptionThinItemRequest' nullable: true additionalProperties: false UpdateItemInput: type: object properties: status: type: string nullable: true isSkipped: type: boolean nullable: true quantity: type: integer format: int32 title: quantity description: Amount of units in the cart. example: 5 manualPrice: type: integer format: int32 title: manualPrice description: Manual price. default: nullable: true example: 40 additionalProperties: false ItemAttachment: type: object properties: name: type: string nullable: true content: type: object additionalProperties: type: string nullable: true additionalProperties: false PriceTag: type: object properties: name: type: string nullable: true valueAsInt: type: integer format: int64 rawValue: type: number format: double isPercentual: type: boolean identifier: type: string nullable: true additionalProperties: false OrderItem: type: object properties: id: type: string nullable: true seller: type: string nullable: true quantity: type: integer format: int32 title: quantity description: Amount of units in the cart. example: 5 price: type: integer format: int64 nullable: true sellingPrice: type: integer format: int64 nullable: true unitMultiplier: type: number format: double nullable: true attachments: type: array items: $ref: '#/components/schemas/ItemAttachment' nullable: true name: type: string nullable: true isGift: type: boolean priceTags: type: array items: $ref: '#/components/schemas/PriceTag' nullable: true additionalProperties: false LogisticsInfoDeliveryWindow: type: object properties: startDateUtc: type: string format: date-time endDateUtc: type: string format: date-time price: type: integer format: int64 additionalProperties: false LogisticsInfoSLA: type: object properties: id: type: string nullable: true pickupPointId: type: string nullable: true deliveryChannel: type: string nullable: true price: type: integer format: int32 shippingEstimate: type: string nullable: true lockTtl: type: string nullable: true deliveryWindows: type: array items: $ref: '#/components/schemas/LogisticsInfoDeliveryWindow' nullable: true availableDeliveryWindows: type: array items: $ref: '#/components/schemas/LogisticsInfoDeliveryWindow' nullable: true additionalProperties: false LogisticsInfo: type: object properties: itemIndex: type: integer format: int32 quantity: type: integer format: int32 title: quantity description: Amount of units in the cart. example: 5 selectedSla: type: string nullable: true selectedDeliveryChannel: type: string nullable: true lockTtl: type: string nullable: true shippingEstimate: type: string nullable: true addressId: type: string nullable: true pickupId: type: string nullable: true price: type: integer format: int32 deliveryWindow: $ref: '#/components/schemas/LogisticsInfoDeliveryWindow' slAs: type: array items: $ref: '#/components/schemas/LogisticsInfoSLA' nullable: true additionalProperties: false PaymentField: type: object properties: name: type: string nullable: true value: type: string nullable: true additionalProperties: false Payment: type: object properties: id: type: string nullable: true paymentSystem: type: string nullable: true group: type: string nullable: true bin: type: string nullable: true accountId: type: string nullable: true parentAccountId: type: string nullable: true referenceValue: type: integer format: int64 value: type: integer format: int64 installments: type: integer format: int32 url: type: string nullable: true cardNumber: type: string nullable: true fields: type: array items: $ref: '#/components/schemas/PaymentField' nullable: true additionalProperties: false Transaction: type: object properties: isActive: type: boolean payments: type: array items: $ref: '#/components/schemas/Payment' nullable: true additionalProperties: false PaymentData: type: object properties: payments: type: array items: $ref: '#/components/schemas/Payment' nullable: true transactions: type: array items: $ref: '#/components/schemas/Transaction' nullable: true additionalProperties: false SimulateMessageResponse: type: object properties: code: type: string nullable: true status: type: string nullable: true text: type: string nullable: true additionalProperties: false PurchaseContextAvailableGiftResponse: type: object properties: id: type: string nullable: true seller: type: string nullable: true quantity: type: integer format: int32 title: quantity description: Amount of units in the cart. example: 5 price: type: integer format: int64 nullable: true sellingPrice: type: integer format: int64 nullable: true unitMultiplier: type: number format: double nullable: true attachments: type: array items: $ref: '#/components/schemas/ItemAttachment' nullable: true name: type: string nullable: true isGift: type: boolean priceTags: type: array items: $ref: '#/components/schemas/PriceTag' nullable: true isSelected: type: boolean additionalProperties: false PurchaseContextSelectableGiftsResponse: type: object properties: id: type: string nullable: true availableQuantity: type: integer format: int32 availableGifts: type: array items: $ref: '#/components/schemas/PurchaseContextAvailableGiftResponse' nullable: true additionalProperties: false TotalizationResponse: type: object properties: id: type: string nullable: true name: type: string nullable: true valueAsInt: type: integer format: int64 additionalProperties: false SimulateResponse: type: object properties: items: type: array items: $ref: '#/components/schemas/OrderItem' nullable: true logisticsInfo: type: array items: $ref: '#/components/schemas/LogisticsInfo' nullable: true paymentData: $ref: '#/components/schemas/PaymentData' country: type: string nullable: true postalCode: type: string nullable: true messages: type: array items: $ref: '#/components/schemas/SimulateMessageResponse' nullable: true selectableGiftsResponse: type: array items: $ref: '#/components/schemas/PurchaseContextSelectableGiftsResponse' nullable: true totals: type: array items: $ref: '#/components/schemas/TotalizationResponse' nullable: true simulationItems: type: array items: $ref: '#/components/schemas/SimulationItemResult' nullable: true additionalProperties: false ShippingEstimate: type: object properties: name: type: string nullable: true estimate: type: string nullable: true estimateDeliveryDate: type: string format: date-time nullable: true nextPurchaseDate: type: string format: date-time allItemsMatched: type: boolean additionalProperties: false Totalization: type: object properties: id: type: string nullable: true value: type: number format: double additionalProperties: false SimulateResponseVO: type: object properties: simulateResponse: $ref: '#/components/schemas/SimulateResponse' shippingEstimate: $ref: '#/components/schemas/ShippingEstimate' simulationItems: type: array items: $ref: '#/components/schemas/SimulationItemResult' nullable: true totals: type: array items: $ref: '#/components/schemas/Totalization' nullable: true additionalProperties: false settings: title: '' description: Subscriptions settings type: object required: - slaOption - defaultSla - isUsingV3 - onMigrationProcess - executionHourInUtc - workflowVersion - deliveryChannels - randomIdGeneration - isMultipleInstallmentsEnabledOnCreation - isMultipleInstallmentsEnabledOnUpdate - orderCustomDataAppId - postponeExpiration - manualPriceAllowed - useItemPriceFromOriginalOrder properties: slaOption: title: slaOption description: Delivery method. type: string default: '' example: NONE defaultSla: title: defaultSla description: Default delivery method. type: string default: nullable: true example: isUsingV3: title: isUsingV3 description: Indicates whether or not Subscriptions V3 is enabled. type: boolean default: false example: true onMigrationProcess: title: onMigrationProcess description: Indicates whether or not the account is in the migration process to Subscriptions V3. type: boolean default: false example: false executionHourInUtc: title: executionHourInUtc description: Indicates the time future subscription orders will be generated. type: integer default: 0 example: 9 workflowVersion: title: workflowVersion description: Workflow version. type: string default: '' example: '1.1' deliveryChannels: title: deliveryChannels description: Array containing delivery channels. type: array default: [] items: title: '' description: 'Type of delivery channel. The values that are possible are: `pickupInPoint` for pickup point and `delivery` for regular delivery.' type: string example: delivery example: delivery randomIdGeneration: title: randomIdGeneration description: Defines whether or not the subscription order IDs will be randomly generated. type: boolean default: false example: false isMultipleInstallmentsEnabledOnCreation: title: isMultipleInstallmentsEnabledOnCreation description: Defines whether or not multiple installments are enabled when a subscription is created. type: boolean default: false example: false isMultipleInstallmentsEnabledOnUpdate: title: isMultipleInstallmentsEnabledOnUpdate description: Defines whether or not multiple installments are enabled when a subscription is updated. type: boolean default: false example: false orderCustomDataAppId: title: orderCustomDataAppId description: When filled, this field passes along the `customData` infomration in the order to the future recurrent subscription orders. type: string default: example: postponeExpiration: title: postponeExpiration description: Defines whether or not the expiration of subscriptions can be postponed. type: boolean default: false example: false manualPriceAllowed: title: manualPriceAllowed 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`. type: boolean default: false example: false useItemPriceFromOriginalOrder: title: useItemPriceFromOriginalOrder 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`. type: boolean default: false example: false example: - slaOption: NONE defaultSla: isUsingV3: true onMigrationProcess: false executionHourInUtc: 9 workflowVersion: '1.1' deliveryChannels: - delivery randomIdGeneration: false isMultipleInstallmentsEnabledOnCreation: false isMultipleInstallmentsEnabledOnUpdate: false orderCustomDataAppId: postponeExpiration: false manualPriceAllowed: false useItemPriceFromOriginalOrder: false