diff --git a/commerce/types.ts b/commerce/types.ts index 81967c7be..c922b99fe 100644 --- a/commerce/types.ts +++ b/commerce/types.ts @@ -409,7 +409,29 @@ export interface Person extends Omit { image?: ImageObject[] | null; /** The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ taxID?: string; + /** The telephone number. */ + telephone?: string; + /** The birth date of the person. */ + birthDate?: string; + /** User's corporate name */ + corporateName?: string; + /** User's corporate document */ + corporateDocument?: string; + /** User's corporate trade name */ + tradeName?: string; + /** User's business phone */ + businessPhone?: string; + /** Whether the user is a corporation or not */ + isCorporate?: boolean; + /** Custom fields */ + customFields?: CustomFields[]; +} + +interface CustomFields { + key: string; + value: string; } + // NON SCHEMA.ORG Compliant. Should be removed ASAP export interface Author extends Omit { "@type": "Author"; @@ -593,6 +615,25 @@ export interface PostalAddress extends Omit { /** The street address. For example, 1600 Amphitheatre Pkwy. */ streetAddress?: string; } + +export interface PostalAddressVTEX extends Omit { + "@type": "PostalAddress"; + /** The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */ + addressCountry?: string; + /** The locality in which the street address is, and which is in the region. For example, Mountain View. */ + addressLocality?: string; + /** The region in which the locality is, and which is in the country. For example, California. */ + addressRegion?: string; + /** The postal code. For example, 94043. */ + postalCode?: string; + /** The street address. For example, 1600 Amphitheatre Pkwy. */ + streetAddress?: string; + receiverName: string | null; + addressName?: string; + complement: string | null; + addressId: string; +} + export interface LocationFeatureSpecification extends Omit { "@type": "LocationFeatureSpecification"; diff --git a/power-reviews/loaders/productListingPage.ts b/power-reviews/loaders/productListingPage.ts index 43c090dc9..12941e798 100644 --- a/power-reviews/loaders/productListingPage.ts +++ b/power-reviews/loaders/productListingPage.ts @@ -52,17 +52,27 @@ export default function productListingPage( }) ); - const fullReviewsResponse = await Promise.all(fullReviewsPromises); + const fullReviewsResponse = await Promise.allSettled(fullReviewsPromises); - const fullReviewsResults = await Promise.all( - fullReviewsResponse.map((review) => review.json()), + const fullReviewsResults = await Promise.allSettled( + fullReviewsResponse.map((response) => { + if (response.status === "fulfilled") { + return response.value.json(); + } else { + return null; + } + }), ); - const productsExtendeds = fullReviewsResults.map((review, idx) => { - return { - ...products[idx], - aggregateRating: toAggregateRating(review.results[0].rollup), - }; + const productsExtendeds = fullReviewsResults.map((result, idx) => { + if (result.status === "fulfilled" && result.value) { + return { + ...products[idx], + aggregateRating: toAggregateRating(result.value.results[0].rollup), + }; + } else { + return products[idx]; + } }); return { diff --git a/shopify/utils/storefront/storefront.graphql.gen.ts b/shopify/utils/storefront/storefront.graphql.gen.ts index 29eee4c5c..86f5fad6b 100644 --- a/shopify/utils/storefront/storefront.graphql.gen.ts +++ b/shopify/utils/storefront/storefront.graphql.gen.ts @@ -7789,6 +7789,17 @@ export type AddItemToCartMutationVariables = Exact<{ export type AddItemToCartMutation = { payload?: { cart?: { id: string, checkoutUrl: any, totalQuantity: number, lines: { nodes: Array<{ id: string, quantity: number, merchandise: { id: string, title: string, image?: { url: any, altText?: string | null } | null, product: { title: string, onlineStoreUrl?: any | null, handle: string }, price: { amount: any, currencyCode: CurrencyCode } }, discountAllocations: Array<{ code: string, discountedAmount: { amount: any, currencyCode: CurrencyCode } } | {}>, cost: { totalAmount: { amount: any, currencyCode: CurrencyCode }, subtotalAmount: { amount: any, currencyCode: CurrencyCode }, amountPerQuantity: { amount: any, currencyCode: CurrencyCode }, compareAtAmountPerQuantity?: { amount: any, currencyCode: CurrencyCode } | null } } | { id: string, quantity: number, merchandise: { id: string, title: string, image?: { url: any, altText?: string | null } | null, product: { title: string, onlineStoreUrl?: any | null, handle: string }, price: { amount: any, currencyCode: CurrencyCode } }, discountAllocations: Array<{ code: string, discountedAmount: { amount: any, currencyCode: CurrencyCode } } | {}>, cost: { totalAmount: { amount: any, currencyCode: CurrencyCode }, subtotalAmount: { amount: any, currencyCode: CurrencyCode }, amountPerQuantity: { amount: any, currencyCode: CurrencyCode }, compareAtAmountPerQuantity?: { amount: any, currencyCode: CurrencyCode } | null } }> }, cost: { totalTaxAmount?: { amount: any, currencyCode: CurrencyCode } | null, subtotalAmount: { amount: any, currencyCode: CurrencyCode }, totalAmount: { amount: any, currencyCode: CurrencyCode }, checkoutChargeAmount: { amount: any, currencyCode: CurrencyCode } }, discountCodes: Array<{ code: string, applicable: boolean }>, discountAllocations: Array<{ discountedAmount: { amount: any, currencyCode: CurrencyCode } } | { discountedAmount: { amount: any, currencyCode: CurrencyCode } } | { discountedAmount: { amount: any, currencyCode: CurrencyCode } }> } | null } | null }; +export type RegisterAccountMutationVariables = Exact<{ + email: Scalars['String']['input']; + password: Scalars['String']['input']; + firstName?: InputMaybe; + lastName?: InputMaybe; + acceptsMarketing?: InputMaybe; +}>; + + +export type RegisterAccountMutation = { customerCreate?: { customer?: { id: string } | null, customerUserErrors: Array<{ code?: CustomerErrorCode | null, message: string }> } | null }; + export type AddCouponMutationVariables = Exact<{ cartId: Scalars['ID']['input']; discountCodes: Array | Scalars['String']['input']; diff --git a/vtex/actions/address/createAddress.ts b/vtex/actions/address/createAddress.ts new file mode 100644 index 000000000..af849c53a --- /dev/null +++ b/vtex/actions/address/createAddress.ts @@ -0,0 +1,67 @@ +import { AppContext } from "../../mod.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; + +interface AddressInput { + name?: string; + addressName: string; + addressType?: string; + city?: string; + complement?: string; + country?: string; + geoCoordinates?: number[]; + neighborhood?: string; + number?: string; + postalCode?: string; + receiverName?: string; + reference?: string; + state?: string; + street?: string; +} + +interface SavedAddress { + id: string; + cacheId: string; +} + +async function action( + props: AddressInput, + req: Request, + ctx: AppContext, +): Promise< + | SavedAddress + | null +> { + const { io } = ctx; + const { cookie } = parseCookie(req.headers, ctx.account); + + const mutation = ` + mutation SaveAddress($address: AddressInput!) { + saveAddress(address: $address) @context(provider: "vtex.store-graphql") { + id + cacheId + } + }`; + + try { + const { saveAddress: savedAddress } = await io.query< + { saveAddress: SavedAddress }, + { address: AddressInput } + >( + { + query: mutation, + operationName: "SaveAddress", + variables: { + address: props, + }, + }, + { headers: { cookie } }, + ); + + return savedAddress; + } catch (error) { + console.error("Error saving address:", error); + return null; + } +} + +export default action; diff --git a/vtex/actions/address/deleteAddress.ts b/vtex/actions/address/deleteAddress.ts new file mode 100644 index 000000000..760afd133 --- /dev/null +++ b/vtex/actions/address/deleteAddress.ts @@ -0,0 +1,58 @@ +import { AppContext } from "../../mod.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; + +interface DeleteAddress { + addressId: string; +} + +interface AddressInput { + addressId: string; +} + +async function action( + { addressId }: AddressInput, + req: Request, + ctx: AppContext, +) { + const { io } = ctx; + const { cookie } = parseCookie(req.headers, ctx.account); + + const mutation = ` + mutation DeleteAddress($addressId: String) { + deleteAddress(id: $addressId) { + cacheId + addresses: address { + addressId: id + addressType + addressName + city + complement + country + neighborhood + number + postalCode + geoCoordinates + receiverName + reference + state + street + } + } + }`; + + try { + return await io.query( + { + query: mutation, + operationName: "DeleteAddress", + variables: { addressId }, + }, + { headers: { cookie } }, + ); + } catch (error) { + console.error("Error deleting address:", error); + return null; + } +} + +export default action; diff --git a/vtex/actions/address/updateAddress.ts b/vtex/actions/address/updateAddress.ts new file mode 100644 index 000000000..136ed41bc --- /dev/null +++ b/vtex/actions/address/updateAddress.ts @@ -0,0 +1,92 @@ +import { PostalAddressVTEX } from "../../../commerce/types.ts"; +import { AppContext } from "../../mod.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; + +interface Address { + name?: string; + addressName?: string; + addressType?: string; + city?: string; + complement: string | null; + country?: string; + geoCoordinates?: number[]; + neighborhood?: string; + number?: string; + postalCode?: string; + receiverName: string | null; + reference?: string; + state?: string; + street?: string; + addressId: string; +} + +async function action( + props: Address, + req: Request, + ctx: AppContext, +): Promise< + | PostalAddressVTEX + | null +> { + const { io } = ctx; + const { cookie } = parseCookie(req.headers, ctx.account); + const { addressId, ...addressFields } = props; + + const mutation = ` + mutation UpdateAddress($addressId: String!, $addressFields: AddressInput) { + updateAddress(id: $addressId, fields: $addressFields) + @context(provider: "vtex.store-graphql") { + cacheId + addresses: address { + addressId: id + addressType + addressName + city + complement + country + neighborhood + number + postalCode + geoCoordinates + receiverName + reference + state + street + } + } + } + `; + + try { + const { updateAddress: updatedAddress } = await io.query< + { updateAddress: Address }, + { addressId: string; addressFields: Omit } + >( + { + query: mutation, + operationName: "UpdateAddress", + variables: { + addressId, + addressFields, + }, + }, + { headers: { cookie } }, + ); + + return { + "@type": "PostalAddress", + addressCountry: updatedAddress?.country, + addressLocality: updatedAddress?.city, + addressRegion: updatedAddress?.state, + postalCode: updatedAddress?.postalCode, + streetAddress: updatedAddress?.street, + receiverName: updatedAddress?.receiverName, + complement: updatedAddress?.complement, + addressId: updatedAddress?.addressId, + }; + } catch (error) { + console.error("Error updating address:", error); + return null; + } +} +export default action; diff --git a/vtex/actions/payments/delete.ts b/vtex/actions/payments/delete.ts new file mode 100644 index 000000000..341ecee37 --- /dev/null +++ b/vtex/actions/payments/delete.ts @@ -0,0 +1,39 @@ +import { AppContext } from "../../mod.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; + +export interface DeleteCard { + deletePaymentToken: boolean; +} + +interface Props { + id: string; +} + +async function loader( + { id }: Props, + req: Request, + ctx: AppContext, +): Promise { + const { io } = ctx; + const { cookie, payload } = parseCookie(req.headers, ctx.account); + + if (!payload?.sub || !payload?.userId) { + return null; + } + + const mutation = `mutation DeleteCreditCardToken($tokenId: ID!) { + deletePaymentToken(tokenId: $tokenId) @context(provider: "vtex.my-cards-graphql@2.x") + }`; + + try { + return await io.query({ + query: mutation, + variables: { tokenId: id }, + }, { headers: { cookie } }); + } catch (e) { + console.error(e); + return null; + } +} + +export default loader; diff --git a/vtex/actions/profile/newsletterProfile.ts b/vtex/actions/profile/newsletterProfile.ts new file mode 100644 index 000000000..1f14b6403 --- /dev/null +++ b/vtex/actions/profile/newsletterProfile.ts @@ -0,0 +1,60 @@ +import { AppContext } from "../../mod.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; + +interface NewsletterInput { + email: string; + isNewsletterOptIn: boolean; +} + +const newsletterProfile = async ( + props: NewsletterInput, + req: Request, + ctx: AppContext, +): Promise => { + const { io } = ctx; + const { cookie } = parseCookie(req.headers, ctx.account); + + if (!props?.email) { + console.error("User profile not found or email is missing:", props.email); + return null; + } + + const mutation = ` + mutation SubscribeNewsletter($email: String!, $isNewsletterOptIn: Boolean!) { + subscribeNewsletter(email: $email, isNewsletterOptIn: $isNewsletterOptIn) + @context(provider: "vtex.store-graphql@2.x") + } + `; + + const variables = { + email: props.email, + isNewsletterOptIn: props.isNewsletterOptIn, + }; + + try { + await io.query<{ subscribeNewsletter: boolean }, unknown>( + { + query: mutation, + operationName: "SubscribeNewsletter", + variables, + }, + { + headers: { + cookie, + }, + }, + ); + + const result = await ctx.invoke("vtex/loaders/user.ts"); + const newsletterField = result?.customFields?.find((field) => + field.key === "isNewsletterOptIn" + ); + + return newsletterField?.value === "true"; + } catch (error) { + console.error("Error subscribing to newsletter:", error); + return null; + } +}; + +export default newsletterProfile; diff --git a/vtex/actions/profile/updateProfile.ts b/vtex/actions/profile/updateProfile.ts new file mode 100644 index 000000000..17c4f724b --- /dev/null +++ b/vtex/actions/profile/updateProfile.ts @@ -0,0 +1,93 @@ +import { AppContext } from "../../mod.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; +import { Person } from "../../../commerce/types.ts"; +import type { User } from "../../loaders/user.ts"; + +export interface UserMutation { + firstName?: string; + lastName?: string; + email?: string; + homePhone?: string | null; + gender?: string | null; + birthDate?: string | null; + corporateName?: string | null; + tradeName?: string | null; + businessPhone?: string | null; + isCorporate?: boolean; +} + +const updateProfile = async ( + props: UserMutation, + req: Request, + ctx: AppContext, +): Promise => { + const { io } = ctx; + const { cookie } = parseCookie(req.headers, ctx.account); + + if (!props?.email) { + console.error("User profile not found or email is missing:", props.email); + return null; + } + const mutation = ` + mutation UpdateProfile($input: ProfileInput!) { + updateProfile(fields: $input) @context(provider: "vtex.store-graphql") { + cacheId + firstName + lastName + birthDate + gender + homePhone + businessPhone + document + email + tradeName + corporateName + corporateDocument + stateRegistration + isCorporate + } + } + `; + + try { + const { updateProfile: updatedUser } = await io.query< + { updateProfile: User }, + { input: UserMutation } + >( + { + query: mutation, + operationName: "UpdateProfile", + variables: { + input: { + ...props, + email: props.email, + }, + }, + }, + { headers: { cookie } }, + ); + + return { + "@id": updatedUser?.userId ?? updatedUser.id, + email: updatedUser.email, + givenName: updatedUser?.firstName, + familyName: updatedUser?.lastName, + taxID: updatedUser?.document?.replace(/[^\d]/g, ""), + gender: updatedUser?.gender === "female" + ? "https://schema.org/Female" + : "https://schema.org/Male", + telephone: updatedUser?.homePhone, + birthDate: updatedUser?.birthDate, + corporateName: updatedUser?.tradeName, + corporateDocument: updatedUser?.corporateDocument, + businessPhone: updatedUser?.businessPhone, + isCorporate: updatedUser?.isCorporate, + customFields: updatedUser?.customFields, + }; + } catch (error) { + console.error("Error updating user profile:", error); + return null; + } +}; + +export default updateProfile; diff --git a/vtex/actions/sessions/delete.ts b/vtex/actions/sessions/delete.ts new file mode 100644 index 000000000..e55b77e31 --- /dev/null +++ b/vtex/actions/sessions/delete.ts @@ -0,0 +1,39 @@ +import { AppContext } from "../../mod.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; + +export interface DeleteSession { + logOutFromSession: string; +} + +interface Props { + sessionId: string; +} + +async function loader( + { sessionId }: Props, + req: Request, + ctx: AppContext, +): Promise { + const { io } = ctx; + const { cookie, payload } = parseCookie(req.headers, ctx.account); + + if (!payload?.sub || !payload?.userId) { + return null; + } + + const mutation = `mutation LogOutFromSession($sessionId: ID) { + logOutFromSession(sessionId: $sessionId) @context(provider: "vtex.store-graphql@2.x") + }`; + + try { + return await io.query({ + query: mutation, + variables: { sessionId }, + }, { headers: { cookie } }); + } catch (e) { + console.error(e); + return null; + } +} + +export default loader; diff --git a/vtex/loaders/address/getAddressByZIP.ts b/vtex/loaders/address/getAddressByZIP.ts new file mode 100644 index 000000000..a7f7a1e53 --- /dev/null +++ b/vtex/loaders/address/getAddressByZIP.ts @@ -0,0 +1,59 @@ +import { AppContext } from "../../mod.ts"; + +interface Props { + /** + * @description User country code. Ex: USA + */ + countryCode: string; + /** + * @description User postal code. + */ + postalCode: string; +} + +interface AddressByPostalCode { + postalCode: string; + city: string; + state: string; + country: string; + street: string | null; + number: string | null; + neighborhood: string | null; + complement: string | null; + reference: string | null; + geoCoordinates: number[] | null; +} + +export default async function loader( + props: Props, + _req: Request, + ctx: AppContext, +): Promise { + const { countryCode, postalCode } = props; + const { vcs } = ctx; + + try { + const addressByPostalCode = await vcs + ["GET /api/checkout/pub/postal-code/:countryCode/:postalCode"]({ + countryCode, + postalCode, + }) + .then((r) => r.json()) as AddressByPostalCode; + + return addressByPostalCode; + } catch (error) { + console.log(error); + return { + postalCode: "", + city: "", + state: "", + country: "", + street: null, + number: null, + neighborhood: null, + complement: null, + reference: null, + geoCoordinates: [], + }; + } +} diff --git a/vtex/loaders/address/list.ts b/vtex/loaders/address/list.ts new file mode 100644 index 000000000..eaadbba7b --- /dev/null +++ b/vtex/loaders/address/list.ts @@ -0,0 +1,86 @@ +import { Address } from "../../utils/types.ts"; +import { PostalAddressVTEX } from "../../../commerce/types.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; +import { AppContext } from "../../mod.ts"; + +export interface User { + id: string; + userId: string; + email: string; + firstName?: string; + lastName?: string; + profilePicture?: string; + gender?: string; + document?: string; + homePhone?: string; + birthDate?: string; + corporateDocument?: string; + corporateName?: string; + tradeName?: string; + businessPhone?: string; + isCorporate?: boolean; + customFields?: { key: string; value: string }[]; +} + +async function loader( + _props: unknown, + req: Request, + ctx: AppContext, +): Promise< + PostalAddressVTEX[] | null +> { + const { io } = ctx; + const { cookie, payload } = parseCookie(req.headers, ctx.account); + + if (!payload?.sub || !payload?.userId) { + return null; + } + + const query = `query Addresses @context(scope: "private") { + profile { + cacheId + addresses: address { + addressId: id + addressType + addressName + city + complement + country + neighborhood + number + postalCode + geoCoordinates + receiverName + state + street + } + } + }`; + + try { + const { profile } = await io.query< + { profile: { addresses: Address[] } }, + null + >( + { query }, + { headers: { cookie } }, + ); + + return profile?.addresses?.map((address) => ({ + "@type": "PostalAddress", + addressCountry: address?.country, + addressLocality: address?.city, + addressRegion: address?.state, + postalCode: address?.postalCode, + streetAddress: address?.street, + receiverName: address?.receiverName, + addressName: address?.addressName, + complement: address?.complement, + addressId: address?.addressId, + })); + } catch (_) { + return null; + } +} + +export default loader; diff --git a/vtex/loaders/orders/list.ts b/vtex/loaders/orders/list.ts index 2921e0bcb..2895c267a 100644 --- a/vtex/loaders/orders/list.ts +++ b/vtex/loaders/orders/list.ts @@ -12,10 +12,14 @@ export default async function loader( props: Props, req: Request, ctx: AppContext, -): Promise { +): Promise { const { vcsDeprecated } = ctx; const { clientEmail, page = "0", per_page = "15" } = props; - const { cookie } = parseCookie(req.headers, ctx.account); + const { cookie, payload } = parseCookie(req.headers, ctx.account); + + if (!payload?.sub || !payload?.userId) { + return null; + } const ordersResponse = await vcsDeprecated ["GET /api/oms/user/orders"]( diff --git a/vtex/loaders/orders/order.ts b/vtex/loaders/orders/order.ts new file mode 100644 index 000000000..2b4501206 --- /dev/null +++ b/vtex/loaders/orders/order.ts @@ -0,0 +1,39 @@ +import { RequestURLParam } from "../../../website/functions/requestToParam.ts"; +import { AppContext } from "../../mod.ts"; +import { OrderItem } from "../../utils/types.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; + +export interface Props { + slug: RequestURLParam; +} + +export default async function loader( + props: Props, + req: Request, + ctx: AppContext, +): Promise { + const { vcsDeprecated } = ctx; + const { cookie, payload } = parseCookie(req.headers, ctx.account); + + if (!payload?.sub || !payload?.userId) { + return null; + } + + const { slug } = props; + + const response = await vcsDeprecated["GET /api/oms/user/orders/:orderId"]( + { orderId: slug }, + { + headers: { + cookie, + }, + }, + ); + + if (response.ok) { + const order = await response.json(); + return order; + } + + return null; +} diff --git a/vtex/loaders/payments/info.ts b/vtex/loaders/payments/info.ts new file mode 100644 index 000000000..3390d23fd --- /dev/null +++ b/vtex/loaders/payments/info.ts @@ -0,0 +1,55 @@ +import { AppContext } from "../../mod.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; + +const query = `query getPaymentSystems { + paymentSystems { + name + groupName + requiresDocument + displayDocument + validator { + regex + mask + cardCodeMask + cardCodeRegex + } + } +}`; + +export interface PaymentSystem { + name: string; + groupName: string; + requiresDocument: boolean; + displayDocument: boolean; + validator: { + regex: string | null; + mask: string | null; + cardCodeMask: string | null; + cardCodeRegex: string | null; + }; +} + +export default async function loader( + _props: unknown, + req: Request, + ctx: AppContext, +) { + const { io } = ctx; + const { cookie, payload } = parseCookie(req.headers, ctx.account); + + if (!payload?.sub || !payload?.userId) { + return null; + } + + try { + const data = await io.query<{ paymentSystems: PaymentSystem[] }, null>( + { query }, + { headers: { cookie } }, + ); + + return data.paymentSystems; + } catch (e) { + console.error(e); + return null; + } +} diff --git a/vtex/loaders/payments/userPayments.ts b/vtex/loaders/payments/userPayments.ts new file mode 100644 index 000000000..78cd5f2d0 --- /dev/null +++ b/vtex/loaders/payments/userPayments.ts @@ -0,0 +1,61 @@ +// fetch("https://www.als.com/_v/private/graphql/v1?workspace=master&maxAge=long&appsEtag=remove&domain=store&locale=en-US&__bindingId=d8649f18-3877-43de-88e6-c45a81eddc02", { +// "headers": { +// "content-type": "application/json", +// }, +// "body": "{\"operationName\":\"Payments\",\"variables\":{},\"extensions\":{\"persistedQuery\":{\"version\":1,\"sha256Hash\":\"95af11127e44f1857144e38f18635e0d085113c3bfdda3e4b8bc99ae63e14e60\",\"sender\":\"vtex.my-cards@1.x\",\"provider\":\"vtex.store-graphql@2.x\"}}}", +// "method": "POST" +// }) + +import { AppContext } from "../../mod.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; + +export interface Payment { + accountStatus: string | null; + cardNumber: string; + expirationDate: string; + id: string; + isExpired: boolean; + paymentSystem: string; + paymentSystemName: string; +} + +async function loader( + _props: unknown, + req: Request, + ctx: AppContext, +): Promise { + const { io } = ctx; + const { cookie, payload } = parseCookie(req.headers, ctx.account); + + if (!payload?.sub || !payload?.userId) { + return null; + } + + const query = `query getUserPayments { + profile { + payments { + accountStatus + cardNumber + expirationDate + id + isExpired + paymentSystem + paymentSystemName + } + } + }`; + + try { + const data = await io.query<{ profile: { payments: Payment[] } }, null>( + { query }, + { headers: { cookie } }, + ); + + return data.profile.payments; + } catch (e) { + console.error(e); + return null; + } +} + +export default loader; diff --git a/vtex/loaders/profile/passwordLastUpdate.ts b/vtex/loaders/profile/passwordLastUpdate.ts new file mode 100644 index 000000000..f60d69731 --- /dev/null +++ b/vtex/loaders/profile/passwordLastUpdate.ts @@ -0,0 +1,39 @@ +import { AppContext } from "../../mod.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; + +export interface ProfilePassword { + passwordLastUpdate?: PasswordLastUpdate; +} + +export type PasswordLastUpdate = string | null; + +async function loader( + _props: unknown, + req: Request, + ctx: AppContext, +): Promise { + const { io } = ctx; + const { cookie, payload } = parseCookie(req.headers, ctx.account); + + if (!payload?.sub || !payload?.userId) { + return null; + } + console.log({ teste: payload?.userId }); + + const query = `query getUserProfile { profile { passwordLastUpdate }}`; + + try { + const { profile } = await io.query<{ profile: ProfilePassword }, null>( + { query }, + { headers: { cookie } }, + ); + + console.log({ profile }); + + return profile.passwordLastUpdate ?? null; + } catch (_) { + return null; + } +} + +export default loader; diff --git a/vtex/loaders/proxy.ts b/vtex/loaders/proxy.ts index f1466d502..916fe5f27 100644 --- a/vtex/loaders/proxy.ts +++ b/vtex/loaders/proxy.ts @@ -27,6 +27,7 @@ const buildProxyRoutes = ( includeSiteMap, generateDecoSiteMap, excludePathsFromDecoSiteMap, + excludePathsFromVtexProxy, includeScriptsToHead, includeScriptsToBody, }: { @@ -35,6 +36,7 @@ const buildProxyRoutes = ( includeSiteMap?: string[]; generateDecoSiteMap?: boolean; excludePathsFromDecoSiteMap: string[]; + excludePathsFromVtexProxy?: string[]; includeScriptsToHead?: { includes?: Script[]; }; @@ -96,7 +98,10 @@ const buildProxyRoutes = ( }, }); }; - const routesFromPaths = [...PATHS_TO_PROXY, ...extraPaths].map( + const currentPathsToProxy = PATHS_TO_PROXY.filter((path) => + !excludePathsFromVtexProxy?.includes(path) + ); + const routesFromPaths = [...currentPathsToProxy, ...extraPaths].map( routeFromPath, ); @@ -154,6 +159,10 @@ export interface Props { * @title Exclude paths from /deco-sitemap.xml */ excludePathsFromDecoSiteMap?: string[]; + /** + * @title Exclude paths from VTEX PATHS_TO_PROXY + */ + excludePathsFromVtexProxy?: string[]; /** * @title Scripts to include on Html head */ @@ -177,6 +186,7 @@ function loader( includeSiteMap = [], generateDecoSiteMap = true, excludePathsFromDecoSiteMap = [], + excludePathsFromVtexProxy = [], includeScriptsToHead = { includes: [] }, includeScriptsToBody = { includes: [] }, }: Props, @@ -186,6 +196,7 @@ function loader( return buildProxyRoutes({ generateDecoSiteMap, excludePathsFromDecoSiteMap, + excludePathsFromVtexProxy, includeSiteMap, publicUrl: ctx.publicUrl, extraPaths: extraPathsToProxy, diff --git a/vtex/loaders/sessions/info.ts b/vtex/loaders/sessions/info.ts new file mode 100644 index 000000000..1739fd41c --- /dev/null +++ b/vtex/loaders/sessions/info.ts @@ -0,0 +1,68 @@ +import { AppContext } from "../../mod.ts"; +import { parseCookie } from "../../utils/vtexId.ts"; + +export interface LoginSessionInfo { + currentLoginSessionId: string; + loginSessions: LoginSession[]; +} + +export interface LoginSession { + id: string; + cacheId: string; + deviceType: string; + lastAccess: string; + city: string; + fullAddress: string; + ip: string; + browser: string; + os: string; + firstAccess: string; +} + +async function loader( + _props: unknown, + req: Request, + ctx: AppContext, +): Promise { + const { io } = ctx; + const { cookie, payload } = parseCookie(req.headers, ctx.account); + + if (!payload?.sub || !payload?.userId) { + return null; + } + + const query = `query getUserSessions { + loginSessionsInfo { + currentLoginSessionId + loginSessions { + id + cacheId + deviceType + lastAccess + city + fullAddress + ip + browser + os + firstAccess + } + } + }`; + + try { + const data = await io.query< + { loginSessionsInfo: LoginSessionInfo }, + null + >( + { query }, + { headers: { cookie } }, + ); + + return data.loginSessionsInfo; + } catch (e) { + console.error(e); + return null; + } +} + +export default loader; diff --git a/vtex/loaders/user.ts b/vtex/loaders/user.ts index 174398e71..533b4a8f3 100644 --- a/vtex/loaders/user.ts +++ b/vtex/loaders/user.ts @@ -2,7 +2,7 @@ import { Person } from "../../commerce/types.ts"; import { AppContext } from "../mod.ts"; import { parseCookie } from "../utils/vtexId.ts"; -interface User { +export interface User { id: string; userId: string; email: string; @@ -11,6 +11,14 @@ interface User { profilePicture?: string; gender?: string; document?: string; + homePhone?: string; + birthDate?: string; + corporateDocument?: string; + corporateName?: string; + tradeName?: string; + businessPhone?: string; + isCorporate?: boolean; + customFields?: { key: string; value: string }[]; } async function loader( @@ -26,7 +34,7 @@ async function loader( } const query = - "query getUserProfile { profile { id userId email firstName lastName profilePicture gender document }}"; + `query getUserProfile { profile(customFields: "isNewsletterOptIn") { id userId email firstName lastName profilePicture gender document homePhone birthDate corporateDocument corporateName tradeName businessPhone isCorporate customFields { key value } }}`; try { const { profile: user } = await io.query<{ profile: User }, null>( @@ -35,14 +43,22 @@ async function loader( ); return { - "@id": user.userId ?? user.id, + "@id": user?.userId ?? user.id, email: user.email, - givenName: user.firstName, - familyName: user.lastName, + givenName: user?.firstName, + familyName: user?.lastName, taxID: user?.document?.replace(/[^\d]/g, ""), - gender: user.gender === "f" + gender: user?.gender === "female" ? "https://schema.org/Female" : "https://schema.org/Male", + telephone: user?.homePhone, + birthDate: user?.birthDate, + corporateName: user?.corporateName, + tradeName: user?.tradeName, + corporateDocument: user?.corporateDocument, + businessPhone: user?.businessPhone, + isCorporate: user?.isCorporate, + customFields: user?.customFields, }; } catch (_) { return null; diff --git a/vtex/manifest.gen.ts b/vtex/manifest.gen.ts index b8863a721..3131df2c0 100644 --- a/vtex/manifest.gen.ts +++ b/vtex/manifest.gen.ts @@ -2,111 +2,132 @@ // This file SHOULD be checked into source version control. // This file is automatically updated during development when running `dev.ts`. -import * as $$$$$$$$$0 from "./actions/analytics/sendEvent.ts"; -import * as $$$$$$$$$1 from "./actions/cart/addItems.ts"; -import * as $$$$$$$$$2 from "./actions/cart/addOfferings.ts"; -import * as $$$$$$$$$3 from "./actions/cart/clearOrderformMessages.ts"; -import * as $$$$$$$$$4 from "./actions/cart/getInstallment.ts"; -import * as $$$$$$$$$5 from "./actions/cart/removeItemAttachment.ts"; -import * as $$$$$$$$$6 from "./actions/cart/removeItems.ts"; -import * as $$$$$$$$$7 from "./actions/cart/removeOffering.ts"; -import * as $$$$$$$$$8 from "./actions/cart/simulation.ts"; -import * as $$$$$$$$$9 from "./actions/cart/updateAttachment.ts"; -import * as $$$$$$$$$10 from "./actions/cart/updateCoupons.ts"; -import * as $$$$$$$$$11 from "./actions/cart/updateGifts.ts"; -import * as $$$$$$$$$12 from "./actions/cart/updateItemAttachment.ts"; -import * as $$$$$$$$$13 from "./actions/cart/updateItemPrice.ts"; -import * as $$$$$$$$$14 from "./actions/cart/updateItems.ts"; -import * as $$$$$$$$$15 from "./actions/cart/updateProfile.ts"; -import * as $$$$$$$$$16 from "./actions/cart/updateUser.ts"; -import * as $$$$$$$$$17 from "./actions/masterdata/createDocument.ts"; -import * as $$$$$$$$$18 from "./actions/newsletter/subscribe.ts"; -import * as $$$$$$$$$19 from "./actions/notifyme.ts"; -import * as $$$$$$$$$20 from "./actions/review/submit.ts"; -import * as $$$$$$$$$21 from "./actions/trigger.ts"; -import * as $$$$$$$$$22 from "./actions/wishlist/addItem.ts"; -import * as $$$$$$$$$23 from "./actions/wishlist/removeItem.ts"; +import * as $$$$$$$$$0 from "./actions/address/createAddress.ts"; +import * as $$$$$$$$$1 from "./actions/address/deleteAddress.ts"; +import * as $$$$$$$$$2 from "./actions/address/updateAddress.ts"; +import * as $$$$$$$$$3 from "./actions/analytics/sendEvent.ts"; +import * as $$$$$$$$$4 from "./actions/cart/addItems.ts"; +import * as $$$$$$$$$5 from "./actions/cart/addOfferings.ts"; +import * as $$$$$$$$$6 from "./actions/cart/clearOrderformMessages.ts"; +import * as $$$$$$$$$7 from "./actions/cart/getInstallment.ts"; +import * as $$$$$$$$$8 from "./actions/cart/removeItemAttachment.ts"; +import * as $$$$$$$$$9 from "./actions/cart/removeItems.ts"; +import * as $$$$$$$$$10 from "./actions/cart/removeOffering.ts"; +import * as $$$$$$$$$11 from "./actions/cart/simulation.ts"; +import * as $$$$$$$$$12 from "./actions/cart/updateAttachment.ts"; +import * as $$$$$$$$$13 from "./actions/cart/updateCoupons.ts"; +import * as $$$$$$$$$14 from "./actions/cart/updateGifts.ts"; +import * as $$$$$$$$$15 from "./actions/cart/updateItemAttachment.ts"; +import * as $$$$$$$$$16 from "./actions/cart/updateItemPrice.ts"; +import * as $$$$$$$$$17 from "./actions/cart/updateItems.ts"; +import * as $$$$$$$$$18 from "./actions/cart/updateProfile.ts"; +import * as $$$$$$$$$19 from "./actions/cart/updateUser.ts"; +import * as $$$$$$$$$20 from "./actions/masterdata/createDocument.ts"; +import * as $$$$$$$$$21 from "./actions/newsletter/subscribe.ts"; +import * as $$$$$$$$$22 from "./actions/notifyme.ts"; +import * as $$$$$$$$$23 from "./actions/payments/delete.ts"; +import * as $$$$$$$$$24 from "./actions/profile/newsletterProfile.ts"; +import * as $$$$$$$$$25 from "./actions/profile/updateProfile.ts"; +import * as $$$$$$$$$26 from "./actions/review/submit.ts"; +import * as $$$$$$$$$27 from "./actions/sessions/delete.ts"; +import * as $$$$$$$$$28 from "./actions/trigger.ts"; +import * as $$$$$$$$$29 from "./actions/wishlist/addItem.ts"; +import * as $$$$$$$$$30 from "./actions/wishlist/removeItem.ts"; import * as $$$$0 from "./handlers/sitemap.ts"; -import * as $$$0 from "./loaders/cart.ts"; -import * as $$$1 from "./loaders/categories/tree.ts"; -import * as $$$2 from "./loaders/collections/list.ts"; -import * as $$$3 from "./loaders/config.ts"; -import * as $$$4 from "./loaders/intelligentSearch/productDetailsPage.ts"; -import * as $$$5 from "./loaders/intelligentSearch/productList.ts"; -import * as $$$6 from "./loaders/intelligentSearch/productListingPage.ts"; -import * as $$$7 from "./loaders/intelligentSearch/productSearchValidator.ts"; -import * as $$$8 from "./loaders/intelligentSearch/suggestions.ts"; -import * as $$$9 from "./loaders/intelligentSearch/topsearches.ts"; -import * as $$$10 from "./loaders/legacy/brands.ts"; -import * as $$$11 from "./loaders/legacy/pageType.ts"; -import * as $$$12 from "./loaders/legacy/productDetailsPage.ts"; -import * as $$$13 from "./loaders/legacy/productList.ts"; -import * as $$$14 from "./loaders/legacy/productListingPage.ts"; -import * as $$$15 from "./loaders/legacy/relatedProductsLoader.ts"; -import * as $$$16 from "./loaders/legacy/suggestions.ts"; -import * as $$$17 from "./loaders/logistics/listPickupPoints.ts"; -import * as $$$18 from "./loaders/logistics/listPickupPointsByLocation.ts"; -import * as $$$19 from "./loaders/logistics/listStockByStore.ts"; -import * as $$$20 from "./loaders/masterdata/searchDocuments.ts"; -import * as $$$21 from "./loaders/navbar.ts"; -import * as $$$22 from "./loaders/options/productIdByTerm.ts"; -import * as $$$23 from "./loaders/orders/list.ts"; -import * as $$$24 from "./loaders/paths/PDPDefaultPath.ts"; -import * as $$$25 from "./loaders/paths/PLPDefaultPath.ts"; -import * as $$$26 from "./loaders/product/extend.ts"; -import * as $$$27 from "./loaders/product/extensions/detailsPage.ts"; -import * as $$$28 from "./loaders/product/extensions/list.ts"; -import * as $$$29 from "./loaders/product/extensions/listingPage.ts"; -import * as $$$30 from "./loaders/product/extensions/suggestions.ts"; -import * as $$$31 from "./loaders/product/wishlist.ts"; -import * as $$$32 from "./loaders/proxy.ts"; -import * as $$$33 from "./loaders/user.ts"; -import * as $$$34 from "./loaders/wishlist.ts"; -import * as $$$35 from "./loaders/workflow/product.ts"; -import * as $$$36 from "./loaders/workflow/products.ts"; +import * as $$$0 from "./loaders/address/getAddressByZIP.ts"; +import * as $$$1 from "./loaders/address/list.ts"; +import * as $$$2 from "./loaders/cart.ts"; +import * as $$$3 from "./loaders/categories/tree.ts"; +import * as $$$4 from "./loaders/collections/list.ts"; +import * as $$$5 from "./loaders/config.ts"; +import * as $$$6 from "./loaders/intelligentSearch/productDetailsPage.ts"; +import * as $$$7 from "./loaders/intelligentSearch/productList.ts"; +import * as $$$8 from "./loaders/intelligentSearch/productListingPage.ts"; +import * as $$$9 from "./loaders/intelligentSearch/productSearchValidator.ts"; +import * as $$$10 from "./loaders/intelligentSearch/suggestions.ts"; +import * as $$$11 from "./loaders/intelligentSearch/topsearches.ts"; +import * as $$$12 from "./loaders/legacy/brands.ts"; +import * as $$$13 from "./loaders/legacy/pageType.ts"; +import * as $$$14 from "./loaders/legacy/productDetailsPage.ts"; +import * as $$$15 from "./loaders/legacy/productList.ts"; +import * as $$$16 from "./loaders/legacy/productListingPage.ts"; +import * as $$$17 from "./loaders/legacy/relatedProductsLoader.ts"; +import * as $$$18 from "./loaders/legacy/suggestions.ts"; +import * as $$$19 from "./loaders/logistics/listPickupPoints.ts"; +import * as $$$20 from "./loaders/logistics/listPickupPointsByLocation.ts"; +import * as $$$21 from "./loaders/logistics/listStockByStore.ts"; +import * as $$$22 from "./loaders/masterdata/searchDocuments.ts"; +import * as $$$23 from "./loaders/navbar.ts"; +import * as $$$24 from "./loaders/options/productIdByTerm.ts"; +import * as $$$25 from "./loaders/orders/list.ts"; +import * as $$$26 from "./loaders/orders/order.ts"; +import * as $$$27 from "./loaders/paths/PDPDefaultPath.ts"; +import * as $$$28 from "./loaders/paths/PLPDefaultPath.ts"; +import * as $$$29 from "./loaders/payments/info.ts"; +import * as $$$30 from "./loaders/payments/userPayments.ts"; +import * as $$$31 from "./loaders/product/extend.ts"; +import * as $$$32 from "./loaders/product/extensions/detailsPage.ts"; +import * as $$$33 from "./loaders/product/extensions/list.ts"; +import * as $$$34 from "./loaders/product/extensions/listingPage.ts"; +import * as $$$35 from "./loaders/product/extensions/suggestions.ts"; +import * as $$$36 from "./loaders/product/wishlist.ts"; +import * as $$$37 from "./loaders/profile/passwordLastUpdate.ts"; +import * as $$$38 from "./loaders/proxy.ts"; +import * as $$$39 from "./loaders/sessions/info.ts"; +import * as $$$40 from "./loaders/user.ts"; +import * as $$$41 from "./loaders/wishlist.ts"; +import * as $$$42 from "./loaders/workflow/product.ts"; +import * as $$$43 from "./loaders/workflow/products.ts"; import * as $$$$$$0 from "./sections/Analytics/Vtex.tsx"; import * as $$$$$$$$$$0 from "./workflows/events.ts"; import * as $$$$$$$$$$1 from "./workflows/product/index.ts"; const manifest = { "loaders": { - "vtex/loaders/cart.ts": $$$0, - "vtex/loaders/categories/tree.ts": $$$1, - "vtex/loaders/collections/list.ts": $$$2, - "vtex/loaders/config.ts": $$$3, - "vtex/loaders/intelligentSearch/productDetailsPage.ts": $$$4, - "vtex/loaders/intelligentSearch/productList.ts": $$$5, - "vtex/loaders/intelligentSearch/productListingPage.ts": $$$6, - "vtex/loaders/intelligentSearch/productSearchValidator.ts": $$$7, - "vtex/loaders/intelligentSearch/suggestions.ts": $$$8, - "vtex/loaders/intelligentSearch/topsearches.ts": $$$9, - "vtex/loaders/legacy/brands.ts": $$$10, - "vtex/loaders/legacy/pageType.ts": $$$11, - "vtex/loaders/legacy/productDetailsPage.ts": $$$12, - "vtex/loaders/legacy/productList.ts": $$$13, - "vtex/loaders/legacy/productListingPage.ts": $$$14, - "vtex/loaders/legacy/relatedProductsLoader.ts": $$$15, - "vtex/loaders/legacy/suggestions.ts": $$$16, - "vtex/loaders/logistics/listPickupPoints.ts": $$$17, - "vtex/loaders/logistics/listPickupPointsByLocation.ts": $$$18, - "vtex/loaders/logistics/listStockByStore.ts": $$$19, - "vtex/loaders/masterdata/searchDocuments.ts": $$$20, - "vtex/loaders/navbar.ts": $$$21, - "vtex/loaders/options/productIdByTerm.ts": $$$22, - "vtex/loaders/orders/list.ts": $$$23, - "vtex/loaders/paths/PDPDefaultPath.ts": $$$24, - "vtex/loaders/paths/PLPDefaultPath.ts": $$$25, - "vtex/loaders/product/extend.ts": $$$26, - "vtex/loaders/product/extensions/detailsPage.ts": $$$27, - "vtex/loaders/product/extensions/list.ts": $$$28, - "vtex/loaders/product/extensions/listingPage.ts": $$$29, - "vtex/loaders/product/extensions/suggestions.ts": $$$30, - "vtex/loaders/product/wishlist.ts": $$$31, - "vtex/loaders/proxy.ts": $$$32, - "vtex/loaders/user.ts": $$$33, - "vtex/loaders/wishlist.ts": $$$34, - "vtex/loaders/workflow/product.ts": $$$35, - "vtex/loaders/workflow/products.ts": $$$36, + "vtex/loaders/address/getAddressByZIP.ts": $$$0, + "vtex/loaders/address/list.ts": $$$1, + "vtex/loaders/cart.ts": $$$2, + "vtex/loaders/categories/tree.ts": $$$3, + "vtex/loaders/collections/list.ts": $$$4, + "vtex/loaders/config.ts": $$$5, + "vtex/loaders/intelligentSearch/productDetailsPage.ts": $$$6, + "vtex/loaders/intelligentSearch/productList.ts": $$$7, + "vtex/loaders/intelligentSearch/productListingPage.ts": $$$8, + "vtex/loaders/intelligentSearch/productSearchValidator.ts": $$$9, + "vtex/loaders/intelligentSearch/suggestions.ts": $$$10, + "vtex/loaders/intelligentSearch/topsearches.ts": $$$11, + "vtex/loaders/legacy/brands.ts": $$$12, + "vtex/loaders/legacy/pageType.ts": $$$13, + "vtex/loaders/legacy/productDetailsPage.ts": $$$14, + "vtex/loaders/legacy/productList.ts": $$$15, + "vtex/loaders/legacy/productListingPage.ts": $$$16, + "vtex/loaders/legacy/relatedProductsLoader.ts": $$$17, + "vtex/loaders/legacy/suggestions.ts": $$$18, + "vtex/loaders/logistics/listPickupPoints.ts": $$$19, + "vtex/loaders/logistics/listPickupPointsByLocation.ts": $$$20, + "vtex/loaders/logistics/listStockByStore.ts": $$$21, + "vtex/loaders/masterdata/searchDocuments.ts": $$$22, + "vtex/loaders/navbar.ts": $$$23, + "vtex/loaders/options/productIdByTerm.ts": $$$24, + "vtex/loaders/orders/list.ts": $$$25, + "vtex/loaders/orders/order.ts": $$$26, + "vtex/loaders/paths/PDPDefaultPath.ts": $$$27, + "vtex/loaders/paths/PLPDefaultPath.ts": $$$28, + "vtex/loaders/payments/info.ts": $$$29, + "vtex/loaders/payments/userPayments.ts": $$$30, + "vtex/loaders/product/extend.ts": $$$31, + "vtex/loaders/product/extensions/detailsPage.ts": $$$32, + "vtex/loaders/product/extensions/list.ts": $$$33, + "vtex/loaders/product/extensions/listingPage.ts": $$$34, + "vtex/loaders/product/extensions/suggestions.ts": $$$35, + "vtex/loaders/product/wishlist.ts": $$$36, + "vtex/loaders/profile/passwordLastUpdate.ts": $$$37, + "vtex/loaders/proxy.ts": $$$38, + "vtex/loaders/sessions/info.ts": $$$39, + "vtex/loaders/user.ts": $$$40, + "vtex/loaders/wishlist.ts": $$$41, + "vtex/loaders/workflow/product.ts": $$$42, + "vtex/loaders/workflow/products.ts": $$$43, }, "handlers": { "vtex/handlers/sitemap.ts": $$$$0, @@ -115,30 +136,37 @@ const manifest = { "vtex/sections/Analytics/Vtex.tsx": $$$$$$0, }, "actions": { - "vtex/actions/analytics/sendEvent.ts": $$$$$$$$$0, - "vtex/actions/cart/addItems.ts": $$$$$$$$$1, - "vtex/actions/cart/addOfferings.ts": $$$$$$$$$2, - "vtex/actions/cart/clearOrderformMessages.ts": $$$$$$$$$3, - "vtex/actions/cart/getInstallment.ts": $$$$$$$$$4, - "vtex/actions/cart/removeItemAttachment.ts": $$$$$$$$$5, - "vtex/actions/cart/removeItems.ts": $$$$$$$$$6, - "vtex/actions/cart/removeOffering.ts": $$$$$$$$$7, - "vtex/actions/cart/simulation.ts": $$$$$$$$$8, - "vtex/actions/cart/updateAttachment.ts": $$$$$$$$$9, - "vtex/actions/cart/updateCoupons.ts": $$$$$$$$$10, - "vtex/actions/cart/updateGifts.ts": $$$$$$$$$11, - "vtex/actions/cart/updateItemAttachment.ts": $$$$$$$$$12, - "vtex/actions/cart/updateItemPrice.ts": $$$$$$$$$13, - "vtex/actions/cart/updateItems.ts": $$$$$$$$$14, - "vtex/actions/cart/updateProfile.ts": $$$$$$$$$15, - "vtex/actions/cart/updateUser.ts": $$$$$$$$$16, - "vtex/actions/masterdata/createDocument.ts": $$$$$$$$$17, - "vtex/actions/newsletter/subscribe.ts": $$$$$$$$$18, - "vtex/actions/notifyme.ts": $$$$$$$$$19, - "vtex/actions/review/submit.ts": $$$$$$$$$20, - "vtex/actions/trigger.ts": $$$$$$$$$21, - "vtex/actions/wishlist/addItem.ts": $$$$$$$$$22, - "vtex/actions/wishlist/removeItem.ts": $$$$$$$$$23, + "vtex/actions/address/createAddress.ts": $$$$$$$$$0, + "vtex/actions/address/deleteAddress.ts": $$$$$$$$$1, + "vtex/actions/address/updateAddress.ts": $$$$$$$$$2, + "vtex/actions/analytics/sendEvent.ts": $$$$$$$$$3, + "vtex/actions/cart/addItems.ts": $$$$$$$$$4, + "vtex/actions/cart/addOfferings.ts": $$$$$$$$$5, + "vtex/actions/cart/clearOrderformMessages.ts": $$$$$$$$$6, + "vtex/actions/cart/getInstallment.ts": $$$$$$$$$7, + "vtex/actions/cart/removeItemAttachment.ts": $$$$$$$$$8, + "vtex/actions/cart/removeItems.ts": $$$$$$$$$9, + "vtex/actions/cart/removeOffering.ts": $$$$$$$$$10, + "vtex/actions/cart/simulation.ts": $$$$$$$$$11, + "vtex/actions/cart/updateAttachment.ts": $$$$$$$$$12, + "vtex/actions/cart/updateCoupons.ts": $$$$$$$$$13, + "vtex/actions/cart/updateGifts.ts": $$$$$$$$$14, + "vtex/actions/cart/updateItemAttachment.ts": $$$$$$$$$15, + "vtex/actions/cart/updateItemPrice.ts": $$$$$$$$$16, + "vtex/actions/cart/updateItems.ts": $$$$$$$$$17, + "vtex/actions/cart/updateProfile.ts": $$$$$$$$$18, + "vtex/actions/cart/updateUser.ts": $$$$$$$$$19, + "vtex/actions/masterdata/createDocument.ts": $$$$$$$$$20, + "vtex/actions/newsletter/subscribe.ts": $$$$$$$$$21, + "vtex/actions/notifyme.ts": $$$$$$$$$22, + "vtex/actions/payments/delete.ts": $$$$$$$$$23, + "vtex/actions/profile/newsletterProfile.ts": $$$$$$$$$24, + "vtex/actions/profile/updateProfile.ts": $$$$$$$$$25, + "vtex/actions/review/submit.ts": $$$$$$$$$26, + "vtex/actions/sessions/delete.ts": $$$$$$$$$27, + "vtex/actions/trigger.ts": $$$$$$$$$28, + "vtex/actions/wishlist/addItem.ts": $$$$$$$$$29, + "vtex/actions/wishlist/removeItem.ts": $$$$$$$$$30, }, "workflows": { "vtex/workflows/events.ts": $$$$$$$$$$0, diff --git a/vtex/utils/client.ts b/vtex/utils/client.ts index 7fb63b193..6794f41e7 100644 --- a/vtex/utils/client.ts +++ b/vtex/utils/client.ts @@ -9,6 +9,7 @@ import { LegacyProduct, LegacySort, OrderForm, + OrderItem, PageType, PortalSuggestion, ProductSearchResult, @@ -248,6 +249,9 @@ export interface VTEXCommerceStable { "GET /api/oms/user/orders": { response: Userorderslist; }; + "GET /api/oms/user/orders/:orderId": { + response: OrderItem; + }; } export interface SP { diff --git a/vtex/utils/openapi/vcs.openapi.gen.ts b/vtex/utils/openapi/vcs.openapi.gen.ts index 641a98f2a..ffc4e2afc 100644 --- a/vtex/utils/openapi/vcs.openapi.gen.ts +++ b/vtex/utils/openapi/vcs.openapi.gen.ts @@ -66,84 +66,83 @@ export type OptinNewsLetter = boolean export interface OpenAPI { /** - * Searches Master Data v1 documents with highly customizable filters. - * - * > Learn more about [Master Data v1 search queries](https://developers.vtex.com/vtex-rest-api/docs/how-the-queries-in-master-data-v1-work). - * - * ## Query Examples - * - * - * ### Simple filter - * - * ``` - * /dataentities/CL/search?email=my@email.com - * ``` - * - * ### Complex filter - * - * ``` - * /dataentities/CL/search?_where=(firstName=Jon OR lastName=Smith) OR (createdIn between 2001-01-01 AND 2016-01-01) - * ``` - * - * ### Filter by range - * - * #### Date Range - * - * ``` - * /dataentities/CL/search?_where=createdIn between 2001-01-01 AND 2016-01-01 - * ``` - * - * #### Range numeric fields - * - * ``` - * /dataentities/CL/search?_where=age between 18 AND 25 - * ``` - * - * ### Partial filter - * - * ``` - * /dataentities/CL/search?firstName=*Maria* - * ``` - * - * ### Filter for null values - * - * ``` - * /dataentities/CL/search?_where=firstName is null - * ``` - * - * ### Filter for non-null values - * - * ``` - * /dataentities/CL/search?_where=firstName is not null - * ``` - * - * ### Filter for difference - * ``` - * /dataentities/CL/search?_where=firstName<>maria - * ``` - * - * ### Filter greater than or less than + * Searches Master Data v1 documents with highly customizable filters. + * + * > Learn more about [Master Data v1 search queries](https://developers.vtex.com/vtex-rest-api/docs/how-the-queries-in-master-data-v1-work). + * + * ## Query Examples + * + * + * ### Simple filter + * + * ``` + * /dataentities/CL/search?email=my@email.com + * ``` + * + * ### Complex filter + * + * ``` + * /dataentities/CL/search?_where=(firstName=Jon OR lastName=Smith) OR (createdIn between 2001-01-01 AND 2016-01-01) + * ``` + * + * ### Filter by range + * + * #### Date Range + * + * ``` + * /dataentities/CL/search?_where=createdIn between 2001-01-01 AND 2016-01-01 + * ``` + * + * #### Range numeric fields + * + * ``` + * /dataentities/CL/search?_where=age between 18 AND 25 + * ``` + * + * ### Partial filter + * + * ``` + * /dataentities/CL/search?firstName=*Maria* + * ``` + * + * ### Filter for null values + * + * ``` + * /dataentities/CL/search?_where=firstName is null + * ``` + * + * ### Filter for non-null values + * + * ``` + * /dataentities/CL/search?_where=firstName is not null + * ``` + * + * ### Filter for difference + * ``` + * /dataentities/CL/search?_where=firstName<>maria + * ``` + * + * ### Filter greater than or less than + * ``` + * /dataentities/CL/search?_where=number>5 + * /dataentities/CL/search?_where=date<2001-01-01 * ``` - * /dataentities/CL/search?_where=number>5 - * /dataentities/CL/search?_where=date<2001-01-01 - * ``` - * - * -> Avoid sending too many requests with wildcards (`*`) in the search parameters or that use the `keyword` parameter. This may lead to this endpoint being temporarily blocked for your account. If this happens you will receive an error with status code `503`. - * - * ## Permissions - * - * Any user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint: - * - * | **Product** | **Category** | **Resource** | - * | --------------- | ----------------- | ----------------- | - * | Dynamic Storage | Dynamic storage generic resources | **Read only documents** | - * | Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** | - * | Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** | - * | Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** | - * - * There are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication). - * + * + * > Avoid sending too many requests with wildcards (`*`) in the search parameters or that use the `keyword` parameter. This may lead to this endpoint being temporarily blocked for your account. If this happens you will receive an error with status code `503`. + * + * ## Permissions + * + * Any user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint: + * + * | **Product** | **Category** | **Resource** | + * | --------------- | ----------------- | ----------------- | + * | Dynamic Storage | Dynamic storage generic resources | **Read only documents** | + * | Dynamic Storage | Dynamic storage generic resources | **Insert or update document (not remove)** | + * | Dynamic Storage | Dynamic storage generic resources | **Full access to all documents** | + * | Dynamic Storage | Dynamic storage generic resources | **Master Data administrator** | + * + * There are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication). + * * >❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations. */ "GET /api/dataentities/:acronym/search": { @@ -213,8 +212,8 @@ warehouseName?: string } } /** - * Retrieves information about [pickup points](https://help.vtex.com/en/tutorial/pickup-points--2fljn6wLjn8M4lJHA6HP3R) of your store. - * + * Retrieves information about [pickup points](https://help.vtex.com/en/tutorial/pickup-points--2fljn6wLjn8M4lJHA6HP3R) of your store. + * * >⚠️ The response is limited to 1.000 pickup points. If you need more than 1000 results, you can use the [List paged pickup points](https://developers.vtex.com/docs/api-reference/logistics-api#get-/api/logistics/pvt/configuration/pickuppoints/_search) endpoint. */ "GET /api/logistics/pvt/configuration/pickuppoints": { @@ -224,9 +223,9 @@ warehouseName?: string response: PickupPoint[] } /** - * Retrieves the IDs of products and SKUs. - * > 📘 Onboarding guide - * > + * Retrieves the IDs of products and SKUs. + * > 📘 Onboarding guide + * > * > Check the new [Catalog onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/catalog-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Catalog and is organized by focusing on the developer's journey. */ "GET /api/catalog_system/pvt/products/GetProductAndSkuIds": { @@ -287,9 +286,9 @@ DocumentId?: string } } /** - * Retrieves a specific Product by its ID. This information is exactly what is needed to create a new Product. - * > 📘 Onboarding guide - * > + * Retrieves a specific Product by its ID. This information is exactly what is needed to create a new Product. + * > 📘 Onboarding guide + * > * > Check the new [Catalog onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/catalog-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Catalog and is organized by focusing on the developer's journey. */ "GET /api/catalog/pvt/product/:productId": { @@ -331,9 +330,9 @@ IsVisible?: boolean */ Description?: string /** - * Short product description. This information can be displayed on both the product page and the shelf, using the following controls: - * Store Framework: `$product.DescriptionShort`. - * Legacy CMS Portal: ``. + * Short product description. This information can be displayed on both the product page and the shelf, using the following controls: + * Store Framework: `$product.DescriptionShort`. + * Legacy CMS Portal: ``. * */ DescriptionShort?: string @@ -342,8 +341,8 @@ DescriptionShort?: string */ ReleaseDate?: string /** - * Store Framework: Deprecated. - * Legacy CMS Portal: Keywords or synonyms related to the product, separated by comma (`,`). "Television", for example, can have a substitute word like "TV". This field is important to make your searches more comprehensive. + * Store Framework: Deprecated. + * Legacy CMS Portal: Keywords or synonyms related to the product, separated by comma (`,`). "Television", for example, can have a substitute word like "TV". This field is important to make your searches more comprehensive. * */ KeyWords?: string @@ -425,9 +424,9 @@ IsVisible?: boolean */ Description?: string /** - * Short product description. This information can be displayed on both the product page and the shelf, using the following controls: - * Store Framework: `$product.DescriptionShort`. - * Legacy CMS Portal: ``. + * Short product description. This information can be displayed on both the product page and the shelf, using the following controls: + * Store Framework: `$product.DescriptionShort`. + * Legacy CMS Portal: ``. * */ DescriptionShort?: string @@ -436,8 +435,8 @@ DescriptionShort?: string */ ReleaseDate?: string /** - * Store Framework: Deprecated. - * Legacy CMS Portal: Keywords or synonyms related to the product, separated by comma (`,`). "Television", for example, can have a substitute word like "TV". This field is important to make your searches more comprehensive. + * Store Framework: Deprecated. + * Legacy CMS Portal: Keywords or synonyms related to the product, separated by comma (`,`). "Television", for example, can have a substitute word like "TV". This field is important to make your searches more comprehensive. * */ KeyWords?: string @@ -518,9 +517,9 @@ IsVisible?: boolean */ Description?: string /** - * Short product description. This information can be displayed on both the product page and the shelf, using the following controls: - * Store Framework: `$product.DescriptionShort`. - * Legacy CMS Portal: ``. + * Short product description. This information can be displayed on both the product page and the shelf, using the following controls: + * Store Framework: `$product.DescriptionShort`. + * Legacy CMS Portal: ``. * */ DescriptionShort?: string @@ -529,8 +528,8 @@ DescriptionShort?: string */ ReleaseDate?: string /** - * Store Framework: Deprecated. - * Legacy CMS Portal: Keywords or synonyms related to the product, separated by comma (`,`). "Television", for example, can have a substitute word like "TV". This field is important to make your searches more comprehensive. + * Store Framework: Deprecated. + * Legacy CMS Portal: Keywords or synonyms related to the product, separated by comma (`,`). "Television", for example, can have a substitute word like "TV". This field is important to make your searches more comprehensive. * */ KeyWords?: string @@ -761,119 +760,119 @@ LomadeeCampaignCode?: string } } /** - * Retrieves data about the product and all SKUs related to it by the product's ID. - * ## Response body example - * - * ```json - * { - * "productId": 9, - * "name": "Camisa Masculina", - * "salesChannel": "2", - * "available": true, - * "displayMode": "lista", - * "dimensions": [ - * "Cores", - * "Tamanho", - * "País de origem", - * "Gênero" - * ], - * "dimensionsInputType": { - * "Cores": "Combo", - * "Tamanho": "Combo", - * "País de origem": "Combo", - * "Gênero": "Combo" - * }, - * "dimensionsMap": { - * "Cores": [ - * "Amarelo", - * "Azul", - * "Vermelho" - * ], - * "Tamanho": [ - * "P", - * "M", - * "G" - * ], - * "País de origem": [ - * "Brasil" - * ], - * "Gênero": [ - * "Masculino" - * ] - * }, - * "skus": [ - * { - * "sku": 310118454, - * "skuname": "Amarela - G", - * "dimensions": { - * "Cores": "Amarelo", - * "Tamanho": "G", - * "País de origem": "Brasil", - * "Gênero": "Masculino" - * }, - * "available": false, - * "availablequantity": 0, - * "cacheVersionUsedToCallCheckout": null, - * "listPriceFormated": "R$ 0,00", - * "listPrice": 0, - * "taxFormated": "R$ 0,00", - * "taxAsInt": 0, - * "bestPriceFormated": "R$ 9.999.876,00", - * "bestPrice": 999987600, - * "spotPrice": 999987600, - * "installments": 0, - * "installmentsValue": 0, - * "installmentsInsterestRate": null, - * "image": "https://lojadobreno.vteximg.com.br/arquivos/ids/155467-292-292/image-5d7ad76ad1954c53adecab4138319034.jpg?v=637321899584500000", - * "sellerId": "1", - * "seller": "lojadobreno", - * "measures": { - * "cubicweight": 1.0000, - * "height": 5.0000, - * "length": 20.0000, - * "weight": 200.0000, - * "width": 20.0000 - * }, - * "unitMultiplier": 1.0000, - * "rewardValue": 0 - * }, - * { - * "sku": 310118455, - * "skuname": "Vermelha - M", - * "dimensions": { - * "Cores": "Vermelho", - * "Tamanho": "M", - * "País de origem": "Brasil", - * "Gênero": "Masculino" - * }, - * "available": true, - * "availablequantity": 99999, - * "cacheVersionUsedToCallCheckout": "38395F1AEF59DF5CEAEDE472328145CD_", - * "listPriceFormated": "R$ 0,00", - * "listPrice": 0, - * "taxFormated": "R$ 0,00", - * "taxAsInt": 0, - * "bestPriceFormated": "R$ 20,00", - * "bestPrice": 2000, - * "spotPrice": 2000, - * "installments": 1, - * "installmentsValue": 2000, - * "installmentsInsterestRate": 0, - * "image": "https://lojadobreno.vteximg.com.br/arquivos/ids/155468-292-292/image-601a6099aace48b89d26fc9f22e8e611.jpg?v=637321906602470000", - * "sellerId": "pedrostore", - * "seller": "pedrostore", - * "measures": { - * "cubicweight": 0.4167, - * "height": 5.0000, - * "length": 20.0000, - * "weight": 200.0000, - * "width": 20.0000 - * }, - * "unitMultiplier": 1.0000, - * "rewardValue": 0 - * } - * ] - * } + * Retrieves data about the product and all SKUs related to it by the product's ID. + * ## Response body example + * + * ```json + * { + * "productId": 9, + * "name": "Camisa Masculina", + * "salesChannel": "2", + * "available": true, + * "displayMode": "lista", + * "dimensions": [ + * "Cores", + * "Tamanho", + * "País de origem", + * "Gênero" + * ], + * "dimensionsInputType": { + * "Cores": "Combo", + * "Tamanho": "Combo", + * "País de origem": "Combo", + * "Gênero": "Combo" + * }, + * "dimensionsMap": { + * "Cores": [ + * "Amarelo", + * "Azul", + * "Vermelho" + * ], + * "Tamanho": [ + * "P", + * "M", + * "G" + * ], + * "País de origem": [ + * "Brasil" + * ], + * "Gênero": [ + * "Masculino" + * ] + * }, + * "skus": [ + * { + * "sku": 310118454, + * "skuname": "Amarela - G", + * "dimensions": { + * "Cores": "Amarelo", + * "Tamanho": "G", + * "País de origem": "Brasil", + * "Gênero": "Masculino" + * }, + * "available": false, + * "availablequantity": 0, + * "cacheVersionUsedToCallCheckout": null, + * "listPriceFormated": "R$ 0,00", + * "listPrice": 0, + * "taxFormated": "R$ 0,00", + * "taxAsInt": 0, + * "bestPriceFormated": "R$ 9.999.876,00", + * "bestPrice": 999987600, + * "spotPrice": 999987600, + * "installments": 0, + * "installmentsValue": 0, + * "installmentsInsterestRate": null, + * "image": "https://lojadobreno.vteximg.com.br/arquivos/ids/155467-292-292/image-5d7ad76ad1954c53adecab4138319034.jpg?v=637321899584500000", + * "sellerId": "1", + * "seller": "lojadobreno", + * "measures": { + * "cubicweight": 1.0000, + * "height": 5.0000, + * "length": 20.0000, + * "weight": 200.0000, + * "width": 20.0000 + * }, + * "unitMultiplier": 1.0000, + * "rewardValue": 0 + * }, + * { + * "sku": 310118455, + * "skuname": "Vermelha - M", + * "dimensions": { + * "Cores": "Vermelho", + * "Tamanho": "M", + * "País de origem": "Brasil", + * "Gênero": "Masculino" + * }, + * "available": true, + * "availablequantity": 99999, + * "cacheVersionUsedToCallCheckout": "38395F1AEF59DF5CEAEDE472328145CD_", + * "listPriceFormated": "R$ 0,00", + * "listPrice": 0, + * "taxFormated": "R$ 0,00", + * "taxAsInt": 0, + * "bestPriceFormated": "R$ 20,00", + * "bestPrice": 2000, + * "spotPrice": 2000, + * "installments": 1, + * "installmentsValue": 2000, + * "installmentsInsterestRate": 0, + * "image": "https://lojadobreno.vteximg.com.br/arquivos/ids/155468-292-292/image-601a6099aace48b89d26fc9f22e8e611.jpg?v=637321906602470000", + * "sellerId": "pedrostore", + * "seller": "pedrostore", + * "measures": { + * "cubicweight": 0.4167, + * "height": 5.0000, + * "length": 20.0000, + * "weight": 200.0000, + * "width": 20.0000 + * }, + * "unitMultiplier": 1.0000, + * "rewardValue": 0 + * } + * ] + * } * ``` */ "GET /api/catalog_system/pub/products/variations/:productId": { @@ -1041,98 +1040,98 @@ rewardValue?: number response: number } /** - * This endpoint allows two types of request: - * - * **Type 1:** Creating a new Product as well as a new Category path (including subcategories) and a new Brand by using `CategoryPath` and `BrandName` parameters. - * - * **Type 2:** Creating a new Product given an existing `BrandId` and an existing `CategoryId`. - * - * When creating a product, regardless of the type of request, if there is a need to create a new product with a specific custom product ID, specify the `Id` (integer) in the request body. Otherwise, VTEX will generate the ID automatically. - * - * ## Request body examples - * - * ### Type 1 - * - * Request to create a product, associating it to a new Category and a new Brand by using `CategoryPath` and `BrandName`: - * - * ```json - * { - * "Name": "Black T-Shirt", - * "CategoryPath": "Mens/Clothing/T-Shirts", - * "BrandName": "Nike", - * "RefId": "31011706925", - * "Title": "Black T-Shirt", - * "LinkId": "tshirt-black", - * "Description": "This is a cool Tshirt", - * "ReleaseDate": "2022-01-01T00:00:00", - * "IsVisible": true, - * "IsActive": true, - * "TaxCode": "", - * "MetaTagDescription": "tshirt black", - * "ShowWithoutStock": true, - * "Score": 1 - * } - * ``` - * - * ### Type 2 - * - * Request to create a product, associating it to an existing `CategoryId` and `BrandId`: - * - * ```json - * { - * "Name": "insert product test", - * "DepartmentId": 1, - * "CategoryId": 2, - * "BrandId": 2000000, - * "LinkId": "insert-product-test", - * "RefId": "310117869", - * "IsVisible": true, - * "Description": "texto de descrição", - * "DescriptionShort": "Utilize o CEP 04548-005 para frete grátis", - * "ReleaseDate": "2019-01-01T00:00:00", - * "KeyWords": "teste,teste2", - * "Title": "product de teste", - * "IsActive": true, - * "TaxCode": "", - * "MetaTagDescription": "tag test", - * "SupplierId": 1, - * "ShowWithoutStock": true, - * "AdWordsRemarketingCode": null, - * "LomadeeCampaignCode": null, - * "Score": 1 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 52, - * "Name": "insert product test", - * "DepartmentId": 1, - * "CategoryId": 2, - * "BrandId": 2000000, - * "LinkId": "insert-product-test", - * "RefId": "310117869", - * "IsVisible": true, - * "Description": "texto de descrição", - * "DescriptionShort": "Utilize o CEP 04548-005 para frete grátis", - * "ReleaseDate": "2019-01-01T00:00:00", - * "KeyWords": "teste,teste2", - * "Title": "product de teste", - * "IsActive": true, - * "TaxCode": "", - * "MetaTagDescription": "tag test", - * "SupplierId": 1, - * "ShowWithoutStock": true, - * "AdWordsRemarketingCode": null, - * "LomadeeCampaignCode": null, - * "Score": 1 - * } - * ``` - * - * > 📘 Onboarding guide - * > + * This endpoint allows two types of request: + * + * **Type 1:** Creating a new Product as well as a new Category path (including subcategories) and a new Brand by using `CategoryPath` and `BrandName` parameters. + * + * **Type 2:** Creating a new Product given an existing `BrandId` and an existing `CategoryId`. + * + * When creating a product, regardless of the type of request, if there is a need to create a new product with a specific custom product ID, specify the `Id` (integer) in the request body. Otherwise, VTEX will generate the ID automatically. + * + * ## Request body examples + * + * ### Type 1 + * + * Request to create a product, associating it to a new Category and a new Brand by using `CategoryPath` and `BrandName`: + * + * ```json + * { + * "Name": "Black T-Shirt", + * "CategoryPath": "Mens/Clothing/T-Shirts", + * "BrandName": "Nike", + * "RefId": "31011706925", + * "Title": "Black T-Shirt", + * "LinkId": "tshirt-black", + * "Description": "This is a cool Tshirt", + * "ReleaseDate": "2022-01-01T00:00:00", + * "IsVisible": true, + * "IsActive": true, + * "TaxCode": "", + * "MetaTagDescription": "tshirt black", + * "ShowWithoutStock": true, + * "Score": 1 + * } + * ``` + * + * ### Type 2 + * + * Request to create a product, associating it to an existing `CategoryId` and `BrandId`: + * + * ```json + * { + * "Name": "insert product test", + * "DepartmentId": 1, + * "CategoryId": 2, + * "BrandId": 2000000, + * "LinkId": "insert-product-test", + * "RefId": "310117869", + * "IsVisible": true, + * "Description": "texto de descrição", + * "DescriptionShort": "Utilize o CEP 04548-005 para frete grátis", + * "ReleaseDate": "2019-01-01T00:00:00", + * "KeyWords": "teste,teste2", + * "Title": "product de teste", + * "IsActive": true, + * "TaxCode": "", + * "MetaTagDescription": "tag test", + * "SupplierId": 1, + * "ShowWithoutStock": true, + * "AdWordsRemarketingCode": null, + * "LomadeeCampaignCode": null, + * "Score": 1 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 52, + * "Name": "insert product test", + * "DepartmentId": 1, + * "CategoryId": 2, + * "BrandId": 2000000, + * "LinkId": "insert-product-test", + * "RefId": "310117869", + * "IsVisible": true, + * "Description": "texto de descrição", + * "DescriptionShort": "Utilize o CEP 04548-005 para frete grátis", + * "ReleaseDate": "2019-01-01T00:00:00", + * "KeyWords": "teste,teste2", + * "Title": "product de teste", + * "IsActive": true, + * "TaxCode": "", + * "MetaTagDescription": "tag test", + * "SupplierId": 1, + * "ShowWithoutStock": true, + * "AdWordsRemarketingCode": null, + * "LomadeeCampaignCode": null, + * "Score": 1 + * } + * ``` + * + * > 📘 Onboarding guide + * > * > Check the new [Catalog onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/catalog-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Catalog and is organized by focusing on the developer's journey. */ "POST /api/catalog/pvt/product": { @@ -1178,9 +1177,9 @@ IsVisible?: boolean */ Description?: string /** - * Short product description. This information can be displayed on both the product page and the shelf, using the following controls: - * Store Framework: `$product.DescriptionShort`. - * Legacy CMS Portal: ``. + * Short product description. This information can be displayed on both the product page and the shelf, using the following controls: + * Store Framework: `$product.DescriptionShort`. + * Legacy CMS Portal: ``. * */ DescriptionShort?: string @@ -1189,8 +1188,8 @@ DescriptionShort?: string */ ReleaseDate?: string /** - * Store Framework: Deprecated. - * Legacy CMS Portal: Keywords or synonyms related to the product, separated by comma (`,`). "Television", for example, can have a substitute word like "TV". This field is important to make your searches more comprehensive. + * Store Framework: Deprecated. + * Legacy CMS Portal: Keywords or synonyms related to the product, separated by comma (`,`). "Television", for example, can have a substitute word like "TV". This field is important to make your searches more comprehensive. * */ KeyWords?: string @@ -1271,9 +1270,9 @@ IsVisible?: boolean */ Description?: string /** - * Short product description. This information can be displayed on both the product page and the shelf, using the following controls: - * Store Framework: `$product.DescriptionShort`. - * Legacy CMS Portal: ``. + * Short product description. This information can be displayed on both the product page and the shelf, using the following controls: + * Store Framework: `$product.DescriptionShort`. + * Legacy CMS Portal: ``. * */ DescriptionShort?: string @@ -1282,8 +1281,8 @@ DescriptionShort?: string */ ReleaseDate?: string /** - * Store Framework: Deprecated. - * Legacy CMS Portal: Keywords or synonyms related to the product, separated by comma (`,`). "Television", for example, can have a substitute word like "TV". This field is important to make your searches more comprehensive. + * Store Framework: Deprecated. + * Legacy CMS Portal: Keywords or synonyms related to the product, separated by comma (`,`). "Television", for example, can have a substitute word like "TV". This field is important to make your searches more comprehensive. * */ KeyWords?: string @@ -1328,72 +1327,72 @@ Score?: number } } /** - * Retrieves all specifications of a product by the product's ID. - * > 📘 Onboarding guide - * > - * > Check the new [Catalog onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/catalog-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Catalog and is organized by focusing on the developer's journey. - * - * ### Response body example - * - * ```json - * [ - * { - * "Value": [ - * "Iron", - * "Plastic" - * ], - * "Id": 30, - * "Name": "Material" - * } - * ] + * Retrieves all specifications of a product by the product's ID. + * > 📘 Onboarding guide + * > + * > Check the new [Catalog onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/catalog-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Catalog and is organized by focusing on the developer's journey. + * + * ### Response body example + * + * ```json + * [ + * { + * "Value": [ + * "Iron", + * "Plastic" + * ], + * "Id": 30, + * "Name": "Material" + * } + * ] * ``` */ "GET /api/catalog_system/pvt/products/:productId/specification": { response: GetorUpdateProductSpecification[] } /** - * Updates the value of a product specification by the product's ID. The ID or name can be used to identify what product specification will be updated. Specification fields must be previously created in your Catalog. - * - * ### Request body example - * - * ```json - * [ - * { - * "Value": [ - * "Iron", - * "Plastic" - * ], - * "Id": 30, - * "Name": "Material" - * } - * ] + * Updates the value of a product specification by the product's ID. The ID or name can be used to identify what product specification will be updated. Specification fields must be previously created in your Catalog. + * + * ### Request body example + * + * ```json + * [ + * { + * "Value": [ + * "Iron", + * "Plastic" + * ], + * "Id": 30, + * "Name": "Material" + * } + * ] * ``` */ "POST /api/catalog_system/pvt/products/:productId/specification": { body: GetorUpdateProductSpecification[] } /** - * Retrieves information of all specifications of a product by the product's ID. - * - * ### Response body example - * - * ```json - * [ - * { - * "Id": 227, - * "ProductId": 1, - * "FieldId": 33, - * "FieldValueId": 135, - * "Text": "ValueA" - * }, - * { - * "Id": 228, - * "ProductId": 1, - * "FieldId": 34, - * "FieldValueId": 1, - * "Text": "Giant" - * } - * ] + * Retrieves information of all specifications of a product by the product's ID. + * + * ### Response body example + * + * ```json + * [ + * { + * "Id": 227, + * "ProductId": 1, + * "FieldId": 33, + * "FieldValueId": 135, + * "Text": "ValueA" + * }, + * { + * "Id": 228, + * "ProductId": 1, + * "FieldId": 34, + * "FieldValueId": 1, + * "Text": "Giant" + * } + * ] * ``` */ "GET /api/catalog/pvt/product/:productId/specification": { @@ -1421,27 +1420,27 @@ Text?: string }[] } /** - * Associates a previously defined Specification to a Product. - * - * ### Request body example - * - * ```json - * { - * "FieldId": 19, - * "FieldValueId": 1, - * "Text": "test" - * } - * ``` - * - * ### Response body example - * - * ```json - * { - * "Id": 41, - * "FieldId": 19, - * "FieldValueId": 1, - * "Text": "test" - * } + * Associates a previously defined Specification to a Product. + * + * ### Request body example + * + * ```json + * { + * "FieldId": 19, + * "FieldValueId": 1, + * "Text": "test" + * } + * ``` + * + * ### Response body example + * + * ```json + * { + * "Id": 41, + * "FieldId": 19, + * "FieldValueId": 1, + * "Text": "test" + * } * ``` */ "POST /api/catalog/pvt/product/:productId/specification": { @@ -1495,43 +1494,43 @@ Text?: string } /** - * Associates a specification to a product using specification name and group name. Automatically creates the informed group, specification and values if they had not been created before. - * - * ## Request body example - * - * ```json - * { - * "FieldName": "Material", - * "GroupName": "Additional Information", - * "RootLevelSpecification": false, - * "FieldValues": [ - * "Cotton", - * "Polyester" - * ] - * } - * ``` - * - * - * ## Response body example - * - * ```json - * [ - * { - * "Id": 53, - * "ProductId": 3, - * "FieldId": 21, - * "FieldValueId": 60, - * "Text": "Cotton" - * }, - * { - * "Id": 54, - * "ProductId": 3, - * "FieldId": 21, - * "FieldValueId": 61, - * "Text": "Polyester" - * } - * ] - * ``` + * Associates a specification to a product using specification name and group name. Automatically creates the informed group, specification and values if they had not been created before. + * + * ## Request body example + * + * ```json + * { + * "FieldName": "Material", + * "GroupName": "Additional Information", + * "RootLevelSpecification": false, + * "FieldValues": [ + * "Cotton", + * "Polyester" + * ] + * } + * ``` + * + * + * ## Response body example + * + * ```json + * [ + * { + * "Id": 53, + * "ProductId": 3, + * "FieldId": 21, + * "FieldValueId": 60, + * "Text": "Cotton" + * }, + * { + * "Id": 54, + * "ProductId": 3, + * "FieldId": 21, + * "FieldValueId": 61, + * "Text": "Polyester" + * } + * ] + * ``` * */ "PUT /api/catalog/pvt/product/:productId/specificationvalue": { @@ -1580,26 +1579,26 @@ Text?: string }[] } /** - * Retrieves the IDs of all SKUs in your store. Presents the results with page size and pagination. - * > 📘 Onboarding guide - * > - * > Check the new [Catalog onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/catalog-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Catalog and is organized by focusing on the developer's journey. - * - * ### Response body example - * - * ```json - * [ - * 1, - * 2, - * 3, - * 4, - * 5, - * 6, - * 7, - * 8, - * 9, - * 10 - * ] + * Retrieves the IDs of all SKUs in your store. Presents the results with page size and pagination. + * > 📘 Onboarding guide + * > + * > Check the new [Catalog onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/catalog-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Catalog and is organized by focusing on the developer's journey. + * + * ### Response body example + * + * ```json + * [ + * 1, + * 2, + * 3, + * 4, + * 5, + * 6, + * 7, + * 8, + * 9, + * 10 + * ] * ``` */ "GET /api/catalog_system/pvt/sku/stockkeepingunitids": { @@ -1619,209 +1618,209 @@ pagesize: number response: number[] } /** - * Retrieves context of an SKU. - * > 📘 Onboarding guide - * > - * > Check the new [Catalog onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/catalog-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Catalog and is organized by focusing on the developer's journey. - * - * ## Response body example - * - * ```json - * { - * "Id": 2001773, - * "ProductId": 2001426, - * "NameComplete": "Tabela de Basquete", - * "ComplementName": "", - * "ProductName": "Tabela de Basquete", - * "ProductDescription": "Tabela de Basquete", - * "SkuName": "Tabela de Basquete", - * "ProductRefId": "0987", - * "TaxCode": "", - * "IsActive": true, - * "IsTransported": true, - * "IsInventoried": true, - * "IsGiftCardRecharge": false, - * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168952-55-55/7508800GG.jpg", - * "DetailUrl": "/tabela-de-basquete/p", - * "CSCIdentification": null, - * "BrandId": "2000018", - * "BrandName": "MARCA ARGOLO TESTE", - * "IsBrandActive": true, - * "Dimension": { - * "cubicweight": 81.6833, - * "height": 65, - * "length": 58, - * "weight": 10000, - * "width": 130 - * }, - * "RealDimension": { - * "realCubicWeight": 274.1375, - * "realHeight": 241, - * "realLength": 65, - * "realWeight": 9800, - * "realWidth": 105 - * }, - * "ManufacturerCode": "", - * "IsKit": false, - * "KitItems": [], - * "Services": [], - * "Categories": [], - * "CategoriesFullPath": [ - * "/1/10/", - * "/1/", - * "/20/" - * ], - * "Attachments": [ - * { - * "Id": 3, - * "Name": "Mensagem", - * "Keys": [ - * "nome;20", - * "foto;40" - * ], - * "Fields": [ - * { - * "FieldName": "nome", - * "MaxCaracters": "20", - * "DomainValues": "Adalberto,Pedro,João" - * }, - * { - * "FieldName": "foto", - * "MaxCaracters": "40", - * "DomainValues": null - * } - * ], - * "IsActive": true, - * "IsRequired": false - * } - * ], - * "Collections": [], - * "SkuSellers": [ - * { - * "SellerId": "1", - * "StockKeepingUnitId": 2001773, - * "SellerStockKeepingUnitId": "2001773", - * "IsActive": true, - * "FreightCommissionPercentage": 0, - * "ProductCommissionPercentage": 0 - * } - * ], - * "SalesChannels": [ - * 1, - * 2, - * 3, - * 10 - * ], - * "Images": [ - * { - * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168952/7508800GG.jpg", - * "ImageName": "", - * "FileId": 168952 - * }, - * { - * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168953/7508800_1GG.jpg", - * "ImageName": "", - * "FileId": 168953 - * }, - * { - * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168954/7508800_2GG.jpg", - * "ImageName": "", - * "FileId": 168954 - * } - * ], - * "Videos": [ - * "www.google.com" - * ], - * "SkuSpecifications": [ - * { - * "FieldId": 102, - * "FieldName": "Cor", - * "FieldValueIds": [ - * 266 - * ], - * "FieldValues": [ - * "Padrão" - * ], - * "IsFilter": false, - * "FieldGroupId": 11, - * "FieldGroupName": "Especificações" - * } - * ], - * "ProductSpecifications": [ - * { - * "FieldId": 7, - * "FieldName": "Faixa Etária", - * "FieldValueIds": [ - * 58, - * 56, - * 55, - * 52 - * ], - * "FieldValues": [ - * "5 a 6 anos", - * "7 a 8 anos", - * "9 a 10 anos", - * "Acima de 10 anos" - * ], - * "IsFilter": true, - * "FieldGroupId": 17, - * "FieldGroupName": "NewGroupName 2" - * }, - * { - * "FieldId": 23, - * "FieldName": "Fabricante", - * "FieldValueIds": [], - * "FieldValues": [ - * "Xalingo" - * ], - * "IsFilter": false, - * "FieldGroupId": 17, - * "FieldGroupName": "NewGroupName 2" - * } - * ], - * "ProductClustersIds": "176,187,192,194,211,217,235,242", - * "PositionsInClusters": { - * "151": 3, - * "152": 0, - * "158": 1 - * }, - * "ProductClusterNames": { - * "151": "asdfghj", - * "152": "George", - * "158": "Coleção halloween" - * }, - * "ProductClusterHighlights": { - * "151": "asdfghj", - * "152": "George" - * }, - * "ProductCategoryIds": "/59/", - * "IsDirectCategoryActive": false, - * "ProductGlobalCategoryId": null, - * "ProductCategories": { - * "59": "Brinquedos" - * }, - * "CommercialConditionId": 1, - * "RewardValue": 100.0, - * "AlternateIds": { - * "Ean": "8781", - * "RefId": "878181" - * }, - * "AlternateIdValues": [ - * "8781", - * "878181" - * ], - * "EstimatedDateArrival": "", - * "MeasurementUnit": "un", - * "UnitMultiplier": 2.0000, - * "InformationSource": "Indexer", - * "ModalType": "", - * "KeyWords": "basquete, tabela", - * "ReleaseDate": "2020-01-06T00:00:00", - * "ProductIsVisible": true, - * "ShowIfNotAvailable": true, - * "IsProductActive": true, - * "ProductFinalScore": 0 - * } + * Retrieves context of an SKU. + * > 📘 Onboarding guide + * > + * > Check the new [Catalog onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/catalog-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Catalog and is organized by focusing on the developer's journey. + * + * ## Response body example + * + * ```json + * { + * "Id": 2001773, + * "ProductId": 2001426, + * "NameComplete": "Tabela de Basquete", + * "ComplementName": "", + * "ProductName": "Tabela de Basquete", + * "ProductDescription": "Tabela de Basquete", + * "SkuName": "Tabela de Basquete", + * "ProductRefId": "0987", + * "TaxCode": "", + * "IsActive": true, + * "IsTransported": true, + * "IsInventoried": true, + * "IsGiftCardRecharge": false, + * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168952-55-55/7508800GG.jpg", + * "DetailUrl": "/tabela-de-basquete/p", + * "CSCIdentification": null, + * "BrandId": "2000018", + * "BrandName": "MARCA ARGOLO TESTE", + * "IsBrandActive": true, + * "Dimension": { + * "cubicweight": 81.6833, + * "height": 65, + * "length": 58, + * "weight": 10000, + * "width": 130 + * }, + * "RealDimension": { + * "realCubicWeight": 274.1375, + * "realHeight": 241, + * "realLength": 65, + * "realWeight": 9800, + * "realWidth": 105 + * }, + * "ManufacturerCode": "", + * "IsKit": false, + * "KitItems": [], + * "Services": [], + * "Categories": [], + * "CategoriesFullPath": [ + * "/1/10/", + * "/1/", + * "/20/" + * ], + * "Attachments": [ + * { + * "Id": 3, + * "Name": "Mensagem", + * "Keys": [ + * "nome;20", + * "foto;40" + * ], + * "Fields": [ + * { + * "FieldName": "nome", + * "MaxCaracters": "20", + * "DomainValues": "Adalberto,Pedro,João" + * }, + * { + * "FieldName": "foto", + * "MaxCaracters": "40", + * "DomainValues": null + * } + * ], + * "IsActive": true, + * "IsRequired": false + * } + * ], + * "Collections": [], + * "SkuSellers": [ + * { + * "SellerId": "1", + * "StockKeepingUnitId": 2001773, + * "SellerStockKeepingUnitId": "2001773", + * "IsActive": true, + * "FreightCommissionPercentage": 0, + * "ProductCommissionPercentage": 0 + * } + * ], + * "SalesChannels": [ + * 1, + * 2, + * 3, + * 10 + * ], + * "Images": [ + * { + * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168952/7508800GG.jpg", + * "ImageName": "", + * "FileId": 168952 + * }, + * { + * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168953/7508800_1GG.jpg", + * "ImageName": "", + * "FileId": 168953 + * }, + * { + * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168954/7508800_2GG.jpg", + * "ImageName": "", + * "FileId": 168954 + * } + * ], + * "Videos": [ + * "www.google.com" + * ], + * "SkuSpecifications": [ + * { + * "FieldId": 102, + * "FieldName": "Cor", + * "FieldValueIds": [ + * 266 + * ], + * "FieldValues": [ + * "Padrão" + * ], + * "IsFilter": false, + * "FieldGroupId": 11, + * "FieldGroupName": "Especificações" + * } + * ], + * "ProductSpecifications": [ + * { + * "FieldId": 7, + * "FieldName": "Faixa Etária", + * "FieldValueIds": [ + * 58, + * 56, + * 55, + * 52 + * ], + * "FieldValues": [ + * "5 a 6 anos", + * "7 a 8 anos", + * "9 a 10 anos", + * "Acima de 10 anos" + * ], + * "IsFilter": true, + * "FieldGroupId": 17, + * "FieldGroupName": "NewGroupName 2" + * }, + * { + * "FieldId": 23, + * "FieldName": "Fabricante", + * "FieldValueIds": [], + * "FieldValues": [ + * "Xalingo" + * ], + * "IsFilter": false, + * "FieldGroupId": 17, + * "FieldGroupName": "NewGroupName 2" + * } + * ], + * "ProductClustersIds": "176,187,192,194,211,217,235,242", + * "PositionsInClusters": { + * "151": 3, + * "152": 0, + * "158": 1 + * }, + * "ProductClusterNames": { + * "151": "asdfghj", + * "152": "George", + * "158": "Coleção halloween" + * }, + * "ProductClusterHighlights": { + * "151": "asdfghj", + * "152": "George" + * }, + * "ProductCategoryIds": "/59/", + * "IsDirectCategoryActive": false, + * "ProductGlobalCategoryId": null, + * "ProductCategories": { + * "59": "Brinquedos" + * }, + * "CommercialConditionId": 1, + * "RewardValue": 100.0, + * "AlternateIds": { + * "Ean": "8781", + * "RefId": "878181" + * }, + * "AlternateIdValues": [ + * "8781", + * "878181" + * ], + * "EstimatedDateArrival": "", + * "MeasurementUnit": "un", + * "UnitMultiplier": 2.0000, + * "InformationSource": "Indexer", + * "ModalType": "", + * "KeyWords": "basquete, tabela", + * "ReleaseDate": "2020-01-06T00:00:00", + * "ProductIsVisible": true, + * "ShowIfNotAvailable": true, + * "IsProductActive": true, + * "ProductFinalScore": 0 + * } * ``` */ "GET /api/catalog_system/pvt/sku/stockkeepingunitbyid/:skuId": { @@ -1834,38 +1833,38 @@ sc?: number response: GetSKUandContext } /** - * Retrieves information about a specific SKU by its `RefId`. - * - * ### Response body example - * - * ```json - * { - * "Id": 1, - * "ProductId": 1, - * "IsActive": true, - * "Name": "Royal Canin Feline Urinary 500g", - * "RefId": "0001", - * "PackagedHeight": 6.0000, - * "PackagedLength": 24.0000, - * "PackagedWidth": 14.0000, - * "PackagedWeightKg": 550.0000, - * "Height": null, - * "Length": null, - * "Width": null, - * "WeightKg": null, - * "CubicWeight": 1.0000, - * "IsKit": false, - * "CreationDate": "2020-03-12T15:42:00", - * "RewardValue": null, - * "EstimatedDateArrival": null, - * "ManufacturerCode": "", - * "CommercialConditionId": 1, - * "MeasurementUnit": "un", - * "UnitMultiplier": 1.0000, - * "ModalType": null, - * "KitItensSellApart": false, - * "Videos": null - * } + * Retrieves information about a specific SKU by its `RefId`. + * + * ### Response body example + * + * ```json + * { + * "Id": 1, + * "ProductId": 1, + * "IsActive": true, + * "Name": "Royal Canin Feline Urinary 500g", + * "RefId": "0001", + * "PackagedHeight": 6.0000, + * "PackagedLength": 24.0000, + * "PackagedWidth": 14.0000, + * "PackagedWeightKg": 550.0000, + * "Height": null, + * "Length": null, + * "Width": null, + * "WeightKg": null, + * "CubicWeight": 1.0000, + * "IsKit": false, + * "CreationDate": "2020-03-12T15:42:00", + * "RewardValue": null, + * "EstimatedDateArrival": null, + * "ManufacturerCode": "", + * "CommercialConditionId": 1, + * "MeasurementUnit": "un", + * "UnitMultiplier": 1.0000, + * "ModalType": null, + * "KitItensSellApart": false, + * "Videos": null + * } * ``` */ "GET /api/catalog/pvt/stockkeepingunit": { @@ -1983,111 +1982,111 @@ Videos?: (null | string) } } /** - * - * - * Creates a new SKU. - * - * If there is a need to create a new SKU with a specific custom ID, specify the `Id` (integer) in the request. Otherwise, VTEX will generate the ID automatically. - * - * ### Request body example (custom ID) - * - * ```json - * { - * "Id": 1, - * "ProductId": 310117069, - * "IsActive": false, - * "ActivateIfPossible": true, - * "Name": "sku test", - * "RefId": "125478", - * "Ean": "8949461894984", - * "PackagedHeight": 10, - * "PackagedLength": 10, - * "PackagedWidth": 10, - * "PackagedWeightKg": 10, - * "Height": null, - * "Length": null, - * "Width": null, - * "WeightKg": null, - * "CubicWeight": 0.1667, - * "IsKit": false, - * "CreationDate": null, - * "RewardValue": null, - * "EstimatedDateArrival": null, - * "ManufacturerCode": "123", - * "CommercialConditionId": 1, - * "MeasurementUnit": "un", - * "UnitMultiplier": 2.0000, - * "ModalType": null, - * "KitItensSellApart": false, - * "Videos": [ "https://www.youtube.com/" ] - * } - * ``` - * - * ### Request body example (automatically generated ID) - * - * ```json - * { - * "ProductId": 310117069, - * "IsActive": false, - * "ActivateIfPossible": true, - * "Name": "sku test", - * "RefId": "125478", - * "Ean": "8949461894984", - * "PackagedHeight": 10, - * "PackagedLength": 10, - * "PackagedWidth": 10, - * "PackagedWeightKg": 10, - * "Height": null, - * "Length": null, - * "Width": null, - * "WeightKg": null, - * "CubicWeight": 0.1667, - * "IsKit": false, - * "CreationDate": null, - * "RewardValue": null, - * "EstimatedDateArrival": null, - * "ManufacturerCode": "123", - * "CommercialConditionId": 1, - * "MeasurementUnit": "un", - * "UnitMultiplier": 2.0000, - * "ModalType": null, - * "KitItensSellApart": false, - * "Videos": [ "https://www.youtube.com/" ] - * } - * ``` - * - * ### Response body example - * - * ```json - * { - * "Id":1, - * "ProductId": 310117069, - * "IsActive": false, - * "ActivateIfPossible": true, - * "Name": "sku test", - * "RefId": "125478", - * "Ean": "8949461894984", - * "PackagedHeight": 10, - * "PackagedLength": 10, - * "PackagedWidth": 10, - * "PackagedWeightKg": 10, - * "Height": null, - * "Length": null, - * "Width": null, - * "WeightKg": null, - * "CubicWeight": 0.1667, - * "IsKit": false, - * "CreationDate": null, - * "RewardValue": null, - * "EstimatedDateArrival": null, - * "ManufacturerCode": "123", - * "CommercialConditionId": 1, - * "MeasurementUnit": "un", - * "UnitMultiplier": 2.0000, - * "ModalType": null, - * "KitItensSellApart": false, - * "Videos": [ "https://www.youtube.com/" ] - * } + * + * + * Creates a new SKU. + * + * If there is a need to create a new SKU with a specific custom ID, specify the `Id` (integer) in the request. Otherwise, VTEX will generate the ID automatically. + * + * ### Request body example (custom ID) + * + * ```json + * { + * "Id": 1, + * "ProductId": 310117069, + * "IsActive": false, + * "ActivateIfPossible": true, + * "Name": "sku test", + * "RefId": "125478", + * "Ean": "8949461894984", + * "PackagedHeight": 10, + * "PackagedLength": 10, + * "PackagedWidth": 10, + * "PackagedWeightKg": 10, + * "Height": null, + * "Length": null, + * "Width": null, + * "WeightKg": null, + * "CubicWeight": 0.1667, + * "IsKit": false, + * "CreationDate": null, + * "RewardValue": null, + * "EstimatedDateArrival": null, + * "ManufacturerCode": "123", + * "CommercialConditionId": 1, + * "MeasurementUnit": "un", + * "UnitMultiplier": 2.0000, + * "ModalType": null, + * "KitItensSellApart": false, + * "Videos": [ "https://www.youtube.com/" ] + * } + * ``` + * + * ### Request body example (automatically generated ID) + * + * ```json + * { + * "ProductId": 310117069, + * "IsActive": false, + * "ActivateIfPossible": true, + * "Name": "sku test", + * "RefId": "125478", + * "Ean": "8949461894984", + * "PackagedHeight": 10, + * "PackagedLength": 10, + * "PackagedWidth": 10, + * "PackagedWeightKg": 10, + * "Height": null, + * "Length": null, + * "Width": null, + * "WeightKg": null, + * "CubicWeight": 0.1667, + * "IsKit": false, + * "CreationDate": null, + * "RewardValue": null, + * "EstimatedDateArrival": null, + * "ManufacturerCode": "123", + * "CommercialConditionId": 1, + * "MeasurementUnit": "un", + * "UnitMultiplier": 2.0000, + * "ModalType": null, + * "KitItensSellApart": false, + * "Videos": [ "https://www.youtube.com/" ] + * } + * ``` + * + * ### Response body example + * + * ```json + * { + * "Id":1, + * "ProductId": 310117069, + * "IsActive": false, + * "ActivateIfPossible": true, + * "Name": "sku test", + * "RefId": "125478", + * "Ean": "8949461894984", + * "PackagedHeight": 10, + * "PackagedLength": 10, + * "PackagedWidth": 10, + * "PackagedWeightKg": 10, + * "Height": null, + * "Length": null, + * "Width": null, + * "WeightKg": null, + * "CubicWeight": 0.1667, + * "IsKit": false, + * "CreationDate": null, + * "RewardValue": null, + * "EstimatedDateArrival": null, + * "ManufacturerCode": "123", + * "CommercialConditionId": 1, + * "MeasurementUnit": "un", + * "UnitMultiplier": 2.0000, + * "ModalType": null, + * "KitItensSellApart": false, + * "Videos": [ "https://www.youtube.com/" ] + * } * ``` */ "POST /api/catalog/pvt/stockkeepingunit": { @@ -2313,12 +2312,12 @@ Videos?: string[] } } /** - * Retrieves an SKU ID by the SKU's Reference ID. - * - * ### Response body example - * - * ```json - * "310118450" + * Retrieves an SKU ID by the SKU's Reference ID. + * + * ### Response body example + * + * ```json + * "310118450" * ``` */ "GET /api/catalog_system/pvt/sku/stockkeepingunitidbyrefid/:refId": { @@ -2328,205 +2327,205 @@ Videos?: string[] response: string } /** - * Retrieves an SKU by its Alternate ID. - * - * ### Response body example - * - * ```json - * { - * "Id": 310118450, - * "ProductId": 2, - * "NameComplete": "Caixa de Areia Azul Petmate sku test", - * "ComplementName": "", - * "ProductName": "Caixa de Areia Azul Petmate", - * "ProductDescription": "", - * "ProductRefId": "", - * "TaxCode": "", - * "SkuName": "sku test", - * "IsActive": true, - * "IsTransported": true, - * "IsInventoried": true, - * "IsGiftCardRecharge": false, - * "ImageUrl": "https://lojadobreno.vteximg.com.br/arquivos/ids/155451-55-55/caixa-areia-azul-petmate.jpg?v=637139451191670000", - * "DetailUrl": "/caixa-de-areia-azul-petmate/p", - * "CSCIdentification": null, - * "BrandId": "2000005", - * "BrandName": "Petmate", - * "IsBrandActive": true, - * "Dimension": { - * "cubicweight": 0.2083, - * "height": 10.0000, - * "length": 10.0000, - * "weight": 10.0000, - * "width": 10.0000 - * }, - * "RealDimension": { - * "realCubicWeight": 0.000, - * "realHeight": 0.0, - * "realLength": 0.0, - * "realWeight": 0.0, - * "realWidth": 0.0 - * }, - * "ManufacturerCode": "123", - * "IsKit": false, - * "KitItems": [], - * "Services": [], - * "Categories": [], - * "CategoriesFullPath": [ - * "/3/15/", - * "/3/", - * "/1/" - * ], - * "Attachments": [], - * "Collections": [], - * "SkuSellers": [ - * { - * "SellerId": "1", - * "StockKeepingUnitId": 310118450, - * "SellerStockKeepingUnitId": "310118450", - * "IsActive": true, - * "FreightCommissionPercentage": 0.0, - * "ProductCommissionPercentage": 0.0 - * } - * ], - * "SalesChannels": [ - * 1, - * 3 - * ], - * "Images": [ - * { - * "ImageUrl": "https://lojadobreno.vteximg.com.br/arquivos/ids/155451/caixa-areia-azul-petmate.jpg?v=637139451191670000", - * "ImageName": null, - * "FileId": 155451 - * } - * ], - * "Videos": [], - * "SkuSpecifications": [], - * "ProductSpecifications": [], - * "ProductClustersIds": "151,158", - * "PositionsInClusters": { - * "151": 1, - * "158": 2 - * }, - * "ProductClusterNames": { - * "151": "asdfghj", - * "158": "Coleção halloween" - * }, - * "ProductClusterHighlights": { - * "151": "asdfghj" - * }, - * "ProductCategoryIds": "/3/15/", - * "IsDirectCategoryActive": true, - * "ProductGlobalCategoryId": 5000, - * "ProductCategories": { - * "15": "Caixa de Areia", - * "3": "Higiene", - * "1": "Alimentação" - * }, - * "CommercialConditionId": 1, - * "RewardValue": 0.0, - * "AlternateIds": { - * "RefId": "1" - * }, - * "AlternateIdValues": [ - * "1" - * ], - * "EstimatedDateArrival": null, - * "MeasurementUnit": "un", - * "UnitMultiplier": 1.0000, - * "InformationSource": null, - * "ModalType": null, - * "KeyWords": "", - * "ReleaseDate": "2020-01-06T00:00:00Z", - * "ProductIsVisible": true, - * "ShowIfNotAvailable": true, - * "IsProductActive": true, - * "ProductFinalScore": 0 - * } + * Retrieves an SKU by its Alternate ID. + * + * ### Response body example + * + * ```json + * { + * "Id": 310118450, + * "ProductId": 2, + * "NameComplete": "Caixa de Areia Azul Petmate sku test", + * "ComplementName": "", + * "ProductName": "Caixa de Areia Azul Petmate", + * "ProductDescription": "", + * "ProductRefId": "", + * "TaxCode": "", + * "SkuName": "sku test", + * "IsActive": true, + * "IsTransported": true, + * "IsInventoried": true, + * "IsGiftCardRecharge": false, + * "ImageUrl": "https://lojadobreno.vteximg.com.br/arquivos/ids/155451-55-55/caixa-areia-azul-petmate.jpg?v=637139451191670000", + * "DetailUrl": "/caixa-de-areia-azul-petmate/p", + * "CSCIdentification": null, + * "BrandId": "2000005", + * "BrandName": "Petmate", + * "IsBrandActive": true, + * "Dimension": { + * "cubicweight": 0.2083, + * "height": 10.0000, + * "length": 10.0000, + * "weight": 10.0000, + * "width": 10.0000 + * }, + * "RealDimension": { + * "realCubicWeight": 0.000, + * "realHeight": 0.0, + * "realLength": 0.0, + * "realWeight": 0.0, + * "realWidth": 0.0 + * }, + * "ManufacturerCode": "123", + * "IsKit": false, + * "KitItems": [], + * "Services": [], + * "Categories": [], + * "CategoriesFullPath": [ + * "/3/15/", + * "/3/", + * "/1/" + * ], + * "Attachments": [], + * "Collections": [], + * "SkuSellers": [ + * { + * "SellerId": "1", + * "StockKeepingUnitId": 310118450, + * "SellerStockKeepingUnitId": "310118450", + * "IsActive": true, + * "FreightCommissionPercentage": 0.0, + * "ProductCommissionPercentage": 0.0 + * } + * ], + * "SalesChannels": [ + * 1, + * 3 + * ], + * "Images": [ + * { + * "ImageUrl": "https://lojadobreno.vteximg.com.br/arquivos/ids/155451/caixa-areia-azul-petmate.jpg?v=637139451191670000", + * "ImageName": null, + * "FileId": 155451 + * } + * ], + * "Videos": [], + * "SkuSpecifications": [], + * "ProductSpecifications": [], + * "ProductClustersIds": "151,158", + * "PositionsInClusters": { + * "151": 1, + * "158": 2 + * }, + * "ProductClusterNames": { + * "151": "asdfghj", + * "158": "Coleção halloween" + * }, + * "ProductClusterHighlights": { + * "151": "asdfghj" + * }, + * "ProductCategoryIds": "/3/15/", + * "IsDirectCategoryActive": true, + * "ProductGlobalCategoryId": 5000, + * "ProductCategories": { + * "15": "Caixa de Areia", + * "3": "Higiene", + * "1": "Alimentação" + * }, + * "CommercialConditionId": 1, + * "RewardValue": 0.0, + * "AlternateIds": { + * "RefId": "1" + * }, + * "AlternateIdValues": [ + * "1" + * ], + * "EstimatedDateArrival": null, + * "MeasurementUnit": "un", + * "UnitMultiplier": 1.0000, + * "InformationSource": null, + * "ModalType": null, + * "KeyWords": "", + * "ReleaseDate": "2020-01-06T00:00:00Z", + * "ProductIsVisible": true, + * "ShowIfNotAvailable": true, + * "IsProductActive": true, + * "ProductFinalScore": 0 + * } * ``` */ "GET /api/catalog_system/pvt/sku/stockkeepingunitbyalternateId/:alternateId": { response: GetSKUAltID } /** - * Retrieves a list with the SKUs related to a product by the product's ID. - * - * ### Response body example - * - * ```json - * [ - * { - * "IsPersisted": true, - * "IsRemoved": false, - * "Id": 2000035, - * "ProductId": 2000024, - * "IsActive": true, - * "Name": "33 - Preto", - * "Height": 8, - * "RealHeight": null, - * "Width": 15, - * "RealWidth": null, - * "Length": 8, - * "RealLength": null, - * "WeightKg": 340, - * "RealWeightKg": null, - * "ModalId": 1, - * "RefId": "", - * "CubicWeight": 0.2, - * "IsKit": false, - * "IsDynamicKit": null, - * "InternalNote": null, - * "DateUpdated": "2015-11-06T19:10:00", - * "RewardValue": 0.01, - * "CommercialConditionId": 1, - * "EstimatedDateArrival": "", - * "FlagKitItensSellApart": false, - * "ManufacturerCode": "", - * "ReferenceStockKeepingUnitId": null, - * "Position": 0, - * "EditionSkuId": null, - * "ApprovedAdminId": 123, - * "EditionAdminId": 123, - * "ActivateIfPossible": true, - * "SupplierCode": null, - * "MeasurementUnit": "un", - * "UnitMultiplier": 2.0000, - * "IsInventoried": null, - * "IsTransported": null, - * "IsGiftCardRecharge": null, - * "ModalType": "" - * } - * ] + * Retrieves a list with the SKUs related to a product by the product's ID. + * + * ### Response body example + * + * ```json + * [ + * { + * "IsPersisted": true, + * "IsRemoved": false, + * "Id": 2000035, + * "ProductId": 2000024, + * "IsActive": true, + * "Name": "33 - Preto", + * "Height": 8, + * "RealHeight": null, + * "Width": 15, + * "RealWidth": null, + * "Length": 8, + * "RealLength": null, + * "WeightKg": 340, + * "RealWeightKg": null, + * "ModalId": 1, + * "RefId": "", + * "CubicWeight": 0.2, + * "IsKit": false, + * "IsDynamicKit": null, + * "InternalNote": null, + * "DateUpdated": "2015-11-06T19:10:00", + * "RewardValue": 0.01, + * "CommercialConditionId": 1, + * "EstimatedDateArrival": "", + * "FlagKitItensSellApart": false, + * "ManufacturerCode": "", + * "ReferenceStockKeepingUnitId": null, + * "Position": 0, + * "EditionSkuId": null, + * "ApprovedAdminId": 123, + * "EditionAdminId": 123, + * "ActivateIfPossible": true, + * "SupplierCode": null, + * "MeasurementUnit": "un", + * "UnitMultiplier": 2.0000, + * "IsInventoried": null, + * "IsTransported": null, + * "IsGiftCardRecharge": null, + * "ModalType": "" + * } + * ] * ``` */ "GET /api/catalog_system/pvt/sku/stockkeepingunitByProductId/:productId": { response: SkulistbyProductId[] } /** - * Receives a list of Reference IDs and returns a list with the corresponding SKU IDs. - * - * >⚠️ The list of Reference IDs in the request body cannot have repeated Reference IDs, or the API will return an error 500. - * - * ## Request body example - * - * ```json - * [ - * "123", - * "D25133K-B2", - * "14-556", - * "DCF880L2-BR" - * ] - * ``` - * - * ### Response body example - * - * ```json - * { - * "123": "435", - * "D25133K-B2": "4351", - * "14-556": "3155", - * "DCF880L2-BR": "4500" - * } + * Receives a list of Reference IDs and returns a list with the corresponding SKU IDs. + * + * >⚠️ The list of Reference IDs in the request body cannot have repeated Reference IDs, or the API will return an error 500. + * + * ## Request body example + * + * ```json + * [ + * "123", + * "D25133K-B2", + * "14-556", + * "DCF880L2-BR" + * ] + * ``` + * + * ### Response body example + * + * ```json + * { + * "123": "435", + * "D25133K-B2": "4351", + * "14-556": "3155", + * "DCF880L2-BR": "4500" + * } * ``` */ "POST /api/catalog_system/pub/sku/stockkeepingunitidsbyrefids": { @@ -2545,44 +2544,44 @@ response: { } } /** - * Retrieves a specific SKU by its ID. - * - * ### Response body example - * - * ```json - * { - * "Id": 1, - * "ProductId": 1, - * "IsActive": true, - * "ActivateIfPossible": true, - * "Name": "Ração Royal Canin Feline Urinary 500g", - * "RefId": "0001", - * "PackagedHeight": 6.5000, - * "PackagedLength": 24.0000, - * "PackagedWidth": 14.0000, - * "PackagedWeightKg": 550.0000, - * "Height": 2.2000, - * "Length": 4.4000, - * "Width": 3.3000, - * "WeightKg": 1.1000, - * "CubicWeight": 0.4550, - * "IsKit": false, - * "CreationDate": "2021-06-08T15:25:00", - * "RewardValue": null, - * "EstimatedDateArrival": null, - * "ManufacturerCode": "", - * "CommercialConditionId": 1, - * "MeasurementUnit": "un", - * "UnitMultiplier": 300.0000, - * "ModalType": null, - * "KitItensSellApart": false, - * "Videos": [ - * "www.google.com" - * ] - * } - * ``` - * > 📘 Onboarding guide - * > + * Retrieves a specific SKU by its ID. + * + * ### Response body example + * + * ```json + * { + * "Id": 1, + * "ProductId": 1, + * "IsActive": true, + * "ActivateIfPossible": true, + * "Name": "Ração Royal Canin Feline Urinary 500g", + * "RefId": "0001", + * "PackagedHeight": 6.5000, + * "PackagedLength": 24.0000, + * "PackagedWidth": 14.0000, + * "PackagedWeightKg": 550.0000, + * "Height": 2.2000, + * "Length": 4.4000, + * "Width": 3.3000, + * "WeightKg": 1.1000, + * "CubicWeight": 0.4550, + * "IsKit": false, + * "CreationDate": "2021-06-08T15:25:00", + * "RewardValue": null, + * "EstimatedDateArrival": null, + * "ManufacturerCode": "", + * "CommercialConditionId": 1, + * "MeasurementUnit": "un", + * "UnitMultiplier": 300.0000, + * "ModalType": null, + * "KitItensSellApart": false, + * "Videos": [ + * "www.google.com" + * ] + * } + * ``` + * > 📘 Onboarding guide + * > * > Check the new [Catalog onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/catalog-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Catalog and is organized by focusing on the developer's journey. */ "GET /api/catalog/pvt/stockkeepingunit/:skuId": { @@ -2694,72 +2693,72 @@ Videos?: string[] } } /** - * Updates an existing SKU. - * - * ### Request body example - * - * ```json - * { - * "Id": 310118448, - * "ProductId": 310117069, - * "IsActive": true, - * "ActivateIfPossible": true, - * "Name": "sku test", - * "RefId": "125478", - * "PackagedHeight": 10, - * "PackagedLength": 10, - * "PackagedWidth": 10, - * "PackagedWeightKg": 10, - * "Height": null, - * "Length": null, - * "Width": null, - * "WeightKg": null, - * "CubicWeight": 0.1667, - * "IsKit": false, - * "CreationDate": null, - * "RewardValue": null, - * "EstimatedDateArrival": null, - * "ManufacturerCode": "123", - * "CommercialConditionId": 1, - * "MeasurementUnit": "un", - * "UnitMultiplier": 2.0000, - * "ModalType": null, - * "KitItensSellApart": false, - * "Videos": [ "https://www.youtube.com/" ] - * } - * ``` - * - * ### Response body example - * - * ```json - * { - * "Id": 310118449, - * "ProductId": 1, - * "IsActive": true, - * "ActivateIfPossible": true, - * "Name": "sku test", - * "RefId": "1254789", - * "PackagedHeight": 10.0, - * "PackagedLength": 10.0, - * "PackagedWidth": 10.0, - * "PackagedWeightKg": 10.0, - * "Height": null, - * "Length": null, - * "Width": null, - * "WeightKg": null, - * "CubicWeight": 0.1667, - * "IsKit": false, - * "CreationDate": "2020-04-22T12:12:47.5219561", - * "RewardValue": null, - * "EstimatedDateArrival": null, - * "ManufacturerCode": "123", - * "CommercialConditionId": 1, - * "MeasurementUnit": "un", - * "UnitMultiplier": 2.0000, - * "ModalType": null, - * "KitItensSellApart": false, - * "Videos": [ "https://www.youtube.com/" ] - * } + * Updates an existing SKU. + * + * ### Request body example + * + * ```json + * { + * "Id": 310118448, + * "ProductId": 310117069, + * "IsActive": true, + * "ActivateIfPossible": true, + * "Name": "sku test", + * "RefId": "125478", + * "PackagedHeight": 10, + * "PackagedLength": 10, + * "PackagedWidth": 10, + * "PackagedWeightKg": 10, + * "Height": null, + * "Length": null, + * "Width": null, + * "WeightKg": null, + * "CubicWeight": 0.1667, + * "IsKit": false, + * "CreationDate": null, + * "RewardValue": null, + * "EstimatedDateArrival": null, + * "ManufacturerCode": "123", + * "CommercialConditionId": 1, + * "MeasurementUnit": "un", + * "UnitMultiplier": 2.0000, + * "ModalType": null, + * "KitItensSellApart": false, + * "Videos": [ "https://www.youtube.com/" ] + * } + * ``` + * + * ### Response body example + * + * ```json + * { + * "Id": 310118449, + * "ProductId": 1, + * "IsActive": true, + * "ActivateIfPossible": true, + * "Name": "sku test", + * "RefId": "1254789", + * "PackagedHeight": 10.0, + * "PackagedLength": 10.0, + * "PackagedWidth": 10.0, + * "PackagedWeightKg": 10.0, + * "Height": null, + * "Length": null, + * "Width": null, + * "WeightKg": null, + * "CubicWeight": 0.1667, + * "IsKit": false, + * "CreationDate": "2020-04-22T12:12:47.5219561", + * "RewardValue": null, + * "EstimatedDateArrival": null, + * "ManufacturerCode": "123", + * "CommercialConditionId": 1, + * "MeasurementUnit": "un", + * "UnitMultiplier": 2.0000, + * "ModalType": null, + * "KitItensSellApart": false, + * "Videos": [ "https://www.youtube.com/" ] + * } * ``` */ "PUT /api/catalog/pvt/stockkeepingunit/:skuId": { @@ -2973,56 +2972,56 @@ Videos?: string[] } } /** - * Retrieves an existing SKU Complement by its SKU ID. - * - * ## Response body example - * - * ```json - * [ - * { - * "Id": 61, - * "SkuId": 7, - * "ParentSkuId": 1, - * "ComplementTypeId": 1 - * } - * ] + * Retrieves an existing SKU Complement by its SKU ID. + * + * ## Response body example + * + * ```json + * [ + * { + * "Id": 61, + * "SkuId": 7, + * "ParentSkuId": 1, + * "ComplementTypeId": 1 + * } + * ] * ``` */ "GET /api/catalog/pvt/stockkeepingunit/:skuId/complement": { response: SkuComplement } /** - * Retrieves all the existing SKU Complements with the same Complement Type ID of a specific SKU. - * - * ## Response body example - * - * ```json - * [ - * { - * "Id": 61, - * "SkuId": 7, - * "ParentSkuId": 1, - * "ComplementTypeId": 1 - * } - * ] + * Retrieves all the existing SKU Complements with the same Complement Type ID of a specific SKU. + * + * ## Response body example + * + * ```json + * [ + * { + * "Id": 61, + * "SkuId": 7, + * "ParentSkuId": 1, + * "ComplementTypeId": 1 + * } + * ] * ``` */ "GET /api/catalog/pvt/stockkeepingunit/:skuId/complement/:complementTypeId": { response: SkuComplement } /** - * Retrieves all the existing SKU complements with the same complement type ID of a specific SKU. - * - * ## Response body example - * - * ```json - * { - * "ParentSkuId": 1, - * "ComplementSkuIds": [ - * 7 - * ], - * "Type": "1" - * } + * Retrieves all the existing SKU complements with the same complement type ID of a specific SKU. + * + * ## Response body example + * + * ```json + * { + * "ParentSkuId": 1, + * "ComplementSkuIds": [ + * 7 + * ], + * "Type": "1" + * } * ``` */ "GET /api/catalog_system/pvt/sku/complements/:parentSkuId/:type": { @@ -3042,27 +3041,27 @@ Type: string } } /** - * Creates a new SKU Complement on a Parent SKU. - * - * ## Request body example - * - * ```json - * { - * "SkuId": 2, - * "ParentSkuId": 1, - * "ComplementTypeId": 2 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 62, - * "SkuId": 2, - * "ParentSkuId": 1, - * "ComplementTypeId": 2 - * } + * Creates a new SKU Complement on a Parent SKU. + * + * ## Request body example + * + * ```json + * { + * "SkuId": 2, + * "ParentSkuId": 1, + * "ComplementTypeId": 2 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 62, + * "SkuId": 2, + * "ParentSkuId": 1, + * "ComplementTypeId": 2 + * } * ``` */ "POST /api/catalog/pvt/skucomplement": { @@ -3083,17 +3082,17 @@ ComplementTypeId: number response: SkuComplement } /** - * Retrieves an existing SKU Complement by its SKU Complement ID. - * - * ## Response body example - * - * ```json - * { - * "Id": 62, - * "SkuId": 2, - * "ParentSkuId": 1, - * "ComplementTypeId": 2 - * } + * Retrieves an existing SKU Complement by its SKU Complement ID. + * + * ## Response body example + * + * ```json + * { + * "Id": 62, + * "SkuId": 2, + * "ParentSkuId": 1, + * "ComplementTypeId": 2 + * } * ``` */ "GET /api/catalog/pvt/skucomplement/:skuComplementId": { @@ -3106,176 +3105,176 @@ response: SkuComplement } /** - * Retrieves an SKU by its EAN ID. - * ## Response body example - * - * ```json - * { - * "Id": 2001773, - * "ProductId": 2001426, - * "NameComplete": "Tabela de Basquete", - * "ProductName": "Tabela de Basquete", - * "ProductDescription": "Tabela de Basquete", - * "SkuName": "Tabela de Basquete", - * "IsActive": true, - * "IsTransported": true, - * "IsInventoried": true, - * "IsGiftCardRecharge": false, - * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168952-55-55/7508800GG.jpg", - * "DetailUrl": "/tabela-de-basquete/p", - * "CSCIdentification": null, - * "BrandId": "2000018", - * "BrandName": "MARCA ARGOLO TESTE", - * "Dimension": { - * "cubicweight": 81.6833, - * "height": 65, - * "length": 58, - * "weight": 10000, - * "width": 130 - * }, - * "RealDimension": { - * "realCubicWeight": 274.1375, - * "realHeight": 241, - * "realLength": 65, - * "realWeight": 9800, - * "realWidth": 105 - * }, - * "ManufacturerCode": "", - * "IsKit": false, - * "KitItems": [], - * "Services": [], - * "Categories": [], - * "Attachments": [ - * { - * "Id": 3, - * "Name": "Mensagem", - * "Keys": [ - * "nome;20", - * "foto;40" - * ], - * "Fields": [ - * { - * "FieldName": "nome", - * "MaxCaracters": "20", - * "DomainValues": "Adalberto,Pedro,João" - * }, - * { - * "FieldName": "foto", - * "MaxCaracters": "40", - * "DomainValues": null - * } - * ], - * "IsActive": true, - * "IsRequired": false - * } - * ], - * "Collections": [], - * "SkuSellers": [ - * { - * "SellerId": "1", - * "StockKeepingUnitId": 2001773, - * "SellerStockKeepingUnitId": "2001773", - * "IsActive": true, - * "FreightCommissionPercentage": 0, - * "ProductCommissionPercentage": 0 - * } - * ], - * "SalesChannels": [ - * 1, - * 2, - * 3, - * 10 - * ], - * "Images": [ - * { - * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168952/7508800GG.jpg", - * "ImageName": "", - * "FileId": 168952 - * }, - * { - * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168953/7508800_1GG.jpg", - * "ImageName": "", - * "FileId": 168953 - * }, - * { - * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168954/7508800_2GG.jpg", - * "ImageName": "", - * "FileId": 168954 - * } - * ], - * "SkuSpecifications": [ - * { - * "FieldId": 102, - * "FieldName": "Cor", - * "FieldValueIds": [ - * 266 - * ], - * "FieldValues": [ - * "Padrão" - * ] - * } - * ], - * "ProductSpecifications": [ - * { - * "FieldId": 7, - * "FieldName": "Faixa Etária", - * "FieldValueIds": [ - * 58, - * 56, - * 55, - * 52 - * ], - * "FieldValues": [ - * "5 a 6 anos", - * "7 a 8 anos", - * "9 a 10 anos", - * "Acima de 10 anos" - * ] - * }, - * { - * "FieldId": 23, - * "FieldName": "Fabricante", - * "FieldValueIds": [], - * "FieldValues": [ - * "Xalingo" - * ] - * } - * ], - * "ProductClustersIds": "176,187,192,194,211,217,235,242", - * "ProductCategoryIds": "/59/", - * "ProductGlobalCategoryId": null, - * "ProductCategories": { - * "59": "Brinquedos" - * }, - * "CommercialConditionId": 1, - * "RewardValue": 100.0, - * "AlternateIds": { - * "Ean": "8781", - * "RefId": "878181" - * }, - * "AlternateIdValues": [ - * "8781", - * "878181" - * ], - * "EstimatedDateArrival": "", - * "MeasurementUnit": "un", - * "UnitMultiplier": 2.0000, - * "InformationSource": null, - * "ModalType": "" - * } + * Retrieves an SKU by its EAN ID. + * ## Response body example + * + * ```json + * { + * "Id": 2001773, + * "ProductId": 2001426, + * "NameComplete": "Tabela de Basquete", + * "ProductName": "Tabela de Basquete", + * "ProductDescription": "Tabela de Basquete", + * "SkuName": "Tabela de Basquete", + * "IsActive": true, + * "IsTransported": true, + * "IsInventoried": true, + * "IsGiftCardRecharge": false, + * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168952-55-55/7508800GG.jpg", + * "DetailUrl": "/tabela-de-basquete/p", + * "CSCIdentification": null, + * "BrandId": "2000018", + * "BrandName": "MARCA ARGOLO TESTE", + * "Dimension": { + * "cubicweight": 81.6833, + * "height": 65, + * "length": 58, + * "weight": 10000, + * "width": 130 + * }, + * "RealDimension": { + * "realCubicWeight": 274.1375, + * "realHeight": 241, + * "realLength": 65, + * "realWeight": 9800, + * "realWidth": 105 + * }, + * "ManufacturerCode": "", + * "IsKit": false, + * "KitItems": [], + * "Services": [], + * "Categories": [], + * "Attachments": [ + * { + * "Id": 3, + * "Name": "Mensagem", + * "Keys": [ + * "nome;20", + * "foto;40" + * ], + * "Fields": [ + * { + * "FieldName": "nome", + * "MaxCaracters": "20", + * "DomainValues": "Adalberto,Pedro,João" + * }, + * { + * "FieldName": "foto", + * "MaxCaracters": "40", + * "DomainValues": null + * } + * ], + * "IsActive": true, + * "IsRequired": false + * } + * ], + * "Collections": [], + * "SkuSellers": [ + * { + * "SellerId": "1", + * "StockKeepingUnitId": 2001773, + * "SellerStockKeepingUnitId": "2001773", + * "IsActive": true, + * "FreightCommissionPercentage": 0, + * "ProductCommissionPercentage": 0 + * } + * ], + * "SalesChannels": [ + * 1, + * 2, + * 3, + * 10 + * ], + * "Images": [ + * { + * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168952/7508800GG.jpg", + * "ImageName": "", + * "FileId": 168952 + * }, + * { + * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168953/7508800_1GG.jpg", + * "ImageName": "", + * "FileId": 168953 + * }, + * { + * "ImageUrl": "http://ambienteqa.vteximg.com.br/arquivos/ids/168954/7508800_2GG.jpg", + * "ImageName": "", + * "FileId": 168954 + * } + * ], + * "SkuSpecifications": [ + * { + * "FieldId": 102, + * "FieldName": "Cor", + * "FieldValueIds": [ + * 266 + * ], + * "FieldValues": [ + * "Padrão" + * ] + * } + * ], + * "ProductSpecifications": [ + * { + * "FieldId": 7, + * "FieldName": "Faixa Etária", + * "FieldValueIds": [ + * 58, + * 56, + * 55, + * 52 + * ], + * "FieldValues": [ + * "5 a 6 anos", + * "7 a 8 anos", + * "9 a 10 anos", + * "Acima de 10 anos" + * ] + * }, + * { + * "FieldId": 23, + * "FieldName": "Fabricante", + * "FieldValueIds": [], + * "FieldValues": [ + * "Xalingo" + * ] + * } + * ], + * "ProductClustersIds": "176,187,192,194,211,217,235,242", + * "ProductCategoryIds": "/59/", + * "ProductGlobalCategoryId": null, + * "ProductCategories": { + * "59": "Brinquedos" + * }, + * "CommercialConditionId": 1, + * "RewardValue": 100.0, + * "AlternateIds": { + * "Ean": "8781", + * "RefId": "878181" + * }, + * "AlternateIdValues": [ + * "8781", + * "878181" + * ], + * "EstimatedDateArrival": "", + * "MeasurementUnit": "un", + * "UnitMultiplier": 2.0000, + * "InformationSource": null, + * "ModalType": "" + * } * ``` */ "GET /api/catalog_system/pvt/sku/stockkeepingunitbyean/:ean": { response: GetSKUAltID } /** - * Retrieves the EAN of the SKU. - * ## Response body example - * - * ```json - * [ - * "1234567890123" - * ] + * Retrieves the EAN of the SKU. + * ## Response body example + * + * ```json + * [ + * "1234567890123" + * ] * ``` */ "GET /api/catalog/pvt/stockkeepingunit/:skuId/ean": { @@ -3303,24 +3302,24 @@ response: string[] } /** - * Associates an existing SKU to an existing Attachment. - * ## Request body example - * - * ```json - * { - * "AttachmentId": 1, - * "SkuId": 7 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 31, - * "AttachmentId": 1, - * "SkuId": 7 - * } + * Associates an existing SKU to an existing Attachment. + * ## Request body example + * + * ```json + * { + * "AttachmentId": 1, + * "SkuId": 7 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 31, + * "AttachmentId": 1, + * "SkuId": 7 + * } * ``` */ "POST /api/catalog/pvt/skuattachment": { @@ -3368,17 +3367,17 @@ attachmentId?: number } } /** - * Retrieves existing SKU Attachments by SKU ID. - * ## Response body example - * - * ```json - * [ - * { - * "Id": 97, - * "AttachmentId": 1, - * "SkuId": 1 - * } - * ] + * Retrieves existing SKU Attachments by SKU ID. + * ## Response body example + * + * ```json + * [ + * { + * "Id": 97, + * "AttachmentId": 1, + * "SkuId": 1 + * } + * ] * ``` */ "GET /api/catalog/pvt/stockkeepingunit/:skuId/attachment": { @@ -3408,17 +3407,16 @@ SkuId?: number } /** * Associates attachments to an SKU based on a given SKU ID and attachment names. - * -This request removes existing SKU attachment associations and recreates the associations with the attachments being sent. - * ## Request body example - * - * ```json - * { - * "SkuId": 1, - * "AttachmentNames": [ - * "T-Shirt Customization" - * ] - * } + * This request removes existing SKU attachment associations and recreates the associations with the attachments being sent. + * ## Request body example + * + * ```json + * { + * "SkuId": 1, + * "AttachmentNames": [ + * "T-Shirt Customization" + * ] + * } * ``` */ "POST /api/catalog_system/pvt/sku/associateattachments": { @@ -3434,36 +3432,36 @@ AttachmentNames: string[] } } /** - * Gets general information about all Files in the SKU. - * ## Response body example - * - * ```json - * [ - * { - * "Id": 549, - * "ArchiveId": 155485, - * "SkuId": 310118490, - * "Name": "chimera-cat-quimera-5", - * "IsMain": true, - * "Label": "miau" - * }, - * { - * "Id": 550, - * "ArchiveId": 155486, - * "SkuId": 310118490, - * "Name": "Gato-siames", - * "IsMain": false, - * "Label": "Gato siames" - * }, - * { - * "Id": 555, - * "ArchiveId": 155491, - * "SkuId": 310118490, - * "Name": "Cat-Sleeping-Pics", - * "IsMain": false, - * "Label": null - * } - * ] + * Gets general information about all Files in the SKU. + * ## Response body example + * + * ```json + * [ + * { + * "Id": 549, + * "ArchiveId": 155485, + * "SkuId": 310118490, + * "Name": "chimera-cat-quimera-5", + * "IsMain": true, + * "Label": "miau" + * }, + * { + * "Id": 550, + * "ArchiveId": 155486, + * "SkuId": 310118490, + * "Name": "Gato-siames", + * "IsMain": false, + * "Label": "Gato siames" + * }, + * { + * "Id": 555, + * "ArchiveId": 155491, + * "SkuId": 310118490, + * "Name": "Cat-Sleeping-Pics", + * "IsMain": false, + * "Label": null + * } + * ] * ``` */ "GET /api/catalog/pvt/stockkeepingunit/:skuId/file": { @@ -3498,31 +3496,31 @@ Label?: (null | string) }[] } /** - * Creates a new Image for an SKU based on its URL or on a form-data request body. - * ## Request body example - * - * ```json - * { - * "IsMain": true, - * "Label": "", - * "Name": "Royal-Canin-Feline-Urinary-SO", - * "Text": null, - * "Url": "https://1.bp.blogspot.com/_SLQk9aAv9-o/S7NNbJPv7NI/AAAAAAAAAN8/V1LcO0ViDc4/s1600/waterbottle.jpg" - * - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 503, - * "ArchiveId": 155491, - * "SkuId": 1, - * "Name": "Royal-Canin-Feline-Urinary-SO", - * "IsMain": true, - * "Label": "" - * } + * Creates a new Image for an SKU based on its URL or on a form-data request body. + * ## Request body example + * + * ```json + * { + * "IsMain": true, + * "Label": "", + * "Name": "Royal-Canin-Feline-Urinary-SO", + * "Text": null, + * "Url": "https://1.bp.blogspot.com/_SLQk9aAv9-o/S7NNbJPv7NI/AAAAAAAAAN8/V1LcO0ViDc4/s1600/waterbottle.jpg" + * + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 503, + * "ArchiveId": 155491, + * "SkuId": 1, + * "Name": "Royal-Canin-Feline-Urinary-SO", + * "IsMain": true, + * "Label": "" + * } * ``` */ "POST /api/catalog/pvt/stockkeepingunit/:skuId/file": { @@ -3557,29 +3555,29 @@ Label?: string } /** - * Updates a new Image on an SKU based on its URL or on a form-data request body. - * ## Request body example - * - * ```json - * { - * "IsMain": true, - * "Label": null, - * "Name": "toilet-paper", - * "Text": null, - * "Url": "https://images-na.ssl-images-amazon.com/images/I/81DLLXaGI7L._SL1500_.jpg" - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 508, - * "ArchiveId": 155491, - * "SkuId": 7, - * "IsMain": true, - * "Label": null - * } + * Updates a new Image on an SKU based on its URL or on a form-data request body. + * ## Request body example + * + * ```json + * { + * "IsMain": true, + * "Label": null, + * "Name": "toilet-paper", + * "Text": null, + * "Url": "https://images-na.ssl-images-amazon.com/images/I/81DLLXaGI7L._SL1500_.jpg" + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 508, + * "ArchiveId": 155491, + * "SkuId": 7, + * "IsMain": true, + * "Label": null + * } * ``` */ "PUT /api/catalog/pvt/stockkeepingunit/:skuId/file/:skuFileId": { @@ -3614,26 +3612,26 @@ Label?: string } /** - * Copy all existing files from an SKU to another SKU. - * ## Response body example - * - * ```json - * [ - * { - * "Id": 1964, - * "ArchiveId": 155404, - * "SkuId": 1, - * "IsMain": true, - * "Label": "" - * }, - * { - * "Id": 1965, - * "ArchiveId": 155429, - * "SkuId": 1, - * "IsMain": false, - * "Label": "" - * } - * ] + * Copy all existing files from an SKU to another SKU. + * ## Response body example + * + * ```json + * [ + * { + * "Id": 1964, + * "ArchiveId": 155404, + * "SkuId": 1, + * "IsMain": true, + * "Label": "" + * }, + * { + * "Id": 1965, + * "ArchiveId": 155429, + * "SkuId": 1, + * "IsMain": false, + * "Label": "" + * } + * ] * ``` */ "PUT /api/catalog/pvt/stockkeepingunit/copy/:skuIdfrom/:skuIdto/file/": { @@ -3670,17 +3668,17 @@ Label?: (null | string) } /** - * Retrieves general information about the components of an SKU Kit by SKU ID or Parent SKU ID. - * ## Response body example - * - * ```json - * { - * "Id": 7, - * "StockKeepingUnitParent": 7, - * "StockKeepingUnitId": 1, - * "Quantity": 1, - * "UnitPrice": 50.0000 - * } + * Retrieves general information about the components of an SKU Kit by SKU ID or Parent SKU ID. + * ## Response body example + * + * ```json + * { + * "Id": 7, + * "StockKeepingUnitParent": 7, + * "StockKeepingUnitId": 1, + * "Quantity": 1, + * "UnitPrice": 50.0000 + * } * ``` */ "GET /api/catalog/pvt/stockkeepingunitkit": { @@ -3697,27 +3695,27 @@ parentSkuId?: number response: SkuKit } /** - * Adds a component to a specific Kit. - * ## Request body example - * - * ```json - * { - * "StockKeepingUnitParent": 7, - * "StockKeepingUnitId": 1, - * "Quantity": 1, - * "UnitPrice": 50.0000 - * } - * ``` - * ## Response body example - * - * ```json - * { - * "Id": 7, - * "StockKeepingUnitParent": 7, - * "StockKeepingUnitId": 1, - * "Quantity": 1, - * "UnitPrice": 50.0000 - * } + * Adds a component to a specific Kit. + * ## Request body example + * + * ```json + * { + * "StockKeepingUnitParent": 7, + * "StockKeepingUnitId": 1, + * "Quantity": 1, + * "UnitPrice": 50.0000 + * } + * ``` + * ## Response body example + * + * ```json + * { + * "Id": 7, + * "StockKeepingUnitParent": 7, + * "StockKeepingUnitId": 1, + * "Quantity": 1, + * "UnitPrice": 50.0000 + * } * ``` */ "POST /api/catalog/pvt/stockkeepingunitkit": { @@ -3771,21 +3769,21 @@ response: SkuKit /** * > ⚠️ Check out the updated version of the SKU Seller endpoints in our [SKU Bindings API documentation](https://developers.vtex.com/vtex-rest-api/reference/getbyskuid). If you are doing this integration for the first time, we recommend that you follow the updated documentation. * - * Retrieves the details of a seller's SKU given a seller ID and the SKU ID in the seller's store. - * ## Response body example - * - * ```json - * { - * "IsPersisted": true, - * "IsRemoved": false, - * "SkuSellerId": 799, - * "SellerId": "myseller", - * "StockKeepingUnitId": 50, - * "SellerStockKeepingUnitId": "502", - * "IsActive": true, - * "UpdateDate": "2018-10-11T04:52:42.1", - * "RequestedUpdateDate": null - * } + * Retrieves the details of a seller's SKU given a seller ID and the SKU ID in the seller's store. + * ## Response body example + * + * ```json + * { + * "IsPersisted": true, + * "IsRemoved": false, + * "SkuSellerId": 799, + * "SellerId": "myseller", + * "StockKeepingUnitId": 50, + * "SellerStockKeepingUnitId": "502", + * "IsActive": true, + * "UpdateDate": "2018-10-11T04:52:42.1", + * "RequestedUpdateDate": null + * } * ``` */ "GET /api/catalog_system/pvt/skuseller/:sellerId/:sellerSkuId": { @@ -3851,79 +3849,79 @@ RequestedUpdateDate: (null | string) } /** - * > ⚠️ Check out the updated version of the SKU Seller endpoints in our [SKU Bindings API documentation](https://developers.vtex.com/vtex-rest-api/reference/getbyskuid). If you are doing this integration for the first time, we recommend that you follow the updated documentation. - * - * The seller is responsible for suggesting new SKUs to be sold in the VTEX marketplace and also for informing the marketplace about changes in their SKUs that already exist in the marketplace. Both actions start with a catalog notification, which is made by this request. - * - * With this notification, the seller is telling the marketplace that something has changed about a specific SKU, like its name or description, or that this is a new SKU that the seller would like to offer to the marketplace. The body of the request should be empty. - * - * > ⚠️ Do not use this endpoint for price and inventory changes, because these types of updates should be notified using Marketplace API. For price changes, we recommend using the [Notify marketplace of price update](https://developers.vtex.com/docs/api-reference/marketplace-apis#post-/notificator/-sellerId-/changenotification/-skuId-/price) endpoint. For inventory changes, use [Notify marketplace of inventory update](https://developers.vtex.com/docs/api-reference/marketplace-apis#post-/notificator/-sellerId-/changenotification/-skuId-/inventory). - * - * ## Example - * - * Let's say your seller has the ID `123` in the marketplace and you want to inform the marketplace that has been a change in the SKU with ID `700`. - * - * In this case, you would have to replace the `sellerId` parameter with the value `123` and the `skuId` parameter with the value `700`. The URL of the request would be the following. - * - * ``` - * https://{{accountName}}.vtexcommercestable.com.br/api/catalog_system/pvt/skuseller/changenotification/123/700 - * ``` - * - * ## Response codes - * - * The following response codes are possible for this request. - * - * * **404:** the SKU was not found in the marketplace. The body of the response, in this case, should follow this format: "Seller StockKeepingUnit `{{skuId}}` not found for this seller id `{{sellerId}}`". This means that the seller can now proceed with sending an offer to the marketplace in order to suggest that this SKU is sold there. - * * **200:** the SKU whose ID was informed in the URL already exists in the marketplace and was found. The marketplace can now proceed with a fulfillment simulation in order to get updated information about this SKU's inventory and price. - * * **429:** Failure due to too many requests. + * > ⚠️ Check out the updated version of the SKU Seller endpoints in our [SKU Bindings API documentation](https://developers.vtex.com/vtex-rest-api/reference/getbyskuid). If you are doing this integration for the first time, we recommend that you follow the updated documentation. + * + * The seller is responsible for suggesting new SKUs to be sold in the VTEX marketplace and also for informing the marketplace about changes in their SKUs that already exist in the marketplace. Both actions start with a catalog notification, which is made by this request. + * + * With this notification, the seller is telling the marketplace that something has changed about a specific SKU, like its name or description, or that this is a new SKU that the seller would like to offer to the marketplace. The body of the request should be empty. + * + * > ⚠️ Do not use this endpoint for price and inventory changes, because these types of updates should be notified using Marketplace API. For price changes, we recommend using the [Notify marketplace of price update](https://developers.vtex.com/docs/api-reference/marketplace-apis#post-/notificator/-sellerId-/changenotification/-skuId-/price) endpoint. For inventory changes, use [Notify marketplace of inventory update](https://developers.vtex.com/docs/api-reference/marketplace-apis#post-/notificator/-sellerId-/changenotification/-skuId-/inventory). + * + * ## Example + * + * Let's say your seller has the ID `123` in the marketplace and you want to inform the marketplace that has been a change in the SKU with ID `700`. + * + * In this case, you would have to replace the `sellerId` parameter with the value `123` and the `skuId` parameter with the value `700`. The URL of the request would be the following. + * + * ``` + * https://{{accountName}}.vtexcommercestable.com.br/api/catalog_system/pvt/skuseller/changenotification/123/700 + * ``` + * + * ## Response codes + * + * The following response codes are possible for this request. + * + * * **404:** the SKU was not found in the marketplace. The body of the response, in this case, should follow this format: "Seller StockKeepingUnit `{{skuId}}` not found for this seller id `{{sellerId}}`". This means that the seller can now proceed with sending an offer to the marketplace in order to suggest that this SKU is sold there. + * * **200:** the SKU whose ID was informed in the URL already exists in the marketplace and was found. The marketplace can now proceed with a fulfillment simulation in order to get updated information about this SKU's inventory and price. + * * **429:** Failure due to too many requests. * * **403:** Failure in the authentication. */ "POST /api/catalog_system/pvt/skuseller/changenotification/:skuId": { } /** - * Retrieves an SKU Service. - * ## Response body example - * - * ```json - * { - * "Id": 1, - * "SkuServiceTypeId": 1, - * "SkuServiceValueId": 1, - * "SkuId": 1, - * "Name": "name", - * "Text": "text", - * "IsActive": false - * } + * Retrieves an SKU Service. + * ## Response body example + * + * ```json + * { + * "Id": 1, + * "SkuServiceTypeId": 1, + * "SkuServiceValueId": 1, + * "SkuId": 1, + * "Name": "name", + * "Text": "text", + * "IsActive": false + * } * ``` */ "GET /api/catalog/pvt/skuservice/:skuServiceId": { response: SKUService } /** - * Updates an SKU Service. - * ## Request body example - * - * ```json - * { - * "Name": "name", - * "Text": "text", - * "IsActive": false - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 1, - * "SkuServiceTypeId": 1, - * "SkuServiceValueId": 1, - * "SkuId": 1, - * "Name": "name", - * "Text": "text", - * "IsActive": false - * } + * Updates an SKU Service. + * ## Request body example + * + * ```json + * { + * "Name": "name", + * "Text": "text", + * "IsActive": false + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 1, + * "SkuServiceTypeId": 1, + * "SkuServiceValueId": 1, + * "SkuId": 1, + * "Name": "name", + * "Text": "text", + * "IsActive": false + * } * ``` */ "PUT /api/catalog/pvt/skuservice/:skuServiceId": { @@ -3994,24 +3992,24 @@ IsActive: boolean response: SKUService } /** - * Associates an Attachment for an existing SKU Service Type. - * ## Request body example - * - * ```json - * { - * "AttachmentId": 1, - * "SkuServiceTypeId": 1 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 1, - * "AttachmentId": 1, - * "SkuServiceTypeId": 1 - * } + * Associates an Attachment for an existing SKU Service Type. + * ## Request body example + * + * ```json + * { + * "AttachmentId": 1, + * "SkuServiceTypeId": 1 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 1, + * "AttachmentId": 1, + * "SkuServiceTypeId": 1 + * } * ``` */ "POST /api/catalog/pvt/skuservicetypeattachment": { @@ -4062,36 +4060,36 @@ skuServiceTypeId?: number } /** - * Creates a new SKU Service Type. - * ## Request body example - * - * ```json - * { - * "Name": "Test API Sku Services", - * "IsActive": true, - * "ShowOnProductFront": true, - * "ShowOnCartFront": true, - * "ShowOnAttachmentFront": true, - * "ShowOnFileUpload": true, - * "IsGiftCard": true, - * "IsRequired": true - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 2, - * "Name": "Teste API Sku Services", - * "IsActive": true, - * "ShowOnProductFront": true, - * "ShowOnCartFront": true, - * "ShowOnAttachmentFront": true, - * "ShowOnFileUpload": true, - * "IsGiftCard": true, - * "IsRequired": true - * } + * Creates a new SKU Service Type. + * ## Request body example + * + * ```json + * { + * "Name": "Test API Sku Services", + * "IsActive": true, + * "ShowOnProductFront": true, + * "ShowOnCartFront": true, + * "ShowOnAttachmentFront": true, + * "ShowOnFileUpload": true, + * "IsGiftCard": true, + * "IsRequired": true + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 2, + * "Name": "Teste API Sku Services", + * "IsActive": true, + * "ShowOnProductFront": true, + * "ShowOnCartFront": true, + * "ShowOnAttachmentFront": true, + * "ShowOnFileUpload": true, + * "IsGiftCard": true, + * "IsRequired": true + * } * ``` */ "POST /api/catalog/pvt/skuservicetype": { @@ -4099,57 +4097,57 @@ body: SKUServiceTypeRequest response: SKUServiceTypeResponse } /** - * Retrieves information about an existing SKU Service Type. - * ## Response body example: - * - * ```json - * { - * "Id": 2, - * "Name": "Test API SKU Services", - * "IsActive": true, - * "ShowOnProductFront": true, - * "ShowOnCartFront": true, - * "ShowOnAttachmentFront": true, - * "ShowOnFileUpload": true, - * "IsGiftCard": true, - * "IsRequired": true - * } + * Retrieves information about an existing SKU Service Type. + * ## Response body example: + * + * ```json + * { + * "Id": 2, + * "Name": "Test API SKU Services", + * "IsActive": true, + * "ShowOnProductFront": true, + * "ShowOnCartFront": true, + * "ShowOnAttachmentFront": true, + * "ShowOnFileUpload": true, + * "IsGiftCard": true, + * "IsRequired": true + * } * ``` */ "GET /api/catalog/pvt/skuservicetype/:skuServiceTypeId": { response: SKUServiceTypeResponse } /** - * Updates an existing SKU Service Type. - * ## Request body example - * - * ```json - * { - * "Name": "Test API Sku Services", - * "IsActive": true, - * "ShowOnProductFront": true, - * "ShowOnCartFront": true, - * "ShowOnAttachmentFront": true, - * "ShowOnFileUpload": true, - * "IsGiftCard": true, - * "IsRequired": true - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 2, - * "Name": "Teste API Sku Services", - * "IsActive": true, - * "ShowOnProductFront": true, - * "ShowOnCartFront": true, - * "ShowOnAttachmentFront": true, - * "ShowOnFileUpload": true, - * "IsGiftCard": true, - * "IsRequired": true - * } + * Updates an existing SKU Service Type. + * ## Request body example + * + * ```json + * { + * "Name": "Test API Sku Services", + * "IsActive": true, + * "ShowOnProductFront": true, + * "ShowOnCartFront": true, + * "ShowOnAttachmentFront": true, + * "ShowOnFileUpload": true, + * "IsGiftCard": true, + * "IsRequired": true + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 2, + * "Name": "Teste API Sku Services", + * "IsActive": true, + * "ShowOnProductFront": true, + * "ShowOnCartFront": true, + * "ShowOnAttachmentFront": true, + * "ShowOnFileUpload": true, + * "IsGiftCard": true, + * "IsRequired": true + * } * ``` */ "PUT /api/catalog/pvt/skuservicetype/:skuServiceTypeId": { @@ -4163,28 +4161,28 @@ response: SKUServiceTypeResponse } /** - * Creates an SKU Service Value for an existing SKU Service Type. - * ## Request body example - * - * ```json - * { - * "SkuServiceTypeId": 2, - * "Name": "Test ServiceValue API", - * "Value": 10.5, - * "Cost": 10.5 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 2, - * "SkuServiceTypeId": 2, - * "Name": "Test ServiceValue API", - * "Value": 10.5, - * "Cost": 10.5 - * } + * Creates an SKU Service Value for an existing SKU Service Type. + * ## Request body example + * + * ```json + * { + * "SkuServiceTypeId": 2, + * "Name": "Test ServiceValue API", + * "Value": 10.5, + * "Cost": 10.5 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 2, + * "SkuServiceTypeId": 2, + * "Name": "Test ServiceValue API", + * "Value": 10.5, + * "Cost": 10.5 + * } * ``` */ "POST /api/catalog/pvt/skuservicevalue": { @@ -4192,45 +4190,45 @@ body: SKUServiceValueRequest response: SKUServiceValueResponse } /** - * Retrieves an existing SKU Service Value. - * ## Response body example - * - * ```json - * { - * "Id": 2, - * "SkuServiceTypeId": 2, - * "Name": "Test ServiceValue API", - * "Value": 10.5, - * "Cost": 10.5 - * } + * Retrieves an existing SKU Service Value. + * ## Response body example + * + * ```json + * { + * "Id": 2, + * "SkuServiceTypeId": 2, + * "Name": "Test ServiceValue API", + * "Value": 10.5, + * "Cost": 10.5 + * } * ``` */ "GET /api/catalog/pvt/skuservicevalue/:skuServiceValueId": { response: SKUServiceValueResponse } /** - * Updates an existing SKU Service Value. - * ## Request body example - * - * ```json - * { - * "SkuServiceTypeId": 2, - * "Name": "Test ServiceValue API", - * "Value": 10.5, - * "Cost": 10.5 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 2, - * "SkuServiceTypeId": 2, - * "Name": "Test ServiceValue API", - * "Value": 10.5, - * "Cost": 10.5 - * } + * Updates an existing SKU Service Value. + * ## Request body example + * + * ```json + * { + * "SkuServiceTypeId": 2, + * "Name": "Test ServiceValue API", + * "Value": 10.5, + * "Cost": 10.5 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 2, + * "SkuServiceTypeId": 2, + * "Name": "Test ServiceValue API", + * "Value": 10.5, + * "Cost": 10.5 + * } * ``` */ "PUT /api/catalog/pvt/skuservicevalue/:skuServiceValueId": { @@ -4244,52 +4242,52 @@ response: SKUServiceValueResponse } /** - * Retrieves information about an SKU's Specifications. - * ## Response body example - * - * ```json - * [ - * { - * "Id": 427, - * "SkuId": 7, - * "FieldId": 32, - * "FieldValueId": 131, - * "Text": "500g" - * }, - * { - * "Id": 428, - * "SkuId": 7, - * "FieldId": 40, - * "FieldValueId": 133, - * "Text": "A" - * } - * ] + * Retrieves information about an SKU's Specifications. + * ## Response body example + * + * ```json + * [ + * { + * "Id": 427, + * "SkuId": 7, + * "FieldId": 32, + * "FieldValueId": 131, + * "Text": "500g" + * }, + * { + * "Id": 428, + * "SkuId": 7, + * "FieldId": 40, + * "FieldValueId": 133, + * "Text": "A" + * } + * ] * ``` */ "GET /api/catalog/pvt/stockkeepingunit/:skuId/specification": { response: SKUSpecificationResponse[] } /** - * Associates a previously created Specification to an SKU. - * ## Request body example - * - * ```json - * { - * "FieldId": 65, - * "FieldValueId": 138 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 730, - * "SkuId": 31, - * "FieldId": 65, - * "FieldValueId": 138, - * "Text": "Size" - * } + * Associates a previously created Specification to an SKU. + * ## Request body example + * + * ```json + * { + * "FieldId": 65, + * "FieldValueId": 138 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 730, + * "SkuId": 31, + * "FieldId": 65, + * "FieldValueId": 138, + * "Text": "Size" + * } * ``` */ "POST /api/catalog/pvt/stockkeepingunit/:skuId/specification": { @@ -4306,29 +4304,29 @@ FieldValueId?: number response: SKUSpecificationResponse } /** - * Updates an existing Specification on an existing SKU. This endpoint only updates the `FieldValueId`. - * ## Request body example - * - * ```json - * { - * "Id": 65, - * "SkuId": 21, - * "FieldId": 32, - * "FieldValueId": 131, - * "Text": "Red" - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 65, - * "SkuId": 21, - * "FieldId": 32, - * "FieldValueId": 131, - * "Text": "Red" - * } + * Updates an existing Specification on an existing SKU. This endpoint only updates the `FieldValueId`. + * ## Request body example + * + * ```json + * { + * "Id": 65, + * "SkuId": 21, + * "FieldId": 32, + * "FieldValueId": 131, + * "Text": "Red" + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 65, + * "SkuId": 21, + * "FieldId": 32, + * "FieldValueId": 131, + * "Text": "Red" + * } * ``` */ "PUT /api/catalog/pvt/stockkeepingunit/:skuId/specification": { @@ -4369,35 +4367,35 @@ response: SKUSpecificationResponse[] } /** - * Associates a specification to an SKU using specification name and group name. Automatically creates the informed group, specification and values if they had not been created before. - * - * ## Request body example - * - * ```json - * { - * "FieldName": "Size", - * "GroupName": "Sizes", - * "RootLevelSpecification": false, - * "FieldValues": [ - * "M" - * ] - * } - * ``` - * - * - * ## Response body example - * - * ```json - * [ - * { - * "Id": 419, - * "SkuId": 5, - * "FieldId": 22, - * "FieldValueId": 62, - * "Text": "M" - * } - * ] - * ``` + * Associates a specification to an SKU using specification name and group name. Automatically creates the informed group, specification and values if they had not been created before. + * + * ## Request body example + * + * ```json + * { + * "FieldName": "Size", + * "GroupName": "Sizes", + * "RootLevelSpecification": false, + * "FieldValues": [ + * "M" + * ] + * } + * ``` + * + * + * ## Response body example + * + * ```json + * [ + * { + * "Id": 419, + * "SkuId": 5, + * "FieldId": 22, + * "FieldValueId": 62, + * "Text": "M" + * } + * ] + * ``` * */ "PUT /api/catalog/pvt/stockkeepingunit/:skuId/specificationvalue": { @@ -4448,22 +4446,22 @@ Text?: string /** * >⚠️ There are two ways to configure collections, through Legacy CMS Portal or using the Beta Collection module. This endpoint is compatible with [collections configured through the Legacy CMS Portal](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L). * - * Associates a single SKU to a Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. - * ## Request body example - * - * ```json - * { - * "SkuId": 1 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "SubCollectionId": 17, - * "SkuId": 1 - * } + * Associates a single SKU to a Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. + * ## Request body example + * + * ```json + * { + * "SkuId": 1 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "SubCollectionId": 17, + * "SkuId": 1 + * } * ``` */ "POST /api/catalog/pvt/subcollection/:subCollectionId/stockkeepingunit": { @@ -4493,196 +4491,196 @@ SkuId?: number } /** - * Retrieves the Category Tree of your store. Get all the category levels registered in the Catalog or define the level up to which you want to get. - * > 📘 Onboarding guide - * > - * > Check the new [Catalog onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/catalog-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Catalog and is organized by focusing on the developer's journey. - * ## Response body example - * - * ```json - * [ - * { - * "id": 1, - * "name": "Alimentação", - * "hasChildren": true, - * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao", - * "children": [ - * { - * "id": 6, - * "name": "Bebedouro", - * "hasChildren": false, - * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao/bebedouro", - * "children": [], - * "Title": "Bebedouro para Gatos", - * "MetaTagDescription": "" - * }, - * { - * "id": 7, - * "name": "Comedouro", - * "hasChildren": false, - * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao/comedouro", - * "children": [], - * "Title": "Comedouro para Gatos", - * "MetaTagDescription": "" - * }, - * { - * "id": 8, - * "name": "Biscoitos", - * "hasChildren": false, - * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao/biscoitos", - * "children": [], - * "Title": "Biscoitos para Gatos", - * "MetaTagDescription": "" - * }, - * { - * "id": 9, - * "name": "Petiscos", - * "hasChildren": false, - * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao/petiscos", - * "children": [], - * "Title": "Petiscos para Gatos", - * "MetaTagDescription": "" - * }, - * { - * "id": 10, - * "name": "Ração Seca", - * "hasChildren": false, - * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao/racao-seca", - * "children": [], - * "Title": "Ração Seca para Gatos", - * "MetaTagDescription": "" - * }, - * { - * "id": 11, - * "name": "Ração Úmida", - * "hasChildren": false, - * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao/racao-umida", - * "children": [], - * "Title": "Ração Úmida para Gatos", - * "MetaTagDescription": "" - * } - * ], - * "Title": "Alimentação para Gatos", - * "MetaTagDescription": "" - * }, - * { - * "id": 2, - * "name": "Brinquedos", - * "hasChildren": true, - * "url": "https://lojadobreno.vtexcommercestable.com.br/brinquedos", - * "children": [ - * { - * "id": 12, - * "name": "Bolinhas", - * "hasChildren": false, - * "url": "https://lojadobreno.vtexcommercestable.com.br/brinquedos/bolinhas", - * "children": [], - * "Title": "Bolinhas para Gatos", - * "MetaTagDescription": "" - * }, - * { - * "id": 13, - * "name": "Ratinhos", - * "hasChildren": false, - * "url": "https://lojadobreno.vtexcommercestable.com.br/brinquedos/ratinhos", - * "children": [], - * "Title": "Ratinhos", - * "MetaTagDescription": "" - * }, - * { - * "id": 19, - * "name": "Arranhador para gato", - * "hasChildren": false, - * "url": "https://lojadobreno.vtexcommercestable.com.br/brinquedos/arranhador-para-gato", - * "children": [], - * "Title": "Brinquedo Arranhador para gatos", - * "MetaTagDescription": "Arranhador gatos é indispensável no lar com felinos. Ideais para afiar as unhas e garantir a diversão" - * } - * ], - * "Title": "Brinquedos para Gatos", - * "MetaTagDescription": "" - * } - * ] + * Retrieves the Category Tree of your store. Get all the category levels registered in the Catalog or define the level up to which you want to get. + * > 📘 Onboarding guide + * > + * > Check the new [Catalog onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/catalog-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Catalog and is organized by focusing on the developer's journey. + * ## Response body example + * + * ```json + * [ + * { + * "id": 1, + * "name": "Alimentação", + * "hasChildren": true, + * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao", + * "children": [ + * { + * "id": 6, + * "name": "Bebedouro", + * "hasChildren": false, + * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao/bebedouro", + * "children": [], + * "Title": "Bebedouro para Gatos", + * "MetaTagDescription": "" + * }, + * { + * "id": 7, + * "name": "Comedouro", + * "hasChildren": false, + * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao/comedouro", + * "children": [], + * "Title": "Comedouro para Gatos", + * "MetaTagDescription": "" + * }, + * { + * "id": 8, + * "name": "Biscoitos", + * "hasChildren": false, + * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao/biscoitos", + * "children": [], + * "Title": "Biscoitos para Gatos", + * "MetaTagDescription": "" + * }, + * { + * "id": 9, + * "name": "Petiscos", + * "hasChildren": false, + * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao/petiscos", + * "children": [], + * "Title": "Petiscos para Gatos", + * "MetaTagDescription": "" + * }, + * { + * "id": 10, + * "name": "Ração Seca", + * "hasChildren": false, + * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao/racao-seca", + * "children": [], + * "Title": "Ração Seca para Gatos", + * "MetaTagDescription": "" + * }, + * { + * "id": 11, + * "name": "Ração Úmida", + * "hasChildren": false, + * "url": "https://lojadobreno.vtexcommercestable.com.br/alimentacao/racao-umida", + * "children": [], + * "Title": "Ração Úmida para Gatos", + * "MetaTagDescription": "" + * } + * ], + * "Title": "Alimentação para Gatos", + * "MetaTagDescription": "" + * }, + * { + * "id": 2, + * "name": "Brinquedos", + * "hasChildren": true, + * "url": "https://lojadobreno.vtexcommercestable.com.br/brinquedos", + * "children": [ + * { + * "id": 12, + * "name": "Bolinhas", + * "hasChildren": false, + * "url": "https://lojadobreno.vtexcommercestable.com.br/brinquedos/bolinhas", + * "children": [], + * "Title": "Bolinhas para Gatos", + * "MetaTagDescription": "" + * }, + * { + * "id": 13, + * "name": "Ratinhos", + * "hasChildren": false, + * "url": "https://lojadobreno.vtexcommercestable.com.br/brinquedos/ratinhos", + * "children": [], + * "Title": "Ratinhos", + * "MetaTagDescription": "" + * }, + * { + * "id": 19, + * "name": "Arranhador para gato", + * "hasChildren": false, + * "url": "https://lojadobreno.vtexcommercestable.com.br/brinquedos/arranhador-para-gato", + * "children": [], + * "Title": "Brinquedo Arranhador para gatos", + * "MetaTagDescription": "Arranhador gatos é indispensável no lar com felinos. Ideais para afiar as unhas e garantir a diversão" + * } + * ], + * "Title": "Brinquedos para Gatos", + * "MetaTagDescription": "" + * } + * ] * ``` */ "GET /api/catalog_system/pub/category/tree/:categoryLevels": { response: GetCategoryTree[] } /** - * Retrieves general information about a Category. - * ## Response body example - * - * ```json - * { - * "Id": 1, - * "Name": "Home Appliances", - * "FatherCategoryId": null, - * "Title": "Home Appliances", - * "Description": "Discover our range of home appliances. Find smart vacuums, kitchen and laundry appliances to suit your needs. Order online now.", - * "Keywords": "Kitchen, Laundry, Appliances", - * "IsActive": true, - * "LomadeeCampaignCode": "", - * "AdWordsRemarketingCode": "", - * "ShowInStoreFront": true, - * "ShowBrandFilter": true, - * "ActiveStoreFrontLink": true, - * "GlobalCategoryId": 3367, - * "StockKeepingUnitSelectionMode": "LIST", - * "Score": null, - * "LinkId": "Alimentacao", - * "HasChildren": true - * } + * Retrieves general information about a Category. + * ## Response body example + * + * ```json + * { + * "Id": 1, + * "Name": "Home Appliances", + * "FatherCategoryId": null, + * "Title": "Home Appliances", + * "Description": "Discover our range of home appliances. Find smart vacuums, kitchen and laundry appliances to suit your needs. Order online now.", + * "Keywords": "Kitchen, Laundry, Appliances", + * "IsActive": true, + * "LomadeeCampaignCode": "", + * "AdWordsRemarketingCode": "", + * "ShowInStoreFront": true, + * "ShowBrandFilter": true, + * "ActiveStoreFrontLink": true, + * "GlobalCategoryId": 3367, + * "StockKeepingUnitSelectionMode": "LIST", + * "Score": null, + * "LinkId": "Alimentacao", + * "HasChildren": true + * } * ``` */ "GET /api/catalog/pvt/category/:categoryId": { response: Category } /** - * Updates a previously existing Category. - * - * ## Request body example - * - * ```json - * { - * "Name": "Home Appliances", - * "FatherCategoryId": null, - * "Title": "Home Appliances", - * "Description": "Discover our range of home appliances. Find smart vacuums, kitchen and laundry appliances to suit your needs. Order online now.", - * "Keywords": "Kitchen, Laundry, Appliances", - * "IsActive": true, - * "LomadeeCampaignCode": null, - * "AdWordsRemarketingCode": null, - * "ShowInStoreFront": true, - * "ShowBrandFilter": true, - * "ActiveStoreFrontLink": true, - * "GlobalCategoryId": 604, - * "StockKeepingUnitSelectionMode": "SPECIFICATION", - * "Score": null - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 1, - * "Name": "Home Appliances", - * "FatherCategoryId": null, - * "Title": "Home Appliances", - * "Description": "Discover our range of home appliances. Find smart vacuums, kitchen and laundry appliances to suit your needs. Order online now.", - * "Keywords": "Kitchen, Laundry, Appliances", - * "IsActive": true, - * "LomadeeCampaignCode": "", - * "AdWordsRemarketingCode": "", - * "ShowInStoreFront": true, - * "ShowBrandFilter": true, - * "ActiveStoreFrontLink": true, - * "GlobalCategoryId": 604, - * "StockKeepingUnitSelectionMode": "LIST", - * "Score": null, - * "LinkId": "Alimentacao", - * "HasChildren": true - * } + * Updates a previously existing Category. + * + * ## Request body example + * + * ```json + * { + * "Name": "Home Appliances", + * "FatherCategoryId": null, + * "Title": "Home Appliances", + * "Description": "Discover our range of home appliances. Find smart vacuums, kitchen and laundry appliances to suit your needs. Order online now.", + * "Keywords": "Kitchen, Laundry, Appliances", + * "IsActive": true, + * "LomadeeCampaignCode": null, + * "AdWordsRemarketingCode": null, + * "ShowInStoreFront": true, + * "ShowBrandFilter": true, + * "ActiveStoreFrontLink": true, + * "GlobalCategoryId": 604, + * "StockKeepingUnitSelectionMode": "SPECIFICATION", + * "Score": null + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 1, + * "Name": "Home Appliances", + * "FatherCategoryId": null, + * "Title": "Home Appliances", + * "Description": "Discover our range of home appliances. Find smart vacuums, kitchen and laundry appliances to suit your needs. Order online now.", + * "Keywords": "Kitchen, Laundry, Appliances", + * "IsActive": true, + * "LomadeeCampaignCode": "", + * "AdWordsRemarketingCode": "", + * "ShowInStoreFront": true, + * "ShowBrandFilter": true, + * "ActiveStoreFrontLink": true, + * "GlobalCategoryId": 604, + * "StockKeepingUnitSelectionMode": "LIST", + * "Score": null, + * "LinkId": "Alimentacao", + * "HasChildren": true + * } * ``` */ "PUT /api/catalog/pvt/category/:categoryId": { @@ -4749,75 +4747,75 @@ StockKeepingUnitSelectionMode: string response: Category } /** - * Creates a new Category. - * - * If there is a need to create a new category with a specific custom ID, specify the `Id` (integer) in the request. Otherwise, VTEX will generate the ID automatically. - * - * ## Request body example (automatically generated ID) - * - * ```json - * { - * "Name": "Home Appliances", - * "FatherCategoryId": null, - * "Title": "Home Appliances", - * "Description": "Discover our range of home appliances. Find smart vacuums, kitchen and laundry appliances to suit your needs. Order online now.", - * "Keywords": "Kitchen, Laundry, Appliances", - * "IsActive": true, - * "LomadeeCampaignCode": null, - * "AdWordsRemarketingCode": null, - * "ShowInStoreFront": true, - * "ShowBrandFilter": true, - * "ActiveStoreFrontLink": true, - * "GlobalCategoryId": 604, - * "StockKeepingUnitSelectionMode": "SPECIFICATION", - * "Score": null - * } - * ``` - * - * ## Request body example (custom ID) - * - * ```json - * { - * "Id": 1, - * "Name": "Home Appliances", - * "FatherCategoryId": null, - * "Title": "Home Appliances", - * "Description": "Discover our range of home appliances. Find smart vacuums, kitchen and laundry appliances to suit your needs. Order online now.", - * "Keywords": "Kitchen, Laundry, Appliances", - * "IsActive": true, - * "LomadeeCampaignCode": null, - * "AdWordsRemarketingCode": null, - * "ShowInStoreFront": true, - * "ShowBrandFilter": true, - * "ActiveStoreFrontLink": true, - * "GlobalCategoryId": 604, - * "StockKeepingUnitSelectionMode": "SPECIFICATION", - * "Score": null - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 1, - * "Name": "Home Appliances", - * "FatherCategoryId": null, - * "Title": "Home Appliances", - * "Description": "Discover our range of home appliances. Find smart vacuums, kitchen and laundry appliances to suit your needs. Order online now.", - * "Keywords": "Kitchen, Laundry, Appliances", - * "IsActive": true, - * "LomadeeCampaignCode": "", - * "AdWordsRemarketingCode": "", - * "ShowInStoreFront": true, - * "ShowBrandFilter": true, - * "ActiveStoreFrontLink": true, - * "GlobalCategoryId": 604, - * "StockKeepingUnitSelectionMode": "LIST", - * "Score": null, - * "LinkId": "Alimentacao", - * "HasChildren": true - * } + * Creates a new Category. + * + * If there is a need to create a new category with a specific custom ID, specify the `Id` (integer) in the request. Otherwise, VTEX will generate the ID automatically. + * + * ## Request body example (automatically generated ID) + * + * ```json + * { + * "Name": "Home Appliances", + * "FatherCategoryId": null, + * "Title": "Home Appliances", + * "Description": "Discover our range of home appliances. Find smart vacuums, kitchen and laundry appliances to suit your needs. Order online now.", + * "Keywords": "Kitchen, Laundry, Appliances", + * "IsActive": true, + * "LomadeeCampaignCode": null, + * "AdWordsRemarketingCode": null, + * "ShowInStoreFront": true, + * "ShowBrandFilter": true, + * "ActiveStoreFrontLink": true, + * "GlobalCategoryId": 604, + * "StockKeepingUnitSelectionMode": "SPECIFICATION", + * "Score": null + * } + * ``` + * + * ## Request body example (custom ID) + * + * ```json + * { + * "Id": 1, + * "Name": "Home Appliances", + * "FatherCategoryId": null, + * "Title": "Home Appliances", + * "Description": "Discover our range of home appliances. Find smart vacuums, kitchen and laundry appliances to suit your needs. Order online now.", + * "Keywords": "Kitchen, Laundry, Appliances", + * "IsActive": true, + * "LomadeeCampaignCode": null, + * "AdWordsRemarketingCode": null, + * "ShowInStoreFront": true, + * "ShowBrandFilter": true, + * "ActiveStoreFrontLink": true, + * "GlobalCategoryId": 604, + * "StockKeepingUnitSelectionMode": "SPECIFICATION", + * "Score": null + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 1, + * "Name": "Home Appliances", + * "FatherCategoryId": null, + * "Title": "Home Appliances", + * "Description": "Discover our range of home appliances. Find smart vacuums, kitchen and laundry appliances to suit your needs. Order online now.", + * "Keywords": "Kitchen, Laundry, Appliances", + * "IsActive": true, + * "LomadeeCampaignCode": "", + * "AdWordsRemarketingCode": "", + * "ShowInStoreFront": true, + * "ShowBrandFilter": true, + * "ActiveStoreFrontLink": true, + * "GlobalCategoryId": 604, + * "StockKeepingUnitSelectionMode": "LIST", + * "Score": null, + * "LinkId": "Alimentacao", + * "HasChildren": true + * } * ``` */ "POST /api/catalog/pvt/category": { @@ -4825,21 +4823,21 @@ body: CreateCategoryRequest response: Category } /** - * Retrieves Similar Categories from a Product. - * - * ## Response body example - * - * ```json - * [ - * { - * "ProductId": 1, - * "CategoryId": 1 - * }, - * { - * "ProductId": 1, - * "CategoryId": 20 - * } - * ] + * Retrieves Similar Categories from a Product. + * + * ## Response body example + * + * ```json + * [ + * { + * "ProductId": 1, + * "CategoryId": 1 + * }, + * { + * "ProductId": 1, + * "CategoryId": 20 + * } + * ] * ``` */ "GET /api/catalog/pvt/product/:productId/similarcategory/": { @@ -4858,15 +4856,15 @@ CategoryId?: number }[] } /** - * Adds a Similar Category to a Product. - * - * ## Response body example - * - * ```json - * { - * "ProductId": 1, - * "StoreId": 1 - * } + * Adds a Similar Category to a Product. + * + * ## Response body example + * + * ```json + * { + * "ProductId": 1, + * "StoreId": 1 + * } * ``` */ "POST /api/catalog/pvt/product/:productId/similarcategory/:categoryId": { @@ -4891,68 +4889,68 @@ StoreId?: number } /** - * Retrieves all specifications from a category by its ID. - * - * ## Response body example - * - * ```json - * [ - * { - * "Name": "Specification A", - * "CategoryId": 1, - * "FieldId": 33, - * "IsActive": true, - * "IsStockKeepingUnit": false - * }, - * { - * "Name": "Specification B", - * "CategoryId": 1, - * "FieldId": 34, - * "IsActive": true, - * "IsStockKeepingUnit": false - * }, - * { - * "Name": "Specification C", - * "CategoryId": 1, - * "FieldId": 35, - * "IsActive": false, - * "IsStockKeepingUnit": false - * } - * ] + * Retrieves all specifications from a category by its ID. + * + * ## Response body example + * + * ```json + * [ + * { + * "Name": "Specification A", + * "CategoryId": 1, + * "FieldId": 33, + * "IsActive": true, + * "IsStockKeepingUnit": false + * }, + * { + * "Name": "Specification B", + * "CategoryId": 1, + * "FieldId": 34, + * "IsActive": true, + * "IsStockKeepingUnit": false + * }, + * { + * "Name": "Specification C", + * "CategoryId": 1, + * "FieldId": 35, + * "IsActive": false, + * "IsStockKeepingUnit": false + * } + * ] * ``` */ "GET /api/catalog_system/pub/specification/field/listByCategoryId/:categoryId": { response: CategorySpecification } /** - * Lists all specifications including the current category and the level zero specifications from a category by its ID. - * - * ## Response body example - * - * ```json - * [ - * { - * "Name": "Specification A", - * "CategoryId": 1, - * "FieldId": 33, - * "IsActive": true, - * "IsStockKeepingUnit": false - * }, - * { - * "Name": "Specification B", - * "CategoryId": 1, - * "FieldId": 34, - * "IsActive": true, - * "IsStockKeepingUnit": false - * }, - * { - * "Name": "Specification C", - * "CategoryId": 1, - * "FieldId": 35, - * "IsActive": false, - * "IsStockKeepingUnit": false - * } - * ] + * Lists all specifications including the current category and the level zero specifications from a category by its ID. + * + * ## Response body example + * + * ```json + * [ + * { + * "Name": "Specification A", + * "CategoryId": 1, + * "FieldId": 33, + * "IsActive": true, + * "IsStockKeepingUnit": false + * }, + * { + * "Name": "Specification B", + * "CategoryId": 1, + * "FieldId": 34, + * "IsActive": true, + * "IsStockKeepingUnit": false + * }, + * { + * "Name": "Specification C", + * "CategoryId": 1, + * "FieldId": 35, + * "IsActive": false, + * "IsStockKeepingUnit": false + * } + * ] * ``` */ "GET /api/catalog_system/pub/specification/field/listTreeByCategoryId/:categoryId": { @@ -4961,22 +4959,22 @@ response: CategorySpecification /** * >⚠️ There are two ways to configure collections, through Legacy CMS Portal or using the Beta Collection module. This endpoint is compatible with [collections configured through the Legacy CMS Portal](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L). * - * Associates a single Category to a Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. - * ## Request body example - * - * ```json - * { - * "CategoryId": 1 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "SubCollectionId": 17, - * "CategoryId": 1 - * } + * Associates a single Category to a Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. + * ## Request body example + * + * ```json + * { + * "CategoryId": 1 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "SubCollectionId": 17, + * "CategoryId": 1 + * } * ``` */ "POST /api/catalog/pvt/subcollection/:subCollectionId/category": { @@ -5006,37 +5004,37 @@ CategoryId?: number } /** - * Retrieves all Brands registered in the store's Catalog. - * >⚠️ This route's response is limited to 20k results. If you need to obtain more results, please use the [Get Brand List](https://developers.vtex.com/vtex-rest-api/reference/catalog-api-get-brand-list) endpoint instead to get a paginated response. - * ## Response body example - * - * ```json - * [ - * { - * "id": 9280, - * "name": "Brand", - * "isActive": true, - * "title": "Brand", - * "metaTagDescription": "Brand", - * "imageUrl": null - * }, - * { - * "id": 2000000, - * "name": "Orma Carbon", - * "isActive": true, - * "title": "Orma Carbon", - * "metaTagDescription": "Orma Carbon", - * "imageUrl": null - * }, - * { - * "id": 2000001, - * "name": "Pedigree", - * "isActive": true, - * "title": "Pedigree", - * "metaTagDescription": "", - * "imageUrl": null - * } - * ] + * Retrieves all Brands registered in the store's Catalog. + * >⚠️ This route's response is limited to 20k results. If you need to obtain more results, please use the [Get Brand List](https://developers.vtex.com/vtex-rest-api/reference/catalog-api-get-brand-list) endpoint instead to get a paginated response. + * ## Response body example + * + * ```json + * [ + * { + * "id": 9280, + * "name": "Brand", + * "isActive": true, + * "title": "Brand", + * "metaTagDescription": "Brand", + * "imageUrl": null + * }, + * { + * "id": 2000000, + * "name": "Orma Carbon", + * "isActive": true, + * "title": "Orma Carbon", + * "metaTagDescription": "Orma Carbon", + * "imageUrl": null + * }, + * { + * "id": 2000001, + * "name": "Pedigree", + * "isActive": true, + * "title": "Pedigree", + * "metaTagDescription": "", + * "imageUrl": null + * } + * ] * ``` */ "GET /api/catalog_system/pvt/brand/list": { @@ -5046,44 +5044,44 @@ CategoryId?: number response: BrandGet[] } /** - * Retrieves all Brands registered in the store's Catalog by page number. - * ## Response body example - * - * ```json - * { - * "items": [ - * { - * "id": 2000000, - * "name": "Farm", - * "isActive": true, - * "title": "Farm", - * "metaTagDescription": "Farm", - * "imageUrl": null - * }, - * { - * "id": 2000001, - * "name": "Adidas", - * "isActive": true, - * "title": "", - * "metaTagDescription": "", - * "imageUrl": null - * }, - * { - * "id": 2000002, - * "name": "Brastemp", - * "isActive": true, - * "title": "Brastemp", - * "metaTagDescription": "Brastemp", - * "imageUrl": null - * } - * ], - * "paging": { - * "page": 1, - * "perPage": 3, - * "total": 6, - * "pages": 2 - * } - * } + * Retrieves all Brands registered in the store's Catalog by page number. + * ## Response body example + * + * ```json + * { + * "items": [ + * { + * "id": 2000000, + * "name": "Farm", + * "isActive": true, + * "title": "Farm", + * "metaTagDescription": "Farm", + * "imageUrl": null + * }, + * { + * "id": 2000001, + * "name": "Adidas", + * "isActive": true, + * "title": "", + * "metaTagDescription": "", + * "imageUrl": null + * }, + * { + * "id": 2000002, + * "name": "Brastemp", + * "isActive": true, + * "title": "Brastemp", + * "metaTagDescription": "Brastemp", + * "imageUrl": null + * } + * ], + * "paging": { + * "page": 1, + * "perPage": 3, + * "total": 6, + * "pages": 2 + * } + * } * ``` */ "GET /api/catalog_system/pvt/brand/pagedlist": { @@ -5126,41 +5124,41 @@ pages: number } } /** - * Retrieves a specific Brand by its ID. - * ## Response body example - * - * ```json - * { - * "id": 7000000, - * "name": "Pedigree", - * "isActive": true, - * "title": "Pedigree", - * "metaTagDescription": "Pedigree", - * "imageUrl": null - * } + * Retrieves a specific Brand by its ID. + * ## Response body example + * + * ```json + * { + * "id": 7000000, + * "name": "Pedigree", + * "isActive": true, + * "title": "Pedigree", + * "metaTagDescription": "Pedigree", + * "imageUrl": null + * } * ``` */ "GET /api/catalog_system/pvt/brand/:brandId": { response: BrandGet } /** - * Creates a new Brand. - * ## Request and response body example - * - * ```json - * { - * "Id": 2000013, - * "Name": "Orma Carbon", - * "Text": "Orma Carbon", - * "Keywords": "orma", - * "SiteTitle": "Orma Carbon", - * "Active": true, - * "MenuHome": true, - * "AdWordsRemarketingCode": "", - * "LomadeeCampaignCode": "", - * "Score": null, - * "LinkId": "orma-carbon" - * } + * Creates a new Brand. + * ## Request and response body example + * + * ```json + * { + * "Id": 2000013, + * "Name": "Orma Carbon", + * "Text": "Orma Carbon", + * "Keywords": "orma", + * "SiteTitle": "Orma Carbon", + * "Active": true, + * "MenuHome": true, + * "AdWordsRemarketingCode": "", + * "LomadeeCampaignCode": "", + * "Score": null, + * "LinkId": "orma-carbon" + * } * ``` */ "POST /api/catalog/pvt/brand": { @@ -5168,46 +5166,46 @@ body: BrandCreateUpdate response: BrandCreateUpdate } /** - * Retrieves information about a specific Brand and its context. - * ## Response body example - * - * ```json - * { - * "Id": 2000013, - * "Name": "Orma Carbon", - * "Text": "Orma Carbon", - * "Keywords": "orma", - * "SiteTitle": "Orma Carbon", - * "Active": true, - * "MenuHome": true, - * "AdWordsRemarketingCode": "", - * "LomadeeCampaignCode": "", - * "Score": null, - * "LinkId": "orma-carbon" - * } + * Retrieves information about a specific Brand and its context. + * ## Response body example + * + * ```json + * { + * "Id": 2000013, + * "Name": "Orma Carbon", + * "Text": "Orma Carbon", + * "Keywords": "orma", + * "SiteTitle": "Orma Carbon", + * "Active": true, + * "MenuHome": true, + * "AdWordsRemarketingCode": "", + * "LomadeeCampaignCode": "", + * "Score": null, + * "LinkId": "orma-carbon" + * } * ``` */ "GET /api/catalog/pvt/brand/:brandId": { response: BrandCreateUpdate } /** - * Updates a previously existing Brand. - * ## Request and response body example - * - * ```json - * { - * "Id": 2000013, - * "Name": "Orma Carbon", - * "Text": "Orma Carbon", - * "Keywords": "orma", - * "SiteTitle": "Orma Carbon", - * "Active": true, - * "MenuHome": true, - * "AdWordsRemarketingCode": "", - * "LomadeeCampaignCode": "", - * "Score": null, - * "LinkId": "orma-carbon" - * } + * Updates a previously existing Brand. + * ## Request and response body example + * + * ```json + * { + * "Id": 2000013, + * "Name": "Orma Carbon", + * "Text": "Orma Carbon", + * "Keywords": "orma", + * "SiteTitle": "Orma Carbon", + * "Active": true, + * "MenuHome": true, + * "AdWordsRemarketingCode": "", + * "LomadeeCampaignCode": "", + * "Score": null, + * "LinkId": "orma-carbon" + * } * ``` */ "PUT /api/catalog/pvt/brand/:brandId": { @@ -5223,22 +5221,22 @@ response: BrandCreateUpdate /** * >⚠️ There are two ways to configure collections, through Legacy CMS Portal or using the Beta Collection module. This endpoint is compatible with [collections configured through the Legacy CMS Portal](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L). * - * Associates a single Brand to a Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. - * ## Request body example - * - * ```json - * { - * "BrandId": 2000000 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "SubCollectionId": 17, - * "BrandId": 2000000 - * } + * Associates a single Brand to a Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. + * ## Request body example + * + * ```json + * { + * "BrandId": 2000000 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "SubCollectionId": 17, + * "BrandId": 2000000 + * } * ``` */ "POST /api/catalog/pvt/subcollection/:subCollectionId/brand": { @@ -5268,79 +5266,79 @@ BrandId?: number } /** - * Gets information about a registered attachment. - * >⚠️ To understand the specific syntax for Assembly Options attachments, read the [Assembly Options](https://help.vtex.com/en/tutorial/assembly-options--5x5FhNr4f5RUGDEGWzV1nH#assembly-options-syntax) documentation. - * ## Response body example - * - * ```json - * { - * "Id": 8, - * "Name": "Test", - * "IsRequired": true, - * "IsActive": true, - * "Domains": [ - * { - * "FieldName": "Basic test", - * "MaxCaracters": "", - * "DomainValues": "[1-2]#9[1-1][1]basic;#11[0-1][1]basic" - * }, - * { - * "FieldName": "teste", - * "MaxCaracters": "", - * "DomainValues": "[0-10]#8[0-3][0]medium;#9[0-3][0]medium;#10[0-3][0]medium;#11[0-3][0]medium;#36[0-3][0]medium;#37[0-3][0]medium;#38[0-3][0]medium" - * } - * ] - * } + * Gets information about a registered attachment. + * >⚠️ To understand the specific syntax for Assembly Options attachments, read the [Assembly Options](https://help.vtex.com/en/tutorial/assembly-options--5x5FhNr4f5RUGDEGWzV1nH#assembly-options-syntax) documentation. + * ## Response body example + * + * ```json + * { + * "Id": 8, + * "Name": "Test", + * "IsRequired": true, + * "IsActive": true, + * "Domains": [ + * { + * "FieldName": "Basic test", + * "MaxCaracters": "", + * "DomainValues": "[1-2]#9[1-1][1]basic;#11[0-1][1]basic" + * }, + * { + * "FieldName": "teste", + * "MaxCaracters": "", + * "DomainValues": "[0-10]#8[0-3][0]medium;#9[0-3][0]medium;#10[0-3][0]medium;#11[0-3][0]medium;#36[0-3][0]medium;#37[0-3][0]medium;#38[0-3][0]medium" + * } + * ] + * } * ``` */ "GET /api/catalog/pvt/attachment/:attachmentid": { response: AttachmentResponse } /** - * Updates a previously existing SKU attachment with new information. - * >⚠️ To understand the specific syntax for Assembly Options attachments, read the [Assembly Options](https://help.vtex.com/en/tutorial/assembly-options--5x5FhNr4f5RUGDEGWzV1nH#assembly-options-syntax) documentation. - * ## Request body example - * - * ```json - * { - * "Name": "Test", - * "IsRequired": true, - * "IsActive": true, - * "Domains": [ - * { - * "FieldName": "Basic test", - * "MaxCaracters": "", - * "DomainValues": "[1-2]#9[1-1][1]basic;#11[0-1][1]basic" - * }, - * { - * "FieldName": "teste", - * "MaxCaracters": "", - * "DomainValues": "[0-10]#8[0-3][0]medium;#9[0-3][0]medium;#10[0-3][0]medium;#11[0-3][0]medium;#36[0-3][0]medium;#37[0-3][0]medium;#38[0-3][0]medium" - * } - * ] - * } - * ``` - * ## Response body example - * - * ```json - * { - * "Id": 8, - * "Name": "Test", - * "IsRequired": true, - * "IsActive": true, - * "Domains": [ - * { - * "FieldName": "Basic test", - * "MaxCaracters": "", - * "DomainValues": "[1-2]#9[1-1][1]basic;#11[0-1][1]basic" - * }, - * { - * "FieldName": "teste", - * "MaxCaracters": "", - * "DomainValues": "[0-10]#8[0-3][0]medium;#9[0-3][0]medium;#10[0-3][0]medium;#11[0-3][0]medium;#36[0-3][0]medium;#37[0-3][0]medium;#38[0-3][0]medium" - * } - * ] - * } + * Updates a previously existing SKU attachment with new information. + * >⚠️ To understand the specific syntax for Assembly Options attachments, read the [Assembly Options](https://help.vtex.com/en/tutorial/assembly-options--5x5FhNr4f5RUGDEGWzV1nH#assembly-options-syntax) documentation. + * ## Request body example + * + * ```json + * { + * "Name": "Test", + * "IsRequired": true, + * "IsActive": true, + * "Domains": [ + * { + * "FieldName": "Basic test", + * "MaxCaracters": "", + * "DomainValues": "[1-2]#9[1-1][1]basic;#11[0-1][1]basic" + * }, + * { + * "FieldName": "teste", + * "MaxCaracters": "", + * "DomainValues": "[0-10]#8[0-3][0]medium;#9[0-3][0]medium;#10[0-3][0]medium;#11[0-3][0]medium;#36[0-3][0]medium;#37[0-3][0]medium;#38[0-3][0]medium" + * } + * ] + * } + * ``` + * ## Response body example + * + * ```json + * { + * "Id": 8, + * "Name": "Test", + * "IsRequired": true, + * "IsActive": true, + * "Domains": [ + * { + * "FieldName": "Basic test", + * "MaxCaracters": "", + * "DomainValues": "[1-2]#9[1-1][1]basic;#11[0-1][1]basic" + * }, + * { + * "FieldName": "teste", + * "MaxCaracters": "", + * "DomainValues": "[0-10]#8[0-3][0]medium;#9[0-3][0]medium;#10[0-3][0]medium;#11[0-3][0]medium;#36[0-3][0]medium;#37[0-3][0]medium;#38[0-3][0]medium" + * } + * ] + * } * ``` */ "PUT /api/catalog/pvt/attachment/:attachmentid": { @@ -5354,50 +5352,50 @@ response: AttachmentResponse } /** - * Creates a new SKU attachment. - * >⚠️ To understand the specific syntax for Assembly Options attachments, read the [Assembly Options](https://help.vtex.com/en/tutorial/assembly-options--5x5FhNr4f5RUGDEGWzV1nH#assembly-options-syntax) documentation. - * ## Request body example - * - * ```json - * { - * "Name": "Test", - * "IsRequired": true, - * "IsActive": true, - * "Domains": [ - * { - * "FieldName": "Basic test", - * "MaxCaracters": "", - * "DomainValues": "[1-2]#9[1-1][1]basic;#11[0-1][1]basic" - * }, - * { - * "FieldName": "teste", - * "MaxCaracters": "", - * "DomainValues": "[0-10]#8[0-3][0]medium;#9[0-3][0]medium;#10[0-3][0]medium;#11[0-3][0]medium;#36[0-3][0]medium;#37[0-3][0]medium;#38[0-3][0]medium" - * } - * ] - * } - * ``` - * ## Response body example - * - * ```json - * { - * "Id": 8, - * "Name": "Test", - * "IsRequired": true, - * "IsActive": true, - * "Domains": [ - * { - * "FieldName": "Basic test", - * "MaxCaracters": "", - * "DomainValues": "[1-2]#9[1-1][1]basic;#11[0-1][1]basic" - * }, - * { - * "FieldName": "teste", - * "MaxCaracters": "", - * "DomainValues": "[0-10]#8[0-3][0]medium;#9[0-3][0]medium;#10[0-3][0]medium;#11[0-3][0]medium;#36[0-3][0]medium;#37[0-3][0]medium;#38[0-3][0]medium" - * } - * ] - * } + * Creates a new SKU attachment. + * >⚠️ To understand the specific syntax for Assembly Options attachments, read the [Assembly Options](https://help.vtex.com/en/tutorial/assembly-options--5x5FhNr4f5RUGDEGWzV1nH#assembly-options-syntax) documentation. + * ## Request body example + * + * ```json + * { + * "Name": "Test", + * "IsRequired": true, + * "IsActive": true, + * "Domains": [ + * { + * "FieldName": "Basic test", + * "MaxCaracters": "", + * "DomainValues": "[1-2]#9[1-1][1]basic;#11[0-1][1]basic" + * }, + * { + * "FieldName": "teste", + * "MaxCaracters": "", + * "DomainValues": "[0-10]#8[0-3][0]medium;#9[0-3][0]medium;#10[0-3][0]medium;#11[0-3][0]medium;#36[0-3][0]medium;#37[0-3][0]medium;#38[0-3][0]medium" + * } + * ] + * } + * ``` + * ## Response body example + * + * ```json + * { + * "Id": 8, + * "Name": "Test", + * "IsRequired": true, + * "IsActive": true, + * "Domains": [ + * { + * "FieldName": "Basic test", + * "MaxCaracters": "", + * "DomainValues": "[1-2]#9[1-1][1]basic;#11[0-1][1]basic" + * }, + * { + * "FieldName": "teste", + * "MaxCaracters": "", + * "DomainValues": "[0-10]#8[0-3][0]medium;#9[0-3][0]medium;#10[0-3][0]medium;#11[0-3][0]medium;#36[0-3][0]medium;#37[0-3][0]medium;#38[0-3][0]medium" + * } + * ] + * } * ``` */ "POST /api/catalog/pvt/attachment": { @@ -5405,151 +5403,151 @@ body: AttachmentRequest response: AttachmentResponse } /** - * Retrieves information about all registered attachments. - * >⚠️ To understand the specific syntax for Assembly Options attachments, read the [Assembly Options](https://help.vtex.com/en/tutorial/assembly-options--5x5FhNr4f5RUGDEGWzV1nH#assembly-options-syntax) documentation. - * ## Response body example - * - * ```json - * { - * "Page": 1, - * "Size": 11, - * "TotalRows": 11, - * "TotalPage": 1, - * "Data": [ - * { - * "Id": 1, - * "Name": "Acessórios do bicho", - * "IsRequired": true, - * "IsActive": true, - * "Domains": [ - * { - * "FieldName": "extra", - * "MaxCaracters": "", - * "DomainValues": "[0-3]#1[1-2][1]pricetable1;#3[0-2][0]pricetable2;#5[0-2][0]pricetable3" - * } - * ] - * }, - * { - * "Id": 2, - * "Name": "Sobrenome", - * "IsRequired": false, - * "IsActive": true, - * "Domains": [] - * }, - * { - * "Id": 3, - * "Name": "Assinatura Teste", - * "IsRequired": false, - * "IsActive": true, - * "Domains": [ - * { - * "FieldName": " vtex.subscription.key.frequency", - * "MaxCaracters": "", - * "DomainValues": "1 day, 7 day, 1 month, 6 month" - * }, - * { - * "FieldName": "vtex.subscription.key.validity.begin", - * "MaxCaracters": "", - * "DomainValues": "1" - * }, - * { - * "FieldName": "vtex.subscription.key.validity.end", - * "MaxCaracters": "", - * "DomainValues": "31" - * }, - * { - * "FieldName": "vtex.subscription.key.purchaseday", - * "MaxCaracters": "", - * "DomainValues": "1, 2, 20, 31" - * } - * ] - * }, - * { - * "Id": 5, - * "Name": "teste", - * "IsRequired": false, - * "IsActive": true, - * "Domains": [] - * }, - * { - * "Id": 6, - * "Name": "teste2", - * "IsRequired": false, - * "IsActive": true, - * "Domains": [] - * }, - * { - * "Id": 7, - * "Name": "vtex.subscription.teste3", - * "IsRequired": false, - * "IsActive": true, - * "Domains": [] - * }, - * { - * "Id": 8, - * "Name": "teste api nova", - * "IsRequired": true, - * "IsActive": true, - * "Domains": [ - * { - * "FieldName": "Basic teste", - * "MaxCaracters": "", - * "DomainValues": "[1-2]#9[1-1][1]basic;#11[0-1][1]basic" - * }, - * { - * "FieldName": "teste", - * "MaxCaracters": "", - * "DomainValues": "[0-10]#8[0-3][0]medium;#9[0-3][0]medium;#10[0-3][0]medium;#11[0-3][0]medium;#36[0-3][0]medium;#37[0-3][0]medium;#38[0-3][0]medium" - * } - * ] - * }, - * { - * "Id": 9, - * "Name": "vtex.subscription.teste", - * "IsRequired": false, - * "IsActive": true, - * "Domains": [] - * }, - * { - * "Id": 10, - * "Name": "Montagens", - * "IsRequired": false, - * "IsActive": true, - * "Domains": [] - * }, - * { - * "Id": 11, - * "Name": "vtex.subscription.subscription", - * "IsRequired": false, - * "IsActive": true, - * "Domains": [ - * { - * "FieldName": "vtex.subscription.key.frequency", - * "MaxCaracters": "15", - * "DomainValues": "1 month" - * }, - * { - * "FieldName": "vtex.subscription.key.purchaseday", - * "MaxCaracters": "15", - * "DomainValues": "1,15,28" - * } - * ] - * }, - * { - * "Id": 12, - * "Name": "T-Shirt Customization", - * "IsRequired": false, - * "IsActive": true, - * "Domains": [ - * { - * "FieldName": "T-Shirt Name", - * "MaxCaracters": "15", - * "DomainValues": "[]" - * } - * ] - * } - * ] - * } + * Retrieves information about all registered attachments. + * >⚠️ To understand the specific syntax for Assembly Options attachments, read the [Assembly Options](https://help.vtex.com/en/tutorial/assembly-options--5x5FhNr4f5RUGDEGWzV1nH#assembly-options-syntax) documentation. + * ## Response body example + * + * ```json + * { + * "Page": 1, + * "Size": 11, + * "TotalRows": 11, + * "TotalPage": 1, + * "Data": [ + * { + * "Id": 1, + * "Name": "Acessórios do bicho", + * "IsRequired": true, + * "IsActive": true, + * "Domains": [ + * { + * "FieldName": "extra", + * "MaxCaracters": "", + * "DomainValues": "[0-3]#1[1-2][1]pricetable1;#3[0-2][0]pricetable2;#5[0-2][0]pricetable3" + * } + * ] + * }, + * { + * "Id": 2, + * "Name": "Sobrenome", + * "IsRequired": false, + * "IsActive": true, + * "Domains": [] + * }, + * { + * "Id": 3, + * "Name": "Assinatura Teste", + * "IsRequired": false, + * "IsActive": true, + * "Domains": [ + * { + * "FieldName": " vtex.subscription.key.frequency", + * "MaxCaracters": "", + * "DomainValues": "1 day, 7 day, 1 month, 6 month" + * }, + * { + * "FieldName": "vtex.subscription.key.validity.begin", + * "MaxCaracters": "", + * "DomainValues": "1" + * }, + * { + * "FieldName": "vtex.subscription.key.validity.end", + * "MaxCaracters": "", + * "DomainValues": "31" + * }, + * { + * "FieldName": "vtex.subscription.key.purchaseday", + * "MaxCaracters": "", + * "DomainValues": "1, 2, 20, 31" + * } + * ] + * }, + * { + * "Id": 5, + * "Name": "teste", + * "IsRequired": false, + * "IsActive": true, + * "Domains": [] + * }, + * { + * "Id": 6, + * "Name": "teste2", + * "IsRequired": false, + * "IsActive": true, + * "Domains": [] + * }, + * { + * "Id": 7, + * "Name": "vtex.subscription.teste3", + * "IsRequired": false, + * "IsActive": true, + * "Domains": [] + * }, + * { + * "Id": 8, + * "Name": "teste api nova", + * "IsRequired": true, + * "IsActive": true, + * "Domains": [ + * { + * "FieldName": "Basic teste", + * "MaxCaracters": "", + * "DomainValues": "[1-2]#9[1-1][1]basic;#11[0-1][1]basic" + * }, + * { + * "FieldName": "teste", + * "MaxCaracters": "", + * "DomainValues": "[0-10]#8[0-3][0]medium;#9[0-3][0]medium;#10[0-3][0]medium;#11[0-3][0]medium;#36[0-3][0]medium;#37[0-3][0]medium;#38[0-3][0]medium" + * } + * ] + * }, + * { + * "Id": 9, + * "Name": "vtex.subscription.teste", + * "IsRequired": false, + * "IsActive": true, + * "Domains": [] + * }, + * { + * "Id": 10, + * "Name": "Montagens", + * "IsRequired": false, + * "IsActive": true, + * "Domains": [] + * }, + * { + * "Id": 11, + * "Name": "vtex.subscription.subscription", + * "IsRequired": false, + * "IsActive": true, + * "Domains": [ + * { + * "FieldName": "vtex.subscription.key.frequency", + * "MaxCaracters": "15", + * "DomainValues": "1 month" + * }, + * { + * "FieldName": "vtex.subscription.key.purchaseday", + * "MaxCaracters": "15", + * "DomainValues": "1,15,28" + * } + * ] + * }, + * { + * "Id": 12, + * "Name": "T-Shirt Customization", + * "IsRequired": false, + * "IsActive": true, + * "Domains": [ + * { + * "FieldName": "T-Shirt Name", + * "MaxCaracters": "15", + * "DomainValues": "[]" + * } + * ] + * } + * ] + * } * ``` */ "GET /api/catalog/pvt/attachments": { @@ -5731,22 +5729,22 @@ SpecificationFieldId?: number /** * >⚠️ There are two ways to configure collections, through Legacy CMS Portal or using the Beta Collection module. This endpoint is compatible with [collections configured through the Legacy CMS Portal](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L). * - * Retrieves general information of a Collection. - * - * ## Response body example - * - * ```json - * { - * "Id": 159, - * "Name": "Winter", - * "Description": null, - * "Searchable": false, - * "Highlight": false, - * "DateFrom": "2021-09-27T10:47:00", - * "DateTo": "2027-09-27T10:47:00", - * "TotalProducts": 0, - * "Type": "Manual" - * } + * Retrieves general information of a Collection. + * + * ## Response body example + * + * ```json + * { + * "Id": 159, + * "Name": "Winter", + * "Description": null, + * "Searchable": false, + * "Highlight": false, + * "DateFrom": "2021-09-27T10:47:00", + * "DateTo": "2027-09-27T10:47:00", + * "TotalProducts": 0, + * "Type": "Manual" + * } * ``` */ "GET /api/catalog/pvt/collection/:collectionId": { @@ -5792,33 +5790,33 @@ Type?: string /** * >⚠️ There are two ways to configure collections, through Legacy CMS Portal or using the Beta Collection module. This endpoint is compatible with [collections configured through the Legacy CMS Portal](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L). * - * Updates a previously created Collection. - * ## Request body example - * - * ```json - * { - * "Name": "Winter", - * "Searchable": false, - * "Highlight": false, - * "DateFrom": "2021-09-27T10:47:00", - * "DateTo": "2027-09-27T10:47:00" - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 159, - * "Name": "Winter", - * "Description": null, - * "Searchable": false, - * "Highlight": false, - * "DateFrom": "2021-09-27T10:47:00", - * "DateTo": "2027-09-27T10:47:00", - * "TotalProducts": 0, - * "Type": "Manual" - * } + * Updates a previously created Collection. + * ## Request body example + * + * ```json + * { + * "Name": "Winter", + * "Searchable": false, + * "Highlight": false, + * "DateFrom": "2021-09-27T10:47:00", + * "DateTo": "2027-09-27T10:47:00" + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 159, + * "Name": "Winter", + * "Description": null, + * "Searchable": false, + * "Highlight": false, + * "DateFrom": "2021-09-27T10:47:00", + * "DateTo": "2027-09-27T10:47:00", + * "TotalProducts": 0, + * "Type": "Manual" + * } * ``` */ "PUT /api/catalog/pvt/collection/:collectionId": { @@ -5894,33 +5892,33 @@ Type?: string /** * >⚠️ There are two ways to configure collections, through Legacy CMS Portal or using the Beta Collection module. This endpoint is compatible with [collections configured through the Legacy CMS Portal](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L). * - * Creates a new Collection. - * ## Request body example - * - * ```json - * { - * "Name": "Winter", - * "Searchable": false, - * "Highlight": false, - * "DateFrom": "2021-09-27T10:47:00", - * "DateTo": "2027-09-27T10:47:00" - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 159, - * "Name": "Winter", - * "Description": null, - * "Searchable": false, - * "Highlight": false, - * "DateFrom": "2021-09-27T10:47:00", - * "DateTo": "2027-09-27T10:47:00", - * "TotalProducts": 0, - * "Type": "Manual" - * } + * Creates a new Collection. + * ## Request body example + * + * ```json + * { + * "Name": "Winter", + * "Searchable": false, + * "Highlight": false, + * "DateFrom": "2021-09-27T10:47:00", + * "DateTo": "2027-09-27T10:47:00" + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 159, + * "Name": "Winter", + * "Description": null, + * "Searchable": false, + * "Highlight": false, + * "DateFrom": "2021-09-27T10:47:00", + * "DateTo": "2027-09-27T10:47:00", + * "TotalProducts": 0, + * "Type": "Manual" + * } * ``` */ "POST /api/catalog/pvt/collection": { @@ -5988,36 +5986,36 @@ Type?: string /** * >⚠️ There are two ways to configure collections, through Legacy CMS Portal or using the Beta Collection module. This endpoint is compatible with [collections configured through the Legacy CMS Portal](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L). * - * Retrieves all Subcollections given a Collection ID. A Subcollection is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. - * ## Response body example - * - * ```json - * [ - * { - * "Id": 12, - * "CollectionId": 149, - * "Name": "Subcollection", - * "Type": "Inclusive", - * "PreSale": false, - * "Release": true - * }, - * { - * "Id": 13, - * "CollectionId": 149, - * "Name": "Test", - * "Type": "Exclusive", - * "PreSale": true, - * "Release": false - * }, - * { - * "Id": 14, - * "CollectionId": 149, - * "Name": "asdfghj", - * "Type": "Inclusive", - * "PreSale": false, - * "Release": false - * } - * ] + * Retrieves all Subcollections given a Collection ID. A Subcollection is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. + * ## Response body example + * + * ```json + * [ + * { + * "Id": 12, + * "CollectionId": 149, + * "Name": "Subcollection", + * "Type": "Inclusive", + * "PreSale": false, + * "Release": true + * }, + * { + * "Id": 13, + * "CollectionId": 149, + * "Name": "Test", + * "Type": "Exclusive", + * "PreSale": true, + * "Release": false + * }, + * { + * "Id": 14, + * "CollectionId": 149, + * "Name": "asdfghj", + * "Type": "Inclusive", + * "PreSale": false, + * "Release": false + * } + * ] * ``` */ "GET /api/catalog/pvt/collection/:collectionId/subcollection": { @@ -6051,18 +6049,18 @@ Release?: boolean /** * >⚠️ There are two ways to configure collections, through Legacy CMS Portal or using the Beta Collection module. This endpoint is compatible with [collections configured through the Legacy CMS Portal](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L). * - * Retrieves information about a Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. - * ## Response body example - * - * ```json - * { - * "Id": 13, - * "CollectionId": 149, - * "Name": "Test", - * "Type": "Exclusive", - * "PreSale": true, - * "Release": false - * } + * Retrieves information about a Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. + * ## Response body example + * + * ```json + * { + * "Id": 13, + * "CollectionId": 149, + * "Name": "Test", + * "Type": "Exclusive", + * "PreSale": true, + * "Release": false + * } * ``` */ "GET /api/catalog/pvt/subcollection/:subCollectionId": { @@ -6096,18 +6094,18 @@ Release?: boolean /** * >⚠️ There are two ways to configure collections, through Legacy CMS Portal or using the Beta Collection module. This endpoint is compatible with [collections configured through the Legacy CMS Portal](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L). * - * Updates a previously created Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. - * - * ## Request or response body example - * - * ```json - * { - * "CollectionId": 149, - * "Name": "Test", - * "Type": "Exclusive", - * "PreSale": true, - * "Release": false - * } + * Updates a previously created Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. + * + * ## Request or response body example + * + * ```json + * { + * "CollectionId": 149, + * "Name": "Test", + * "Type": "Exclusive", + * "PreSale": true, + * "Release": false + * } * ``` */ "PUT /api/catalog/pvt/subcollection/:subCollectionId": { @@ -6171,29 +6169,29 @@ Release?: boolean /** * >⚠️ There are two ways to configure collections, through Legacy CMS Portal or using the Beta Collection module. This endpoint is compatible with [collections configured through the Legacy CMS Portal](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L). * - * Creates a new Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. A Subcollection can be either “Exclusive” (all the products contained in it will not be used) or “Inclusive” (all the products contained in it will be used). - * ## Request body example - * - * ```json - * { - * "CollectionId": 149, - * "Name": "Test", - * "Type": "Exclusive", - * "PreSale": true, - * "Release": false - * } - * ``` - * ## Response body example - * - * ```json - * { - * "Id": 13, - * "CollectionId": 149, - * "Name": "Test", - * "Type": "Exclusive", - * "PreSale": true, - * "Release": false - * } + * Creates a new Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. A Subcollection can be either “Exclusive” (all the products contained in it will not be used) or “Inclusive” (all the products contained in it will be used). + * ## Request body example + * + * ```json + * { + * "CollectionId": 149, + * "Name": "Test", + * "Type": "Exclusive", + * "PreSale": true, + * "Release": false + * } + * ``` + * ## Response body example + * + * ```json + * { + * "Id": 13, + * "CollectionId": 149, + * "Name": "Test", + * "Type": "Exclusive", + * "PreSale": true, + * "Release": false + * } * ``` */ "POST /api/catalog/pvt/subcollection": { @@ -6249,15 +6247,15 @@ Release?: boolean /** * >⚠️ There are two ways to configure collections, through Legacy CMS Portal or using the Beta Collection module. This endpoint is compatible with [collections configured through the Legacy CMS Portal](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L). * - * Edits the position of an SKU that already exists in the Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. - * ## Request body example - * - * ```json - * { - * "skuId": 1, - * "position": 1, - * "subCollectionId": 17 - * } + * Edits the position of an SKU that already exists in the Subcollection, which is a [Group](https://help.vtex.com/en/tutorial/adding-collections-cms--2YBy6P6X0NFRpkD2ZBxF6L#group-types) within a Collection. + * ## Request body example + * + * ```json + * { + * "skuId": 1, + * "position": 1, + * "subCollectionId": 17 + * } * ``` */ "POST /api/catalog/pvt/collection/:collectionId/position": { @@ -6277,29 +6275,29 @@ subCollectionId: number } } /** - * Retrieves information of a Product or SKU Specification. - * ## Response body example - * - * ```json - * { - * "Id": 88, - * "FieldTypeId": 1, - * "CategoryId": 4, - * "FieldGroupId": 20, - * "Name": "Material", - * "Description": "Composition of the product.", - * "Position": 1, - * "IsFilter": true, - * "IsRequired": true, - * "IsOnProductDetails": false, - * "IsStockKeepingUnit": false, - * "IsWizard": false, - * "IsActive": true, - * "IsTopMenuLinkActive": false, - * "IsSideMenuLinkActive": true, - * "DefaultValue": "Cotton" - * } - * ``` + * Retrieves information of a Product or SKU Specification. + * ## Response body example + * + * ```json + * { + * "Id": 88, + * "FieldTypeId": 1, + * "CategoryId": 4, + * "FieldGroupId": 20, + * "Name": "Material", + * "Description": "Composition of the product.", + * "Position": 1, + * "IsFilter": true, + * "IsRequired": true, + * "IsOnProductDetails": false, + * "IsStockKeepingUnit": false, + * "IsWizard": false, + * "IsActive": true, + * "IsTopMenuLinkActive": false, + * "IsSideMenuLinkActive": true, + * "DefaultValue": "Cotton" + * } + * ``` * */ "GET /api/catalog/pvt/specification/:specificationId": { @@ -6372,53 +6370,53 @@ DefaultValue: (null | string) } } /** - * Updates a Product Specification or SKU Specification. - * - * >⚠️ It is not possible to edit `FieldTypeId`, `CategoryId`, `FieldGroupId` or `IsStockKeepingUnit` in this API call. - * - * ## Request body example - * - * ```json - * { - * "FieldTypeId": 1, - * "CategoryId": 4, - * "FieldGroupId": 20, - * "Name": "Material", - * "Description": "Composition of the product.", - * "Position": 1, - * "IsFilter": true, - * "IsRequired": true, - * "IsOnProductDetails": false, - * "IsStockKeepingUnit": false, - * "IsActive": true, - * "IsTopMenuLinkActive": false, - * "IsSideMenuLinkActive": true, - * "DefaultValue": "Leather" - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 88, - * "FieldTypeId": 1, - * "CategoryId": 4, - * "FieldGroupId": 20, - * "Name": "Material", - * "Description": "Composition of the product.", - * "Position": 1, - * "IsFilter": true, - * "IsRequired": true, - * "IsOnProductDetails": false, - * "IsStockKeepingUnit": false, - * "IsWizard": false, - * "IsActive": true, - * "IsTopMenuLinkActive": false, - * "IsSideMenuLinkActive": true, - * "DefaultValue": "Leather" - * } - * ``` + * Updates a Product Specification or SKU Specification. + * + * >⚠️ It is not possible to edit `FieldTypeId`, `CategoryId`, `FieldGroupId` or `IsStockKeepingUnit` in this API call. + * + * ## Request body example + * + * ```json + * { + * "FieldTypeId": 1, + * "CategoryId": 4, + * "FieldGroupId": 20, + * "Name": "Material", + * "Description": "Composition of the product.", + * "Position": 1, + * "IsFilter": true, + * "IsRequired": true, + * "IsOnProductDetails": false, + * "IsStockKeepingUnit": false, + * "IsActive": true, + * "IsTopMenuLinkActive": false, + * "IsSideMenuLinkActive": true, + * "DefaultValue": "Leather" + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 88, + * "FieldTypeId": 1, + * "CategoryId": 4, + * "FieldGroupId": 20, + * "Name": "Material", + * "Description": "Composition of the product.", + * "Position": 1, + * "IsFilter": true, + * "IsRequired": true, + * "IsOnProductDetails": false, + * "IsStockKeepingUnit": false, + * "IsWizard": false, + * "IsActive": true, + * "IsTopMenuLinkActive": false, + * "IsSideMenuLinkActive": true, + * "DefaultValue": "Leather" + * } + * ``` * */ "PUT /api/catalog/pvt/specification/:specificationId": { @@ -6511,14 +6509,14 @@ Name?: string */ Description?: (null | string) /** - * Store Framework - Deprecated. - * Legacy CMS Portal - This position number is used in ordering the specifications both in the navigation menu and in the specification listing on the product page. + * Store Framework - Deprecated. + * Legacy CMS Portal - This position number is used in ordering the specifications both in the navigation menu and in the specification listing on the product page. * */ Position?: number /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To allow the specification to be used as a facet (filter) on the search navigation bar. + * Store Framework - Deprecated. + * Legacy CMS Portal - To allow the specification to be used as a facet (filter) on the search navigation bar. * */ IsFilter?: boolean @@ -6527,8 +6525,8 @@ IsFilter?: boolean */ IsRequired?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal -If specification is visible on the product page. + * Store Framework - Deprecated. + * Legacy CMS Portal -If specification is visible on the product page. * */ IsOnProductDetails?: boolean @@ -6545,14 +6543,14 @@ IsWizard?: (null | boolean) */ IsActive?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To make the specification visible in the store's upper menu. + * Store Framework - Deprecated. + * Legacy CMS Portal - To make the specification visible in the store's upper menu. * */ IsTopMenuLinkActive?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To make the specification field clickable in the search navigation bar. + * Store Framework - Deprecated. + * Legacy CMS Portal - To make the specification field clickable in the search navigation bar. * */ IsSideMenuLinkActive?: boolean @@ -6563,50 +6561,50 @@ DefaultValue?: string } } /** - * Creates a new Product or SKU Specification. - * ## Request body example - * - * ```json - * { - * "FieldTypeId": 1, - * "CategoryId": 4, - * "FieldGroupId": 20, - * "Name": "Material", - * "Description": "Composition of the product.", - * "Position": 1, - * "IsFilter": true, - * "IsRequired": true, - * "IsOnProductDetails": false, - * "IsStockKeepingUnit": false, - * "IsActive": true, - * "IsTopMenuLinkActive": false, - * "IsSideMenuLinkActive": true, - * "DefaultValue": "Cotton" - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 88, - * "FieldTypeId": 1, - * "CategoryId": 4, - * "FieldGroupId": 20, - * "Name": "Material", - * "Description": "Composition of the product.", - * "Position": 1, - * "IsFilter": true, - * "IsRequired": true, - * "IsOnProductDetails": false, - * "IsStockKeepingUnit": false, - * "IsWizard": false, - * "IsActive": true, - * "IsTopMenuLinkActive": false, - * "IsSideMenuLinkActive": true, - * "DefaultValue": "Cotton" - * } - * ``` + * Creates a new Product or SKU Specification. + * ## Request body example + * + * ```json + * { + * "FieldTypeId": 1, + * "CategoryId": 4, + * "FieldGroupId": 20, + * "Name": "Material", + * "Description": "Composition of the product.", + * "Position": 1, + * "IsFilter": true, + * "IsRequired": true, + * "IsOnProductDetails": false, + * "IsStockKeepingUnit": false, + * "IsActive": true, + * "IsTopMenuLinkActive": false, + * "IsSideMenuLinkActive": true, + * "DefaultValue": "Cotton" + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 88, + * "FieldTypeId": 1, + * "CategoryId": 4, + * "FieldGroupId": 20, + * "Name": "Material", + * "Description": "Composition of the product.", + * "Position": 1, + * "IsFilter": true, + * "IsRequired": true, + * "IsOnProductDetails": false, + * "IsStockKeepingUnit": false, + * "IsWizard": false, + * "IsActive": true, + * "IsTopMenuLinkActive": false, + * "IsSideMenuLinkActive": true, + * "DefaultValue": "Cotton" + * } + * ``` * */ "POST /api/catalog/pvt/specification": { @@ -6632,14 +6630,14 @@ Name: string */ Description?: (null | string) /** - * Store Framework - Deprecated. - * Legacy CMS Portal - This position number is used in ordering the specifications both in the navigation menu and in the specification listing on the product page. + * Store Framework - Deprecated. + * Legacy CMS Portal - This position number is used in ordering the specifications both in the navigation menu and in the specification listing on the product page. * */ Position?: number /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To allow the specification to be used as a facet (filter) on the search navigation bar. + * Store Framework - Deprecated. + * Legacy CMS Portal - To allow the specification to be used as a facet (filter) on the search navigation bar. * */ IsFilter?: boolean @@ -6648,8 +6646,8 @@ IsFilter?: boolean */ IsRequired?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal -If specification is visible on the product page. + * Store Framework - Deprecated. + * Legacy CMS Portal -If specification is visible on the product page. * */ IsOnProductDetails?: boolean @@ -6666,14 +6664,14 @@ IsWizard?: (null | boolean) */ IsActive?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To make the specification visible in the store's upper menu. + * Store Framework - Deprecated. + * Legacy CMS Portal - To make the specification visible in the store's upper menu. * */ IsTopMenuLinkActive?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To make the specification field clickable in the search navigation bar. + * Store Framework - Deprecated. + * Legacy CMS Portal - To make the specification field clickable in the search navigation bar. * */ IsSideMenuLinkActive?: boolean @@ -6708,14 +6706,14 @@ Name?: string */ Description?: (null | string) /** - * Store Framework - Deprecated. - * Legacy CMS Portal - This position number is used in ordering the specifications both in the navigation menu and in the specification listing on the product page. + * Store Framework - Deprecated. + * Legacy CMS Portal - This position number is used in ordering the specifications both in the navigation menu and in the specification listing on the product page. * */ Position?: number /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To allow the specification to be used as a facet (filter) on the search navigation bar. + * Store Framework - Deprecated. + * Legacy CMS Portal - To allow the specification to be used as a facet (filter) on the search navigation bar. * */ IsFilter?: boolean @@ -6724,8 +6722,8 @@ IsFilter?: boolean */ IsRequired?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal -If specification is visible on the product page. + * Store Framework - Deprecated. + * Legacy CMS Portal -If specification is visible on the product page. * */ IsOnProductDetails?: boolean @@ -6742,14 +6740,14 @@ IsWizard?: (null | boolean) */ IsActive?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To make the specification visible in the store's upper menu. + * Store Framework - Deprecated. + * Legacy CMS Portal - To make the specification visible in the store's upper menu. * */ IsTopMenuLinkActive?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To make the specification field clickable in the search navigation bar. + * Store Framework - Deprecated. + * Legacy CMS Portal - To make the specification field clickable in the search navigation bar. * */ IsSideMenuLinkActive?: boolean @@ -6760,35 +6758,35 @@ DefaultValue?: string } } /** - * Retrieves details from a specification field by this field's ID. - * >⚠️ This is a legacy endpoint. We recommend using [Get Specification](https://developers.vtex.com/vtex-rest-api/reference/get_api-catalog-pvt-specification-specificationid) instead. - * - * ## Response body example - * - * ```json - * { - * "Name": "Material", - * "CategoryId": 4, - * "FieldId": 88, - * "IsActive": true, - * "IsRequired": true, - * "FieldTypeId": 1, - * "FieldTypeName": "Texto", - * "FieldValueId": null, - * "Description": "Composition of the product.", - * "IsStockKeepingUnit": false, - * "IsFilter": true, - * "IsOnProductDetails": false, - * "Position": 1, - * "IsWizard": false, - * "IsTopMenuLinkActive": false, - * "IsSideMenuLinkActive": true, - * "DefaultValue": null, - * "FieldGroupId": 20, - * "FieldGroupName": "Clothes specifications" - * } - * ``` - * + * Retrieves details from a specification field by this field's ID. + * >⚠️ This is a legacy endpoint. We recommend using [Get Specification](https://developers.vtex.com/vtex-rest-api/reference/get_api-catalog-pvt-specification-specificationid) instead. + * + * ## Response body example + * + * ```json + * { + * "Name": "Material", + * "CategoryId": 4, + * "FieldId": 88, + * "IsActive": true, + * "IsRequired": true, + * "FieldTypeId": 1, + * "FieldTypeName": "Texto", + * "FieldValueId": null, + * "Description": "Composition of the product.", + * "IsStockKeepingUnit": false, + * "IsFilter": true, + * "IsOnProductDetails": false, + * "Position": 1, + * "IsWizard": false, + * "IsTopMenuLinkActive": false, + * "IsSideMenuLinkActive": true, + * "DefaultValue": null, + * "FieldGroupId": 20, + * "FieldGroupName": "Clothes specifications" + * } + * ``` + * * */ "GET /api/catalog_system/pub/specification/fieldGet/:fieldId": { @@ -6830,20 +6828,20 @@ Description?: (null | string) */ IsStockKeepingUnit?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To allow the specification to be used as a facet (filter) on the search navigation bar. + * Store Framework - Deprecated. + * Legacy CMS Portal - To allow the specification to be used as a facet (filter) on the search navigation bar. * */ IsFilter?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal -If specification is visible on the product page. + * Store Framework - Deprecated. + * Legacy CMS Portal -If specification is visible on the product page. * */ IsOnProductDetails?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - This position number is used in ordering the specifications both in the navigation menu and in the specification listing on the product page. + * Store Framework - Deprecated. + * Legacy CMS Portal - This position number is used in ordering the specifications both in the navigation menu and in the specification listing on the product page. * */ Position?: number @@ -6852,14 +6850,14 @@ Position?: number */ IsWizard?: (null | boolean) /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To make the specification visible in the store's upper menu. + * Store Framework - Deprecated. + * Legacy CMS Portal - To make the specification visible in the store's upper menu. * */ IsTopMenuLinkActive?: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To make the specification field clickable in the search navigation bar. + * Store Framework - Deprecated. + * Legacy CMS Portal - To make the specification field clickable in the search navigation bar. * */ IsSideMenuLinkActive?: boolean @@ -6878,38 +6876,38 @@ FieldGroupName?: string } } /** - * Creates a specification field in a category. - * >⚠️ This is a legacy endpoint. We recommend using [Create Specification](https://developers.vtex.com/vtex-rest-api/reference/catalog-api-post-specification) instead. - * - * ## Request body example - * - * ```json - * { - * "Name": "Material", - * "CategoryId": 4, - * "FieldId": 88, - * "IsActive": true, - * "IsRequired": true, - * "FieldTypeId": 1, - * "FieldValueId": 1, - * "IsStockKeepingUnit": false, - * "Description": "Composition of the product.", - * "IsFilter": true, - * "IsOnProductDetails": false, - * "Position": 1, - * "IsWizard": false, - * "IsTopMenuLinkActive": true, - * "IsSideMenuLinkActive": true, - * "DefaultValue": null, - * "FieldGroupId": 20, - * "FieldGroupName": "Clothes specifications" - * } - * ``` - * - * ## Response body example - * - * ```json - * 89 + * Creates a specification field in a category. + * >⚠️ This is a legacy endpoint. We recommend using [Create Specification](https://developers.vtex.com/vtex-rest-api/reference/catalog-api-post-specification) instead. + * + * ## Request body example + * + * ```json + * { + * "Name": "Material", + * "CategoryId": 4, + * "FieldId": 88, + * "IsActive": true, + * "IsRequired": true, + * "FieldTypeId": 1, + * "FieldValueId": 1, + * "IsStockKeepingUnit": false, + * "Description": "Composition of the product.", + * "IsFilter": true, + * "IsOnProductDetails": false, + * "Position": 1, + * "IsWizard": false, + * "IsTopMenuLinkActive": true, + * "IsSideMenuLinkActive": true, + * "DefaultValue": null, + * "FieldGroupId": 20, + * "FieldGroupName": "Clothes specifications" + * } + * ``` + * + * ## Response body example + * + * ```json + * 89 * ``` */ "POST /api/catalog_system/pvt/specification/field": { @@ -6920,37 +6918,37 @@ body: SpecificationsInsertFieldRequest response: number } /** - * Updates a specification field in a category. - * >⚠️ This is a legacy endpoint. We recommend using [Update Specification](https://developers.vtex.com/vtex-rest-api/reference/catalog-api-put-specification) instead. - * - * ## Request body example - * - * ```json - * { - * "FieldId": 89, - * "Name": "Material", - * "CategoryId": 4, - * "IsActive": true, - * "IsRequired": true, - * "FieldTypeId": 1, - * "Description": "Composition of the product.", - * "IsStockKeepingUnit": false, - * "IsFilter": true, - * "IsOnProductDetails": true, - * "Position": 1, - * "IsWizard": false, - * "IsTopMenuLinkActive": false, - * "IsSideMenuLinkActive": false, - * "DefaultValue": "Cotton", - * "FieldGroupId": 20, - * "FieldGroupName": "Clothes specifications" - * } - * ``` - * - * ## Response body example - * - * ```json - * 89 + * Updates a specification field in a category. + * >⚠️ This is a legacy endpoint. We recommend using [Update Specification](https://developers.vtex.com/vtex-rest-api/reference/catalog-api-put-specification) instead. + * + * ## Request body example + * + * ```json + * { + * "FieldId": 89, + * "Name": "Material", + * "CategoryId": 4, + * "IsActive": true, + * "IsRequired": true, + * "FieldTypeId": 1, + * "Description": "Composition of the product.", + * "IsStockKeepingUnit": false, + * "IsFilter": true, + * "IsOnProductDetails": true, + * "Position": 1, + * "IsWizard": false, + * "IsTopMenuLinkActive": false, + * "IsSideMenuLinkActive": false, + * "DefaultValue": "Cotton", + * "FieldGroupId": 20, + * "FieldGroupName": "Clothes specifications" + * } + * ``` + * + * ## Response body example + * + * ```json + * 89 * ``` */ "PUT /api/catalog_system/pvt/specification/field": { @@ -6961,20 +6959,20 @@ body: SpecificationsInsertFieldUpdateRequest response: number } /** - * Retrieves details from a specification field's value by this value's ID. - * >⚠️ This is a legacy endpoint. We recommend using [Get Specification Value](https://developers.vtex.com/vtex-rest-api/reference/catalog-api-get-specification-value-id) instead. - * - * ## Response body example - * - * ```json - * { - * "FieldValueId": 143, - * "FieldId": 34, - * "Name": "TesteInsert", - * "Text": "Value Description", - * "IsActive": true, - * "Position": 100 - * } + * Retrieves details from a specification field's value by this value's ID. + * >⚠️ This is a legacy endpoint. We recommend using [Get Specification Value](https://developers.vtex.com/vtex-rest-api/reference/catalog-api-get-specification-value-id) instead. + * + * ## Response body example + * + * ```json + * { + * "FieldValueId": 143, + * "FieldId": 34, + * "Name": "TesteInsert", + * "Text": "Value Description", + * "IsActive": true, + * "Position": 100 + * } * ``` */ "GET /api/catalog_system/pvt/specification/fieldValue/:fieldValueId": { @@ -7006,88 +7004,88 @@ Position?: number } } /** - * Gets a list of all specification values from a Specification Field by this field's ID. - * - * ## Response body example - * - * ```json - * [ - * { - * "FieldValueId": 52, - * "Value": "0 a 6 meses", - * "IsActive": true, - * "Position": 1 - * }, - * { - * "FieldValueId": 53, - * "Value": "1 a 2 anos", - * "IsActive": true, - * "Position": 4 - * }, - * { - * "FieldValueId": 54, - * "Value": "3 a 4 anos", - * "IsActive": true, - * "Position": 3 - * }, - * { - * "FieldValueId": 55, - * "Value": "5 a 6 anos", - * "IsActive": true, - * "Position": 2 - * }, - * { - * "FieldValueId": 56, - * "Value": "7 a 8 anos", - * "IsActive": true, - * "Position": 5 - * }, - * { - * "FieldValueId": 57, - * "Value": "9 a 10 anos", - * "IsActive": true, - * "Position": 6 - * }, - * { - * "FieldValueId": 58, - * "Value": "Acima de 10 anos", - * "IsActive": true, - * "Position": 7 - * } - * ] + * Gets a list of all specification values from a Specification Field by this field's ID. + * + * ## Response body example + * + * ```json + * [ + * { + * "FieldValueId": 52, + * "Value": "0 a 6 meses", + * "IsActive": true, + * "Position": 1 + * }, + * { + * "FieldValueId": 53, + * "Value": "1 a 2 anos", + * "IsActive": true, + * "Position": 4 + * }, + * { + * "FieldValueId": 54, + * "Value": "3 a 4 anos", + * "IsActive": true, + * "Position": 3 + * }, + * { + * "FieldValueId": 55, + * "Value": "5 a 6 anos", + * "IsActive": true, + * "Position": 2 + * }, + * { + * "FieldValueId": 56, + * "Value": "7 a 8 anos", + * "IsActive": true, + * "Position": 5 + * }, + * { + * "FieldValueId": 57, + * "Value": "9 a 10 anos", + * "IsActive": true, + * "Position": 6 + * }, + * { + * "FieldValueId": 58, + * "Value": "Acima de 10 anos", + * "IsActive": true, + * "Position": 7 + * } + * ] * ``` */ "GET /api/catalog_system/pub/specification/fieldvalue/:fieldId": { response: GetSpecFieldValue[] } /** - * Creates a specification field value by the specification field's ID. - * >⚠️ This is a legacy endpoint. We recommend using [Create Specification Value](https://developers.vtex.com/docs/api-reference/catalog-api#post-/api/catalog/pvt/specificationvalue) instead. - * - * - * ## Request body example - * - * ```json - * { - * "FieldId": 34, - * "Name": "Cotton", - * "Text": "Cotton fibers", - * "IsActive": true, - * "Position": 100 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "FieldValueId": 143, - * "FieldId": 34, - * "Name": "Cotton", - * "Text": "Cotton fibers", - * "IsActive": true, - * "Position": 100 - * } + * Creates a specification field value by the specification field's ID. + * >⚠️ This is a legacy endpoint. We recommend using [Create Specification Value](https://developers.vtex.com/docs/api-reference/catalog-api#post-/api/catalog/pvt/specificationvalue) instead. + * + * + * ## Request body example + * + * ```json + * { + * "FieldId": 34, + * "Name": "Cotton", + * "Text": "Cotton fibers", + * "IsActive": true, + * "Position": 100 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "FieldValueId": 143, + * "FieldId": 34, + * "Name": "Cotton", + * "Text": "Cotton fibers", + * "IsActive": true, + * "Position": 100 + * } * ``` */ "POST /api/catalog_system/pvt/specification/fieldValue": { @@ -7120,27 +7118,27 @@ Position?: number } } /** - * Updates a specification field value by the specification field's ID. - * >⚠️ This is a legacy endpoint. We recommend using [Update Specification Field Value](https://developers.vtex.com/vtex-rest-api/reference/catalog-api-put-specification-value-id) instead. - * - * - * ## Request body example - * - * ```json - * { - * "FieldId": 1, - * "FieldValueId": 143, - * "Name": "Cotton", - * "Text": "Cotton fibers", - * "IsActive": true, - * "Position": 100 - * } - * ``` - * - * ## Response body example (200 OK) - * - * ```json - * "Field Value Updated" + * Updates a specification field value by the specification field's ID. + * >⚠️ This is a legacy endpoint. We recommend using [Update Specification Field Value](https://developers.vtex.com/vtex-rest-api/reference/catalog-api-put-specification-value-id) instead. + * + * + * ## Request body example + * + * ```json + * { + * "FieldId": 1, + * "FieldValueId": 143, + * "Name": "Cotton", + * "Text": "Cotton fibers", + * "IsActive": true, + * "Position": 100 + * } + * ``` + * + * ## Response body example (200 OK) + * + * ```json + * "Field Value Updated" * ``` */ "PUT /api/catalog_system/pvt/specification/fieldValue": { @@ -7151,18 +7149,18 @@ body: SpecificationsUpdateFieldValueRequest response: string } /** - * Retrieves general information about a Specification Value. - * ## Response body example - * - * ```json - * { - * "FieldValueId": 143, - * "FieldId": 34, - * "Name": "Cotton", - * "Text": "Cotton fibers", - * "IsActive": true, - * "Position": 100 - * } + * Retrieves general information about a Specification Value. + * ## Response body example + * + * ```json + * { + * "FieldValueId": 143, + * "FieldId": 34, + * "Name": "Cotton", + * "Text": "Cotton fibers", + * "IsActive": true, + * "Position": 100 + * } * ``` */ "GET /api/catalog/pvt/specificationvalue/:specificationValueId": { @@ -7194,30 +7192,30 @@ Position?: number } } /** - * Updates a new Specification Value for a Category. - * ## Request body example - * - * ```json - * { - * "FieldId": 193, - * "Name": "Metal", - * "Text": null, - * "IsActive": true, - * "Position": 1 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "FieldValueId": 360, - * "FieldId": 193, - * "Name": "Metal", - * "Text": null, - * "IsActive": true, - * "Position": 1 - * } + * Updates a new Specification Value for a Category. + * ## Request body example + * + * ```json + * { + * "FieldId": 193, + * "Name": "Metal", + * "Text": null, + * "IsActive": true, + * "Position": 1 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "FieldValueId": 360, + * "FieldId": 193, + * "Name": "Metal", + * "Text": null, + * "IsActive": true, + * "Position": 1 + * } * ``` */ "PUT /api/catalog/pvt/specificationvalue/:specificationValueId": { @@ -7273,29 +7271,29 @@ Position?: number } } /** - * Creates a new Specification Value for a Category. - * ## Request body example - * - * ```json - * { - * "FieldId": 193, - * "Name": "Metal", - * "IsActive": true, - * "Position": 1 - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "FieldValueId": 360, - * "FieldId": 193, - * "Name": "Metal", - * "Text": null, - * "IsActive": true, - * "Position": 1 - * } + * Creates a new Specification Value for a Category. + * ## Request body example + * + * ```json + * { + * "FieldId": 193, + * "Name": "Metal", + * "IsActive": true, + * "Position": 1 + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "FieldValueId": 360, + * "FieldId": 193, + * "Name": "Metal", + * "Text": null, + * "IsActive": true, + * "Position": 1 + * } * ``` */ "POST /api/catalog/pvt/specificationvalue": { @@ -7351,66 +7349,66 @@ Position?: number } } /** - * Retrieves a list of specification groups by the category ID. - * ## Response body example - * - * ```json - * [ - * { - * "CategoryId": 1, - * "Id": 5, - * "Name": "Materials", - * "Position": 2 - * }, - * { - * "CategoryId": 1, - * "Id": 6, - * "Name": "Sizes", - * "Position": 3 - * } - * ] + * Retrieves a list of specification groups by the category ID. + * ## Response body example + * + * ```json + * [ + * { + * "CategoryId": 1, + * "Id": 5, + * "Name": "Materials", + * "Position": 2 + * }, + * { + * "CategoryId": 1, + * "Id": 6, + * "Name": "Sizes", + * "Position": 3 + * } + * ] * ``` */ "GET /api/catalog_system/pvt/specification/groupbycategory/:categoryId": { response: SpecificationsGroup[] } /** - * Retrieves details from a specification group by the ID of the group. - * ## Response body example - * - * ```json - * { - * "CategoryId": 1, - * "Id": 6, - * "Name": "Sizes", - * "Position": 3 - * } + * Retrieves details from a specification group by the ID of the group. + * ## Response body example + * + * ```json + * { + * "CategoryId": 1, + * "Id": 6, + * "Name": "Sizes", + * "Position": 3 + * } * ``` */ "GET /api/catalog_system/pub/specification/groupGet/:groupId": { response: SpecificationsGroup } /** - * Create a specification group. - * >⚠️ It is also possible to create a Specification Group by using an alternative legacy route: `/api/catalog_system/pvt/specification/group`. - * ## Request body example - * - * ```json - * { - * "CategoryId": 1, - * "Name": "Sizes" - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 6, - * "CategoryId": 1, - * "Name": "Sizes", - * "Position": 3 - * } + * Create a specification group. + * >⚠️ It is also possible to create a Specification Group by using an alternative legacy route: `/api/catalog_system/pvt/specification/group`. + * ## Request body example + * + * ```json + * { + * "CategoryId": 1, + * "Name": "Sizes" + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 6, + * "CategoryId": 1, + * "Name": "Sizes", + * "Position": 3 + * } * ``` */ "POST /api/catalog/pvt/specificationgroup": { @@ -7429,25 +7427,25 @@ CategoryId?: number */ Name?: string /** - * Store Framework - Deprecated. + * Store Framework - Deprecated. * Legacy CMS Portal - Specification Group Position. */ Position?: number } } /** - * Update a specification group. - * >⚠️ It is also possible to update a Specification Group by using an alternative legacy route: `/api/catalog_system/pvt/specification/group`. - * - * ## Request and response body example - * - * ```json - * { - * "CategoryId": 1, - * "Id": 17, - * "Name": "NewGroupName", - * "Position": 1 - * } + * Update a specification group. + * >⚠️ It is also possible to update a Specification Group by using an alternative legacy route: `/api/catalog_system/pvt/specification/group`. + * + * ## Request and response body example + * + * ```json + * { + * "CategoryId": 1, + * "Id": 17, + * "Name": "NewGroupName", + * "Position": 1 + * } * ``` */ "PUT /api/catalog/pvt/specificationgroup/:groupId": { @@ -7489,16 +7487,16 @@ Position?: number } } /** - * Retrieves general information about unmapped Specifications of a Seller's SKU in a Marketplace. - * ## Response body example - * - * ```json - * { - * "Id": 1010, - * "SkuId": 310119072, - * "SpecificationName": "size", - * "SpecificationValue": "Small" - * } + * Retrieves general information about unmapped Specifications of a Seller's SKU in a Marketplace. + * ## Response body example + * + * ```json + * { + * "Id": 1010, + * "SkuId": 310119072, + * "SpecificationName": "size", + * "SpecificationValue": "Small" + * } * ``` */ "GET /api/catalog/pvt/specification/nonstructured/:id": { @@ -7528,18 +7526,18 @@ SpecificationValue?: string } /** - * Gets general information about unmapped Specifications of a Seller's SKU in a Marketplace by SKU ID. - * ## Response body example - * - * ```json - * [ - * { - * "Id": 1010, - * "SkuId": 310119072, - * "SpecificationName": "size", - * "SpecificationValue": "Small" - * } - * ] + * Gets general information about unmapped Specifications of a Seller's SKU in a Marketplace by SKU ID. + * ## Response body example + * + * ```json + * [ + * { + * "Id": 1010, + * "SkuId": 310119072, + * "SpecificationName": "size", + * "SpecificationValue": "Small" + * } + * ] * ``` */ "GET /api/catalog/pvt/specification/nonstructured": { @@ -7580,35 +7578,35 @@ skuId: number } } /** - * Retrieves a list with details about the store's sales channels. - * ## Response body example - * - * ```json - * [ - * { - * "Id": 1, - * "Name": "Loja Principal", - * "IsActive": true, - * "ProductClusterId": null, - * "CountryCode": "BRA", - * "CultureInfo": "pt-BR", - * "TimeZone": "E. South America Standard Time", - * "CurrencyCode": "BRL", - * "CurrencySymbol": "R$", - * "CurrencyLocale": 1046, - * "CurrencyFormatInfo": { - * "CurrencyDecimalDigits": 1, - * "CurrencyDecimalSeparator": ",", - * "CurrencyGroupSeparator": ".", - * "CurrencyGroupSize": 3, - * "StartsWithCurrencySymbol": true - * }, - * "Origin": null, - * "Position": 2, - * "ConditionRule": null, - * "CurrencyDecimalDigits": 1 - * } - * ] + * Retrieves a list with details about the store's sales channels. + * ## Response body example + * + * ```json + * [ + * { + * "Id": 1, + * "Name": "Loja Principal", + * "IsActive": true, + * "ProductClusterId": null, + * "CountryCode": "BRA", + * "CultureInfo": "pt-BR", + * "TimeZone": "E. South America Standard Time", + * "CurrencyCode": "BRL", + * "CurrencySymbol": "R$", + * "CurrencyLocale": 1046, + * "CurrencyFormatInfo": { + * "CurrencyDecimalDigits": 1, + * "CurrencyDecimalSeparator": ",", + * "CurrencyGroupSeparator": ".", + * "CurrencyGroupSize": 3, + * "StartsWithCurrencySymbol": true + * }, + * "Origin": null, + * "Position": 2, + * "ConditionRule": null, + * "CurrencyDecimalDigits": 1 + * } + * ] * ``` */ "GET /api/catalog_system/pvt/saleschannel/list": { @@ -7697,34 +7695,34 @@ CurrencyDecimalDigits?: number }[] } /** - * Retrieves a specific sales channel by its ID. - * - * ## Response body example - * - * ```json - * { - * "Id": 1, - * "Name": "Loja Principal", - * "IsActive": true, - * "ProductClusterId": null, - * "CountryCode": "BRA", - * "CultureInfo": "pt-BR", - * "TimeZone": "E. South America Standard Time", - * "CurrencyCode": "BRL", - * "CurrencySymbol": "R$", - * "CurrencyLocale": 1046, - * "CurrencyFormatInfo": { - * "CurrencyDecimalDigits": 1, - * "CurrencyDecimalSeparator": ",", - * "CurrencyGroupSeparator": ".", - * "CurrencyGroupSize": 3, - * "StartsWithCurrencySymbol": true - * }, - * "Origin": null, - * "Position": 2, - * "ConditionRule": null, - * "CurrencyDecimalDigits": 1 - * } + * Retrieves a specific sales channel by its ID. + * + * ## Response body example + * + * ```json + * { + * "Id": 1, + * "Name": "Loja Principal", + * "IsActive": true, + * "ProductClusterId": null, + * "CountryCode": "BRA", + * "CultureInfo": "pt-BR", + * "TimeZone": "E. South America Standard Time", + * "CurrencyCode": "BRL", + * "CurrencySymbol": "R$", + * "CurrencyLocale": 1046, + * "CurrencyFormatInfo": { + * "CurrencyDecimalDigits": 1, + * "CurrencyDecimalSeparator": ",", + * "CurrencyGroupSeparator": ".", + * "CurrencyGroupSize": 3, + * "StartsWithCurrencySymbol": true + * }, + * "Origin": null, + * "Position": 2, + * "ConditionRule": null, + * "CurrencyDecimalDigits": 1 + * } * ``` */ "GET /api/catalog_system/pub/saleschannel/:salesChannelId": { @@ -8370,38 +8368,38 @@ TrustPolicy?: string } } /** - * Creates a new Supplier. - * ## Request body example - * - * ```json - * { - * "Name": "Supplier", - * "CorporateName": "TopStore", - * "StateInscription": "", - * "Cnpj": "33304981001272", - * "Phone": "3333333333", - * "CellPhone": "4444444444", - * "CorportePhone": "5555555555", - * "Email": "email@email.com", - * "IsActive": true - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 1, - * "Name": "Supplier", - * "CorporateName": "TopStore", - * "StateInscription": "", - * "Cnpj": "33304981001272", - * "Phone": "3333333333", - * "CellPhone": "4444444444", - * "CorportePhone": "5555555555", - * "Email": "email@email.com", - * "IsActive": true - * } + * Creates a new Supplier. + * ## Request body example + * + * ```json + * { + * "Name": "Supplier", + * "CorporateName": "TopStore", + * "StateInscription": "", + * "Cnpj": "33304981001272", + * "Phone": "3333333333", + * "CellPhone": "4444444444", + * "CorportePhone": "5555555555", + * "Email": "email@email.com", + * "IsActive": true + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 1, + * "Name": "Supplier", + * "CorporateName": "TopStore", + * "StateInscription": "", + * "Cnpj": "33304981001272", + * "Phone": "3333333333", + * "CellPhone": "4444444444", + * "CorportePhone": "5555555555", + * "Email": "email@email.com", + * "IsActive": true + * } * ``` */ "POST /api/catalog/pvt/supplier": { @@ -8409,38 +8407,38 @@ body: SupplierRequest response: SupplierResponse } /** - * Updates general information of an existing Supplier. - * ## Request body example - * - * ```json - * { - * "Name": "Supplier", - * "CorporateName": "TopStore", - * "StateInscription": "", - * "Cnpj": "33304981001272", - * "Phone": "3333333333", - * "CellPhone": "4444444444", - * "CorportePhone": "5555555555", - * "Email": "email@email.com", - * "IsActive": true - * } - * ``` - * - * ## Response body example - * - * ```json - * { - * "Id": 1, - * "Name": "Supplier", - * "CorporateName": "TopStore", - * "StateInscription": "", - * "Cnpj": "33304981001272", - * "Phone": "3333333333", - * "CellPhone": "4444444444", - * "CorportePhone": "5555555555", - * "Email": "email@email.com", - * "IsActive": true - * } + * Updates general information of an existing Supplier. + * ## Request body example + * + * ```json + * { + * "Name": "Supplier", + * "CorporateName": "TopStore", + * "StateInscription": "", + * "Cnpj": "33304981001272", + * "Phone": "3333333333", + * "CellPhone": "4444444444", + * "CorportePhone": "5555555555", + * "Email": "email@email.com", + * "IsActive": true + * } + * ``` + * + * ## Response body example + * + * ```json + * { + * "Id": 1, + * "Name": "Supplier", + * "CorporateName": "TopStore", + * "StateInscription": "", + * "Cnpj": "33304981001272", + * "Phone": "3333333333", + * "CellPhone": "4444444444", + * "CorportePhone": "5555555555", + * "Email": "email@email.com", + * "IsActive": true + * } * ``` */ "PUT /api/catalog/pvt/supplier/:supplierId": { @@ -8454,28 +8452,28 @@ response: SupplierResponse } /** - * Retrieves a list of Trade Policies associated to a Product based on the Product's ID. - * ## Response body example - * - * ```json - * [ - * { - * "ProductId": 1, - * "StoreId": 1 - * }, - * { - * "ProductId": 1, - * "StoreId": 2 - * }, - * { - * "ProductId": 1, - * "StoreId": 3 - * }, - * { - * "ProductId": 1, - * "StoreId": 4 - * } - * ] + * Retrieves a list of Trade Policies associated to a Product based on the Product's ID. + * ## Response body example + * + * ```json + * [ + * { + * "ProductId": 1, + * "StoreId": 1 + * }, + * { + * "ProductId": 1, + * "StoreId": 2 + * }, + * { + * "ProductId": 1, + * "StoreId": 3 + * }, + * { + * "ProductId": 1, + * "StoreId": 4 + * } + * ] * ``` */ "GET /api/catalog/pvt/product/:productId/salespolicy": { @@ -8503,34 +8501,34 @@ StoreId?: number } /** - * Retrieves a list of SKU IDs of a Trade Policy. - * ## Response body example - * - * ```json - * [ - * 405380, - * 405381, - * 405382, - * 405383, - * 405384, - * 405385, - * 405386, - * 405387, - * 405388, - * 405389, - * 405390, - * 405391, - * 405392, - * 405393, - * 405394, - * 405395, - * 405396, - * 405397, - * 405398, - * 405399, - * 405400, - * 405556 - * ] + * Retrieves a list of SKU IDs of a Trade Policy. + * ## Response body example + * + * ```json + * [ + * 405380, + * 405381, + * 405382, + * 405383, + * 405384, + * 405385, + * 405386, + * 405387, + * 405388, + * 405389, + * 405390, + * 405391, + * 405392, + * 405393, + * 405394, + * 405395, + * 405396, + * 405397, + * 405398, + * 405399, + * 405400, + * 405556 + * ] * ``` */ "GET /api/catalog_system/pvt/sku/stockkeepingunitidsbysaleschannel": { @@ -8558,55 +8556,55 @@ onlyAssigned?: boolean response: number[] } /** - * Retrieve details of a Product's Indexed Information in XML format. - * ## Response body example - * - * ```xml - * " - * \n - * \n - * - * true - * 0 - * 2 - * - * * - * - * instanceId:394dbdc8-b1f4-4dea-adfa-1ec104f3bfe1 - * productId:1 - * - * - * - * - * - * - * - * - * - * \n - * \n" + * Retrieve details of a Product's Indexed Information in XML format. + * ## Response body example + * + * ```xml + * " + * \n + * \n + * + * true + * 0 + * 2 + * + * * + * + * instanceId:394dbdc8-b1f4-4dea-adfa-1ec104f3bfe1 + * productId:1 + * + * + * + * + * + * + * + * + * + * \n + * \n" * ``` */ "GET /api/catalog_system/pvt/products/GetIndexedInfo/:productId": { } /** - * Lists all commercial conditions on the store. - * ## Response body example - * - * ```json - * [ - * { - * "Id": 1, - * "Name": "Padrão", - * "IsDefault": true - * }, - * { - * "Id": 2, - * "Name": "Teste Fast", - * "IsDefault": false - * } - * ] + * Lists all commercial conditions on the store. + * ## Response body example + * + * ```json + * [ + * { + * "Id": 1, + * "Name": "Padrão", + * "IsDefault": true + * }, + * { + * "Id": 2, + * "Name": "Teste Fast", + * "IsDefault": false + * } + * ] * ``` */ "GET /api/catalog_system/pvt/commercialcondition/list": { @@ -8626,15 +8624,15 @@ IsDefault?: boolean }[] } /** - * Retrieves information of a commercial condition by its ID. - * ## Response body example - * - * ```json - * { - * "Id": 1, - * "Name": "Padrão", - * "IsDefault": true - * } + * Retrieves information of a commercial condition by its ID. + * ## Response body example + * + * ```json + * { + * "Id": 1, + * "Name": "Padrão", + * "IsDefault": true + * } * ``` */ "GET /api/catalog_system/pvt/commercialcondition/:commercialConditionId": { @@ -8828,23 +8826,22 @@ fileUrl?: (null | string) } } /** - * This endpoint is used to simulate a cart in VTEX Checkout. - * - * It receives an **SKU ID**, the **quantity** of items in the cart and the ID of the **Seller**. - * - * It sends back all information about the cart, such as the selling price of each item, rates and benefits data, payment and logistics info. - * - * This is useful whenever you need to know the availability of fulfilling an order for a specific cart setting, since the API response will let you know the updated price, inventory and shipping data. - * + * This endpoint is used to simulate a cart in VTEX Checkout. + * + * It receives an **SKU ID**, the **quantity** of items in the cart and the ID of the **Seller**. + * + * It sends back all information about the cart, such as the selling price of each item, rates and benefits data, payment and logistics info. + * + * This is useful whenever you need to know the availability of fulfilling an order for a specific cart setting, since the API response will let you know the updated price, inventory and shipping data. + * * **Important**: The fields (`sku id`, `quantity`, `seller`, `country`, `postalCode` and `geoCoordinates`) are just examples of content that you can simulate in your cart. You can add more fields to the request as per your need. Access the [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) guide to check the available fields. */ "POST /api/checkout/pub/orderForms/simulation": { searchParams: { /** * This parameter defines which promotions apply to the simulation. Use `0` for simulations at cart stage, which means all promotions apply. In case of window simulation use `1`, which indicates promotions that apply nominal discounts over the total purchase value shouldn't be considered on the simulation. - * - * -Note that if this not sent, the parameter is `1`. + * + * Note that if this not sent, the parameter is `1`. */ RnbBehavior?: number /** @@ -9588,14 +9585,13 @@ assemblyOptions?: any[] } } /** - * You can use this request to get your current shopping cart information (`orderFormId`) or to create a new cart. - * - * **Important**: To create a new empty shopping cart you need to send this request with the query param `forceNewCart=true`. - * + * You can use this request to get your current shopping cart information (`orderFormId`) or to create a new cart. + * + * **Important**: To create a new empty shopping cart you need to send this request with the query param `forceNewCart=true`. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` obtained in response is the identification code of the newly created cart. - * - * -> This request has a time out of 45 seconds. + * + * > This request has a time out of 45 seconds. */ "GET /api/checkout/pub/orderForm": { searchParams: { @@ -9606,12 +9602,11 @@ forceNewCart?: boolean } } /** - * Use this request to get all information associated to a given shopping cart. - * + * Use this request to get all information associated to a given shopping cart. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * - * -> This request has a time out of 45 seconds. + * + * > This request has a time out of 45 seconds. */ "GET /api/checkout/pub/orderForm/:orderFormId": { searchParams: { @@ -9622,12 +9617,12 @@ refreshOutdatedData?: boolean } } /** - * This request removes all items from a given cart, leaving it empty. - * - * You must send an empty JSON in the body of the request. - * - * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * + * This request removes all items from a given cart, leaving it empty. + * + * You must send an empty JSON in the body of the request. + * + * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. + * * **Important**: **Request Body** must always be sent with empty value "{ }" in this endpoint. */ "POST /api/checkout/pub/orderForm/:orderFormId/items/removeAll": { @@ -9642,10 +9637,10 @@ response: { } } /** - * This call removes all user information, making a cart anonymous while leaving the items. - * - * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure that represents a shopping cart and contains all information about it. Hence, the `orderFormId` is the identification code of a given cart. - * + * This call removes all user information, making a cart anonymous while leaving the items. + * + * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure that represents a shopping cart and contains all information about it. Hence, the `orderFormId` is the identification code of a given cart. + * * This call works by creating a new orderForm, setting a new cookie, and returning a redirect 302 to the cart URL (`/checkout/#/orderform`). */ "GET /checkout/changeToAnonymousUser/:orderFormId": { @@ -9653,26 +9648,22 @@ response: { } /** * You can use this request to: - * - * -1. Change the quantity of one or more items in a specific cart. - * -2. Remove an item from the cart (by sending the `quantity` value = `0` in the request body). - * - * **Important**: To remove all items from the cart at the same time, use the [Remove all items](https://developers.vtex.com/vtex-rest-api/reference/removeallitems) endpoint. - * + * + * 1. Change the quantity of one or more items in a specific cart. + * 2. Remove an item from the cart (by sending the `quantity` value = `0` in the request body). + * + * **Important**: To remove all items from the cart at the same time, use the [Remove all items](https://developers.vtex.com/vtex-rest-api/reference/removeallitems) endpoint. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure that represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * - * -> This request has a time out of 45 seconds. + * + * > This request has a time out of 45 seconds. */ "POST /api/checkout/pub/orderForm/:orderFormId/items/update": { searchParams: { /** * In order to optimize performance, this parameter allows some information to not be updated when there are changes in the minicart. For instance, if a shopper adds another unit of a given SKU to the cart, it may not be necessary to recalculate payment information, which could impact performance. - * - * -This array accepts strings and currently the only possible value is `”paymentData”`. + * + * This array accepts strings and currently the only possible value is `”paymentData”`. */ allowedOutdatedData?: any[] } @@ -9680,7 +9671,7 @@ body: { /** * Avoid split items on cart */ -noSplitItem?: boolean; +noSplitItem?: boolean /** * Array containing the cart items. Each object inside this array corresponds to a different item. */ @@ -10779,20 +10770,18 @@ ascending?: boolean } } /** - * Use this request to add a new item to the shopping cart. - * + * Use this request to add a new item to the shopping cart. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * - * -> This request has a time out of 45 seconds. + * + * > This request has a time out of 45 seconds. */ "POST /api/checkout/pub/orderForm/:orderFormId/items": { searchParams: { /** * In order to optimize performance, this parameter allows some information to not be updated when there are changes in the minicart. For instance, if a shopper adds another unit of a given SKU to the cart, it may not be necessary to recalculate payment information, which could impact performance. - * - * -This array accepts strings and currently the only possible value is `”paymentData”`. + * + * This array accepts strings and currently the only possible value is `”paymentData”`. */ allowedOutdatedData?: any[] } @@ -11908,18 +11897,15 @@ ascending?: boolean } /** * You can use this request to: - * - * -1. Change the quantity or price of one or more items to the shopping cart. - * -2. Add a new item to the shopping cart. - * - * **Important**: To add a new item to the shopping cart, do not send the string `index` in the request body. - * + * + * 1. Change the quantity or price of one or more items to the shopping cart. + * 2. Add a new item to the shopping cart. + * + * **Important**: To add a new item to the shopping cart, do not send the string `index` in the request body. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure that represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * - * -> This request has a time out of 45 seconds. + * + * > This request has a time out of 45 seconds. */ "PATCH /api/checkout/pub/orderForm/:orderFormId/items": { body: { @@ -13056,30 +13042,26 @@ ascending?: boolean } } /** - * This request changes the price of an SKU in a cart. - * + * This request changes the price of an SKU in a cart. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * - * -You need to inform which cart you are referring to, by sending its `orderFormId` and what is the item whose price you want to change, by sending its `itemIndex`. - * - * -You also need to pass the new price value in the body. - * - * -Remember that, to use this endpoint, the feature of *manual price* must be active. To check if it's active, use the [Get orderForm configuration](https://developers.vtex.com/docs/api-reference/checkout-api#get-/api/checkout/pvt/configuration/orderForm) endpoint. To make it active, use the [Update orderForm configuration](https://developers.vtex.com/docs/api-reference/checkout-api#post-/api/checkout/pvt/configuration/orderForm) endpoint, making the `allowManualPrice` field `true`. - * - * -> Whenever you use this request to change the price of an item, all items in that cart with the same SKU are affected by this change. This applies even to items that share the SKU but have been separated into different objects in the `items` array due to customizations or attachments, for example. + * + * You need to inform which cart you are referring to, by sending its `orderFormId` and what is the item whose price you want to change, by sending its `itemIndex`. + * + * You also need to pass the new price value in the body. + * + * Remember that, to use this endpoint, the feature of *manual price* must be active. To check if it's active, use the [Get orderForm configuration](https://developers.vtex.com/docs/api-reference/checkout-api#get-/api/checkout/pvt/configuration/orderForm) endpoint. To make it active, use the [Update orderForm configuration](https://developers.vtex.com/docs/api-reference/checkout-api#post-/api/checkout/pvt/configuration/orderForm) endpoint, making the `allowManualPrice` field `true`. + * + * > Whenever you use this request to change the price of an item, all items in that cart with the same SKU are affected by this change. This applies even to items that share the SKU but have been separated into different objects in the `items` array due to customizations or attachments, for example. */ "PUT /api/checkout/pub/orderForm/:orderFormId/items/:itemIndex/price": { body: PriceChangeRequest } /** - * When a shopper provides an email address at Checkout, the platform tries to retrieve existing profile information for that email and add it to the shopping cart information. Use this request if you want to change this behavior for a given cart, meaning profile information will not be included in the order automattically. - * - * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * + * When a shopper provides an email address at Checkout, the platform tries to retrieve existing profile information for that email and add it to the shopping cart information. Use this request if you want to change this behavior for a given cart, meaning profile information will not be included in the order automattically. + * + * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. + * * Note that this request will only work if you have not sent the `clientProfileData` to the cart yet. Sending it to a cart that already has a `clientProfileData` should return a status `403 Forbidden` error, with an `Access denied` message. */ "PATCH /api/checkout/pub/orderForm/:orderFormId/profile": { @@ -13092,15 +13074,12 @@ ignoreProfileData?: boolean } /** * Retrieve a client's profile information by providing an email address. - * - * -If the response body fields are empty, the following situations may have occurred: - * - * -1. There is no client registered with the email address provided in your store, or; - * -2. Client profile is invalid or incomplete. However, you can use the query parameter `ensureComplete=false` to get incomplete profiles. For more information, see [SmartCheckout - Customer information automatic fill-in](https://help.vtex.com/en/tutorial/smartcheckout-customer-information-automatic-fill-in--2Nuu3xAFzdhIzJIldAdtan). - * + * + * If the response body fields are empty, the following situations may have occurred: + * + * 1. There is no client registered with the email address provided in your store, or; + * 2. Client profile is invalid or incomplete. However, you can use the query parameter `ensureComplete=false` to get incomplete profiles. For more information, see [SmartCheckout - Customer information automatic fill-in](https://help.vtex.com/en/tutorial/smartcheckout-customer-information-automatic-fill-in--2Nuu3xAFzdhIzJIldAdtan). + * * >⚠️ The authentication of this endpoint can change depending on the customer context. If you are consulting information from a customer with a complete profile on the store, the response will return the customer's data masked. You can only access the customer data with an authenticated request. */ "GET /api/checkout/pub/profiles": { @@ -13256,13 +13235,12 @@ isComplete?: boolean } } /** - * Use this request to include client profile information to a given shopping cart. - * + * Use this request to include client profile information to a given shopping cart. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * - * -> This request has a time out of 12 seconds. - * + * + * > This request has a time out of 12 seconds. + * * >⚠️ The authentication of this endpoint can change depending on the customer context. If you are modifying information from a customer with a complete profile on the store, the response will return the customer's data masked. You can only access the customer data with an authenticated request. */ "POST /api/checkout/pub/orderForm/:orderFormId/attachments/clientProfileData": { @@ -13321,15 +13299,14 @@ isCorporate?: boolean } } /** - * Use this request to include shipping information and/or selected delivery option to a given shopping cart. - * - * To add shipping addresses send the `selectedAddresses` array. For delivery option use the `logisticsInfo` array. - * + * Use this request to include shipping information and/or selected delivery option to a given shopping cart. + * + * To add shipping addresses send the `selectedAddresses` array. For delivery option use the `logisticsInfo` array. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * - * -> This request has a time out of 12 seconds. - * + * + * > This request has a time out of 12 seconds. + * * >⚠️ The authentication of this endpoint can change depending on the customer context. If you are modifying information from a customer with a complete profile on the store, the response will return the customer's data masked. You can only access the customer data with an authenticated request. */ "POST /api/checkout/pub/orderForm/:orderFormId/attachments/shippingData": { @@ -14471,12 +14448,11 @@ itemsOrdination?: (null | { } } /** - * Use this request to include client preferences information to a given shopping cart. - * + * Use this request to include client preferences information to a given shopping cart. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * - * -> This request has a time out of 12 seconds. + * + * > This request has a time out of 12 seconds. */ "POST /api/checkout/pub/orderForm/:orderFormId/attachments/clientPreferencesData": { body: { @@ -14492,20 +14468,18 @@ optinNewsLetter?: boolean response: any } /** - * Use this request to include marketing information to a given shopping cart. - * + * Use this request to include marketing information to a given shopping cart. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * - * -> This request has a time out of 12 seconds. + * + * > This request has a time out of 12 seconds. */ "POST /api/checkout/pub/orderForm/:orderFormId/attachments/marketingData": { body: { /** * Sending an existing coupon code in this field will return the corresponding discount in the purchase. Use the [cart simulation](https://developers.vtex.com/vtex-rest-api/reference/orderform#orderformsimulation) request to check which coupons might apply before placing the order. - * - * -To send more than one coupon code to the same cart, use commas. E.g.`"sales25, blackfriday30"`. + * + * To send more than one coupon code to the same cart, use commas. E.g.`"sales25, blackfriday30"`. */ coupon?: string /** @@ -14539,12 +14513,11 @@ utmiCampaign?: string } } /** - * Use this request to include payment information to a given shopping cart. The payment information attachment in the shopping cart does not determine the final order payment method in itself. However, it allows tha platform to update any relevant information that may be impacted by the payment method. - * + * Use this request to include payment information to a given shopping cart. The payment information attachment in the shopping cart does not determine the final order payment method in itself. However, it allows tha platform to update any relevant information that may be impacted by the payment method. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * - * -> This request has a time out of 12 seconds. + * + * > This request has a time out of 12 seconds. */ "POST /api/checkout/pub/orderForm/:orderFormId/attachments/paymentData": { body: { @@ -14592,12 +14565,11 @@ hasDefaultBillingAddress?: boolean } } /** - * This endpoint is used for the merchant to add to the cart any relevant information that is related to the context of a specific order. - * + * This endpoint is used for the merchant to add to the cart any relevant information that is related to the context of a specific order. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * - * -> This request has a time out of 12 seconds. + * + * > This request has a time out of 12 seconds. */ "POST /api/checkout/pub/orderForm/:orderFormId/attachments/merchantContextData": { body: { @@ -14620,13 +14592,11 @@ salesAssociateId?: string } /** * Your account may create `apps`, which contain custom fields, through the [Update orderForm configuration](https://developers.vtex.com/docs/api-reference/checkout-api#post-/api/checkout/pvt/configuration/orderForm) request. The values of these custom fields can then be updated by this request. - * - * -To do that, you need to inform the ID of the app you created with the configuration API (`appId`). - * - * -In the body of the request, for each field created in this app (`appFieldName`) you will inform a value (`appFieldValue`). - * + * + * To do that, you need to inform the ID of the app you created with the configuration API (`appId`). + * + * In the body of the request, for each field created in this app (`appFieldName`) you will inform a value (`appFieldValue`). + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. */ "PUT /api/checkout/pub/orderForm/:orderFormId/customData/:appId": { @@ -14640,13 +14610,11 @@ response: any } /** * Your account may create `apps`, which contain custom fields, through the [Update orderForm configuration](https://developers.vtex.com/docs/api-reference/checkout-api#post-/api/checkout/pvt/configuration/orderForm) request. The value of a specific custom field can then be updated by this request. - * - * -To do that, you need to inform in the URL the ID of the app you created with the configuration API (`appId`). - * - * -In the body of the request, you will inform the new value (`appFieldValue`, passed through the body) of the specific field created in this app (identified by the `appFieldName` parameter, passed through the URL). - * + * + * To do that, you need to inform in the URL the ID of the app you created with the configuration API (`appId`). + * + * In the body of the request, you will inform the new value (`appFieldValue`, passed through the body) of the specific field created in this app (identified by the `appFieldName` parameter, passed through the URL). + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. */ "PUT /api/checkout/pub/orderForm/:orderFormId/customData/:appId/:appFieldName": { @@ -14654,24 +14622,20 @@ body: SetsinglecustomfieldvalueRequest } /** * Your account may create `apps`, which contain custom fields, through the [Update orderForm configuration](https://developers.vtex.com/docs/api-reference/checkout-api#post-/api/checkout/pvt/configuration/orderForm) request. The value of a specific custom field can be removed by this request. - * - * -To do that, you need to inform in the URL the ID of the app you created with the configuration API (`appId`). - * - * -You also need to iform the specific field created in this app (identified by the `appFieldName` parameter, also passed through the URL) whose value you want to remove. + * + * To do that, you need to inform in the URL the ID of the app you created with the configuration API (`appId`). + * + * You also need to iform the specific field created in this app (identified by the `appFieldName` parameter, also passed through the URL) whose value you want to remove. */ "DELETE /api/checkout/pub/orderForm/:orderFormId/customData/:appId/:appFieldName": { } /** * Retrieves the settings that are currently applied to every orderForm in the account. - * - * -These settings are defined by the request [Update orderForm configuration](https://developers.vtex.com/docs/api-reference/checkout-api#post-/api/checkout/pvt/configuration/orderForm). - * - * -Always use this request to retrieve the current configuration before performing an update. By doing so you ensure that you are modifying only the properties you want. + * + * These settings are defined by the request [Update orderForm configuration](https://developers.vtex.com/docs/api-reference/checkout-api#post-/api/checkout/pvt/configuration/orderForm). + * + * Always use this request to retrieve the current configuration before performing an update. By doing so you ensure that you are modifying only the properties you want. */ "GET /api/checkout/pvt/configuration/orderForm": { response: { @@ -14756,15 +14720,11 @@ maxNumberOfWhiteLabelSellers?: (null | number) maskFirstPurchaseData?: (null | boolean) /** * Configures reCAPTCHA validation for the account, defining in which situations the shopper will be prompted to validate a purchase with reCAPTCHA. Learn more about [reCAPTCHA validation for VTEX stores](https://help.vtex.com/en/tutorial/using-recaptcha-at-checkout--18Te3oDd7f4qcjKu9jhNzP) - * - * -Possible values are: - * -- `"never"`: no purchases are validated with reCAPTCHA. - * -- `"always"`: every purchase is validated with reCAPTCHA. - * -- `"vtexCriteria"`: only some purchases are validated with reCAPTCHA in order to minimize friction and improve shopping experience. VTEX's algorithm determines which sessions are trustworthy and which should be validated with reCAPTCHA. This is the recommended option. + * + * Possible values are: + * - `"never"`: no purchases are validated with reCAPTCHA. + * - `"always"`: every purchase is validated with reCAPTCHA. + * - `"vtexCriteria"`: only some purchases are validated with reCAPTCHA in order to minimize friction and improve shopping experience. VTEX's algorithm determines which sessions are trustworthy and which should be validated with reCAPTCHA. This is the recommended option. */ recaptchaValidation?: string /** @@ -14783,41 +14743,37 @@ cartAgeToUseNewCardSeconds?: number } /** * Determines settings that will apply to every orderForm in the account. - * - * -For example, if you create an app using this request, every orderForm of this account will have the custom fields created though it. - * - * ->ℹ️ Always retrieve the current configuration before performing an update to ensure that you are modifying only the properties you want. Otherwise, old values can be overwritten. To retrieve the current configuration, use the request [Get orderForm configuration](https://developers.vtex.com/docs/api-reference/checkout-api#get-/api/checkout/pvt/configuration/orderForm). + * + * For example, if you create an app using this request, every orderForm of this account will have the custom fields created though it. + * + * >ℹ️ Always retrieve the current configuration before performing an update to ensure that you are modifying only the properties you want. Otherwise, old values can be overwritten. To retrieve the current configuration, use the request [Get orderForm configuration](https://developers.vtex.com/docs/api-reference/checkout-api#get-/api/checkout/pvt/configuration/orderForm). */ "POST /api/checkout/pvt/configuration/orderForm": { body: UpdateorderFormconfigurationRequest } /** * Retrieves a marketplace’s window to change seller, that is, the period when it is possible to choose another seller to fulfill a given order after the original seller has canceled it. - * - * -The default period for this window is of 2 days, but it can be configured by the request Update window to change seller. + * + * The default period for this window is of 2 days, but it can be configured by the request Update window to change seller. */ "GET /api/checkout/pvt/configuration/window-to-change-seller": { } /** * Updates a marketplace’s window to change seller, that is, the period when it is possible to choose another seller to fulfill a given order after the original seller has canceled it. - * - * -It is possible to check the current window using the request Get window to change seller. + * + * It is possible to check the current window using the request Get window to change seller. */ "POST /api/checkout/pvt/configuration/window-to-change-seller": { body: WaitingTime } /** - * This request removes all messages from the `messages` field of the orderForm , leaving it empty. - * - * You must send an empty JSON in the body of the request. - * - * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * + * This request removes all messages from the `messages` field of the orderForm , leaving it empty. + * + * You must send an empty JSON in the body of the request. + * + * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. + * * **Important**: **Request Body** must always be sent with empty value "{ }" in this endpoint. */ "POST /api/checkout/pub/orderForm/:orderFormId/messages/clear": { @@ -15907,15 +15863,13 @@ ascending?: boolean } } /** - * Retrieves possible amount of installments and respective values for a given cart with a given payment method. - * + * Retrieves possible amount of installments and respective values for a given cart with a given payment method. + * * The [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) is the data structure which represents a shopping cart and contains all information pertaining to it. Hence, the `orderFormId` is the identification code of a given cart. - * - * -This endpoint can be used to get the installment options for only one payment method at a time. - * - * -This endpoint should be called only after the selected `orderForm` already has a `paymentData`. + * + * This endpoint can be used to get the installment options for only one payment method at a time. + * + * This endpoint should be called only after the selected `orderForm` already has a `paymentData`. */ "GET /api/checkout/pub/orderForm/:orderFormId/installments": { searchParams: { @@ -15927,15 +15881,12 @@ paymentSystem: number } /** * Use this request to add coupons to a given shopping cart. - * - * -To add multiple coupons to the same cart, you need to: - * - * -1. Request the activation of this feature through the [Support VTEX](https://help.vtex.com/support) if this is the first time you perform this action on your store. - * -2. Submit all coupon codes in the same requisition separated by commas. E.g.: {"text": "freeshipping, discount10, holiday30"}. - * + * + * To add multiple coupons to the same cart, you need to: + * + * 1. Request the activation of this feature through the [Support VTEX](https://help.vtex.com/support) if this is the first time you perform this action on your store. + * 2. Submit all coupon codes in the same requisition separated by commas. E.g.: {"text": "freeshipping, discount10, holiday30"}. + * * For more information on multiple coupons, access the [coupons tutorial](https://help.vtex.com/en/tutorial/creating-a-coupon-beta--7lMk3MmhNp2IEccyGApxU). */ "POST /api/checkout/pub/orderForm/:orderFormId/coupons": { @@ -17026,9 +16977,8 @@ ascending?: boolean } /** * Retrieves information on pickup points close to a given location determined by geocoordinates or postal code. - * - * -The pickup points returned are not necessarily all active ones. Make sure to validate the information consumed by integrations. + * + * The pickup points returned are not necessarily all active ones. Make sure to validate the information consumed by integrations. */ "GET /api/checkout/pub/pickup-points": { searchParams: { @@ -17174,8 +17124,8 @@ ClosingTime?: string } } /** - * Retrieves address information for a given postal code and country. - * + * Retrieves address information for a given postal code and country. + * * This request can be used to implement auto complete functionality when a customer needs to fill in an address. */ "GET /api/checkout/pub/postal-code/:countryCode/:postalCode": { @@ -17183,9 +17133,8 @@ ClosingTime?: string } /** * This endpoint places an order from an existing `orderForm` object, meaning an existing cart. - * - * -After the creation of an order with this request, you have five minutes to send payment information and then request payment processing. + * + * After the creation of an order with this request, you have five minutes to send payment information and then request payment processing. */ "POST /api/checkout/pub/orderForm/:orderFormId/transaction": { body: { @@ -17210,8 +17159,8 @@ response: { } } /** - * Places order without having any prior cart information. This means all information on items, client, payment and shipping must be sent in the body. - * + * Places order without having any prior cart information. This means all information on items, client, payment and shipping must be sent in the body. + * * >⚠️ The authentication of this endpoint is required if you are creating an order with an item that has an attachment that creates a Subscription. For more information, access [Subscriptions API](https://developers.vtex.com/docs/api-reference/subscriptions-api-v3). */ "PUT /api/checkout/pub/orders": { @@ -17328,12 +17277,10 @@ isGift?: boolean }[] /** * Customer's profile information. The `email` functions as a customer's ID. - * - * -For customers already in your database, sending only the email address is enough to register the order to the shopper’s existing account. - * - * -> If the shopper exists in you database but is not logged in, sending other profile information along with the email will cause the platform to fail placing the order. This happens because this action is interpreted as an attempt to edit profile data, which is not possible unless the customer is logged in to the store. + * + * For customers already in your database, sending only the email address is enough to register the order to the shopper’s existing account. + * + * > If the shopper exists in you database but is not logged in, sending other profile information along with the email will cause the platform to fail placing the order. This happens because this action is interpreted as an attempt to edit profile data, which is not possible unless the customer is logged in to the store. */ clientProfileData: { /** @@ -17391,9 +17338,8 @@ isCorporate?: boolean shippingData: { /** * Shipping address. - * - * -For customers already in your data base, it is enough to send this object only with an `addressId`, which you may obtain from a [Cart simulation request](https://developers.vtex.com/vtex-rest-api/reference/shopping-cart#cartsimulation), for example. + * + * For customers already in your data base, it is enough to send this object only with an `addressId`, which you may obtain from a [Cart simulation request](https://developers.vtex.com/vtex-rest-api/reference/shopping-cart#cartsimulation), for example. */ address?: { /** @@ -18747,26 +18693,21 @@ salesAssociateId?: string } /** * Order processing callback request, which is made after an order's payment is approved. - * - * -> This request has to be made within five minutes after the [Place order](https://developers.vtex.com/docs/api-reference/checkout-api#put-/api/checkout/pub/orders) or [Place order from existing cart](https://developers.vtex.com/docs/api-reference/checkout-api#post-/api/checkout/pub/orderForm/-orderFormId-/transaction) request has been made, or else, the order will not be processed. + * + * > This request has to be made within five minutes after the [Place order](https://developers.vtex.com/docs/api-reference/checkout-api#put-/api/checkout/pub/orders) or [Place order from existing cart](https://developers.vtex.com/docs/api-reference/checkout-api#post-/api/checkout/pub/orderForm/-orderFormId-/transaction) request has been made, or else, the order will not be processed. */ "POST /api/checkout/pub/gatewayCallback/:orderGroup": { } /** * Retrieves a list of sellers that cater to a specific region or address, according to your setup of our [regionalization feature](https://help.vtex.com/en/tutorial/setting-up-price-and-availability-of-skus-by-region--12ne58BmvYsYuGsimmugoc#). Learn more about [Region v2](https://developers.vtex.com/docs/guides/region-v2-release). - * - * -To access the list of sellers, you must choose one of the following methods: - * - * -1. Send the identification of the list of sellers (`regionId`) as a path parameter through the URL. Or; - * -2. Send the `country` (3-digit ISO code) and at least one of the two values (`postal Code` or `geo Coordinates`) as query parameters through the URL. For this method, it is also allowed to send both values (`postalCode` or `geoCoordinates`) in the same request. - * - * -> The `regionId` and `country` parameters are indicated as required in this documentation. However, only one of them should be sent in the request according to one of the methods mentioned above. + * + * To access the list of sellers, you must choose one of the following methods: + * + * 1. Send the identification of the list of sellers (`regionId`) as a path parameter through the URL. Or; + * 2. Send the `country` (3-digit ISO code) and at least one of the two values (`postal Code` or `geo Coordinates`) as query parameters through the URL. For this method, it is also allowed to send both values (`postalCode` or `geoCoordinates`) in the same request. + * + * > The `regionId` and `country` parameters are indicated as required in this documentation. However, only one of them should be sent in the request according to one of the methods mentioned above. */ "GET /api/checkout/pub/regions/:regionId": { searchParams: { @@ -18808,29 +18749,29 @@ logo?: (null | string) } } /** - * Lists all orders from a given customer, filtering by their email. - * - * > You can only access information from orders created in the last two years, and that same period is valid for customers through [My Account](https://help.vtex.com/en/tutorial/how-my-account-works--2BQ3GiqhqGJTXsWVuio3Xh). - * - * > Note that this request should be made by an [user](https://developers.vtex.com/docs/guides/user-authentication-and-login) or [an appKey / appToken pair](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) that is associated with the [Call center operator](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy#call-center-operator) role. Otherwise, it will return only orders from the same email informed in the `clientEmail` query parameter. - * - * ## Permissions - * - * Any user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint: - * - * | **Product** | **Category** | **Resource** | - * | --------------- | ----------------- | ----------------- | - * | OMS | OMS access | **View order** | - * - * You can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy): - * - * | **Role** | **Resource** | - * | --------------- | ----------------- | - * | Call center operator | View order | - * | OMS - Read only | View order | - * - * >❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm). - * + * Lists all orders from a given customer, filtering by their email. + * + * > You can only access information from orders created in the last two years, and that same period is valid for customers through [My Account](https://help.vtex.com/en/tutorial/how-my-account-works--2BQ3GiqhqGJTXsWVuio3Xh). + * + * > Note that this request should be made by an [user](https://developers.vtex.com/docs/guides/user-authentication-and-login) or [an appKey / appToken pair](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) that is associated with the [Call center operator](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy#call-center-operator) role. Otherwise, it will return only orders from the same email informed in the `clientEmail` query parameter. + * + * ## Permissions + * + * Any user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint: + * + * | **Product** | **Category** | **Resource** | + * | --------------- | ----------------- | ----------------- | + * | OMS | OMS access | **View order** | + * + * You can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy): + * + * | **Role** | **Resource** | + * | --------------- | ----------------- | + * | Call center operator | View order | + * | OMS - Read only | View order | + * + * >❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or application keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using application keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm). + * * To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication). */ "GET /api/oms/user/orders": { @@ -20264,8 +20205,8 @@ Name: string */ Text?: string /** - * Store Framework - Deprecated. - * Legacy CMS Portal - Alternative search terms that will lead to the specific brand. The user can find the desired brand even when misspelling it. Used especially when words are of foreign origin and have a distinct spelling that is transcribed into a generic one, or when small spelling mistakes occur. + * Store Framework - Deprecated. + * Legacy CMS Portal - Alternative search terms that will lead to the specific brand. The user can find the desired brand even when misspelling it. Used especially when words are of foreign origin and have a distinct spelling that is transcribed into a generic one, or when small spelling mistakes occur. * */ Keywords?: string @@ -20284,14 +20225,14 @@ AdWordsRemarketingCode?: string */ LomadeeCampaignCode?: string /** - * Store Framework - Deprecated - * Legacy CMS Portal - Value used to set the priority on the search result page. + * Store Framework - Deprecated + * Legacy CMS Portal - Value used to set the priority on the search result page. * */ Score?: number /** - * Store Framework - Deprecated. - * Legacy CMS Portal - Defines if the Brand appears in the Department Menu control (``). + * Store Framework - Deprecated. + * Legacy CMS Portal - Defines if the Brand appears in the Department Menu control (``). * */ MenuHome?: boolean @@ -20408,14 +20349,14 @@ Description: string */ IsStockKeepingUnit: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To allow the specification to be used as a facet (filter) on the search navigation bar. + * Store Framework - Deprecated. + * Legacy CMS Portal - To allow the specification to be used as a facet (filter) on the search navigation bar. * */ IsFilter: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal -If specification is visible on the product page. + * Store Framework - Deprecated. + * Legacy CMS Portal -If specification is visible on the product page. * */ IsOnProductDetails: boolean @@ -20429,14 +20370,14 @@ Position: number */ IsWizard: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To make the specification visible in the store's upper menu. + * Store Framework - Deprecated. + * Legacy CMS Portal - To make the specification visible in the store's upper menu. * */ IsTopMenuLinkActive: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To make the specification field clickable in the search navigation bar. + * Store Framework - Deprecated. + * Legacy CMS Portal - To make the specification field clickable in the search navigation bar. * */ IsSideMenuLinkActive: boolean @@ -20491,14 +20432,14 @@ Description: string */ IsStockKeepingUnit: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To allow the specification to be used as a facet (filter) on the search navigation bar. + * Store Framework - Deprecated. + * Legacy CMS Portal - To allow the specification to be used as a facet (filter) on the search navigation bar. * */ IsFilter: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal -If specification is visible on the product page. + * Store Framework - Deprecated. + * Legacy CMS Portal -If specification is visible on the product page. * */ IsOnProductDetails: boolean @@ -20512,14 +20453,14 @@ Position: number */ IsWizard: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To make the specification visible in the store's upper menu. + * Store Framework - Deprecated. + * Legacy CMS Portal - To make the specification visible in the store's upper menu. * */ IsTopMenuLinkActive: boolean /** - * Store Framework - Deprecated. - * Legacy CMS Portal - To make the specification field clickable in the search navigation bar. + * Store Framework - Deprecated. + * Legacy CMS Portal - To make the specification field clickable in the search navigation bar. * */ IsSideMenuLinkActive: boolean @@ -20988,15 +20929,11 @@ maxNumberOfWhiteLabelSellers?: number maskFirstPurchaseData?: boolean /** * Configures reCAPTCHA validation for the account, defining in which situations the shopper will be prompted to validate a purchase with reCAPTCHA. Learn more about [reCAPTCHA validation for VTEX stores](https://help.vtex.com/tutorial/recaptcha-no-checkout--18Te3oDd7f4qcjKu9jhNzP) - * - * -Possible values are: - * -- `"never"`: no purchases are validated with reCAPTCHA. - * -- `"always"`: every purchase is validated with reCAPTCHA. - * -- `"vtexCriteria"`: only some purchases are validated with reCAPTCHA in order to minimize friction and improve shopping experience. VTEX’s algorithm determines which sessions are trustworthy and which should be validated with reCAPTCHA. This is the recommended option. + * + * Possible values are: + * - `"never"`: no purchases are validated with reCAPTCHA. + * - `"always"`: every purchase is validated with reCAPTCHA. + * - `"vtexCriteria"`: only some purchases are validated with reCAPTCHA in order to minimize friction and improve shopping experience. VTEX’s algorithm determines which sessions are trustworthy and which should be validated with reCAPTCHA. This is the recommended option. */ recaptchaValidation?: string /** diff --git a/vtex/utils/types.ts b/vtex/utils/types.ts index 0fedd1893..5721144a3 100644 --- a/vtex/utils/types.ts +++ b/vtex/utils/types.ts @@ -62,11 +62,12 @@ export interface ClientProfileData { export interface ClientPreferencesData { locale: string; - optinNewsLetter: null; + optinNewsLetter: boolean; } export interface ItemMetadata { - items: ItemMetadataItem[]; + items?: ItemMetadataItem[]; + Items?: ItemMetadataItemUppercase[]; } export interface ItemMetadataItem { @@ -82,6 +83,19 @@ export interface ItemMetadataItem { assemblyOptions: AssemblyOption[]; } +export interface ItemMetadataItemUppercase { + Id: string; + Seller: string; + Name: string; + SkuName: string; + ProductId: string; + RefId: string; + Ean: null | string; + ImageUrl: string; + DetailUrl: string; + AssemblyOptions: AssemblyOption[]; +} + export interface AssemblyOption { id: Name; name: Name; @@ -259,11 +273,43 @@ export interface Fields { skuName?: string; } +export interface Transaction { + isActive: boolean; + transactionId: string; + merchantName: string; + payments: Payment[]; +} + +export interface Payment { + id: string; + paymentSystem: string; + paymentSystemName: string; + value: number; + installments: number; + referenceValue: number; + cardHolder: string | null; + cardNumber: string | null; + firstDigits: string | null; + lastDigits: string | null; + cvv2: string | null; + expireMonth: string | null; + expireYear: string | null; + url: string; + giftCardId: null; + giftCardName: null; + giftCardCaption: null; + redemptionCode: null; + group: string; + tid: null; + dueDate: Date; +} + export interface PaymentData { updateStatus: string; installmentOptions: InstallmentOption[]; paymentSystems: PaymentSystem[]; payments: unknown[]; + transactions: Transaction[]; giftCards: unknown[]; giftCardMessages: unknown[]; availableAccounts: unknown[]; @@ -364,7 +410,8 @@ export interface ShippingData { export interface Address { addressType: string; - receiverName: null; + addressName: string; + receiverName: string | null; addressId: string; isDisposable: boolean; postalCode: string; @@ -382,8 +429,16 @@ export interface Address { export interface LogisticsInfo { itemIndex: number; selectedSla: SelectedSla | null; + price: number; + listPrice: number; + sellingPrice: number; + deliveryCompany: string; + shippingEstimate: string; + shippingEstimateDate: string; selectedDeliveryChannel: SelectedDeliveryChannel; addressId: string; + pickupPointId: string; + pickupStoreInfo: PickupStoreInfo; slas: Sla[]; shipsTo: string[]; itemId: string; @@ -1282,6 +1337,7 @@ export interface Order { invoiceOutput: string[]; isAllDelivered: boolean; isAnyDelivered: boolean; + itemMetadata: ItemMetadata; items: OrderFormItem[]; lastChange: string; lastMessageUnread: string; @@ -1304,6 +1360,103 @@ export interface Order { workflowInRetry: boolean; } +export interface OrderItem { + orderId: string; + sequence: string; + origin: string; + sellerOrderId: string; + salesChannel: string; + affiliateId: string; + workflowIsInError: boolean; + orderGroup: string; + status: string; + statusDescription: string; + value: number; + allowCancellation: boolean; + allowEdition?: boolean; + authorizedDate: string; + callCenterOperatorData: string; + cancelReason: string; + cancellationData: { + RequestedByUser: boolean; + RequestedBySystem: boolean; + RequestedBySellerNotification: boolean; + RequestedByPaymentNotification: boolean; + Reason: string; + CancellationDate: string; + }; + cancellationRequests?: { + id: string; + reason: string; + cancellationRequestDate: string; + requestedByUser: boolean; + deniedBySeller: boolean; + deniedBySellerReason: string | null; + cancellationRequestDenyDate: string | null; + }[] | null; + changesAttachment: string; + checkedInPickupPointId: string | null; + paymentData: PaymentData; + shippingData: ShippingData; + clientPreferencesData: ClientPreferencesData; + clientProfileData: ClientProfileData; + totals: Total[]; + commercialConditionData?: string | null; + creationDate: string; + // deno-lint-ignore no-explicit-any + customData?: Record | null; + followUpEmail?: string; + giftRegistryData?: GiftRegistry | null; + hostname: string; + invoiceData: string | null; + invoicedDate: string | null; + isCheckedIn: boolean; + isCompleted: boolean; + sellers?: { + id: string; + name: string; + logo: string; + fulfillmentEndpoint: string; + }[]; + itemMetadata: ItemMetadata; + items: OrderFormItem[]; + lastChange: string; + lastMessage: string; + marketingData: OrderFormMarketingData | null; + marketplace: Marketplace; + marketplaceItems: []; + marketplaceOrderId: string; + marketplaceServicesEndpoint: string; + merchantName: string; + openTextField: string | null; +} + +interface Marketplace { + baseURL: string; + // deno-lint-ignore no-explicit-any + isCertified?: any | null; + name: string; +} + +interface OrderFormMarketingData { + utmCampaign?: string; + utmMedium?: string; + utmSource?: string; + utmiCampaign?: string; + utmiPart?: string; + utmipage?: string; + marketingTags?: string | string[]; +} + +interface GiftRegistry { + attachmentId: string; + giftRegistryId: string; + giftRegistryType: string; + giftRegistryTypeName: string; + addressId: string; + description: string; +} + export interface Orders { facets: Facet[]; list: Order[];