openapi: 3.0.3 info: title: Tiendanube / Nuvemshop Categories Product Variants API description: Representative OpenAPI description of the Tiendanube (Nuvemshop) REST API for app partners. All requests are scoped to a single store via the {store_id} path segment, authenticated with an OAuth 2.0 access token sent in the Authentication header, and MUST include a descriptive User-Agent header identifying the app. The Brazil deployment mirrors this API at https://api.nuvemshop.com.br/v1/{store_id}. termsOfService: https://www.tiendanube.com/terminos-de-uso contact: name: Tiendanube Developers url: https://tiendanube.github.io/api-documentation/ version: '1.0' servers: - url: https://api.tiendanube.com/v1/{store_id} description: Tiendanube (Spanish-speaking Latin America) variables: store_id: default: '0' description: Numeric ID of the store the app is operating on. - url: https://api.nuvemshop.com.br/v1/{store_id} description: Nuvemshop (Brazil) variables: store_id: default: '0' description: Numeric ID of the store the app is operating on. security: - AuthenticationToken: [] tags: - name: Product Variants paths: /products/{product_id}/variants: parameters: - name: product_id in: path required: true schema: type: integer get: operationId: listVariants tags: - Product Variants summary: List variants of a product responses: '200': description: A list of variants. content: application/json: schema: type: array items: $ref: '#/components/schemas/Variant' post: operationId: createVariant tags: - Product Variants summary: Create a variant requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/VariantInput' responses: '201': description: Variant created. content: application/json: schema: $ref: '#/components/schemas/Variant' /products/{product_id}/variants/{id}: parameters: - name: product_id in: path required: true schema: type: integer - $ref: '#/components/parameters/Id' get: operationId: getVariant tags: - Product Variants summary: Get a variant responses: '200': description: The variant. content: application/json: schema: $ref: '#/components/schemas/Variant' put: operationId: updateVariant tags: - Product Variants summary: Update a variant requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/VariantInput' responses: '200': description: Variant updated. content: application/json: schema: $ref: '#/components/schemas/Variant' delete: operationId: deleteVariant tags: - Product Variants summary: Delete a variant responses: '200': description: Variant deleted. components: schemas: VariantInput: type: object properties: price: $ref: '#/components/schemas/Money' promotional_price: $ref: '#/components/schemas/Money' stock: type: integer weight: $ref: '#/components/schemas/Money' sku: type: string values: type: array items: $ref: '#/components/schemas/LocalizedString' LocalizedString: type: object description: A map of locale code to translated string, e.g. keys "es" and "pt" mapping to localized values. additionalProperties: type: string Variant: type: object properties: id: type: integer product_id: type: integer price: $ref: '#/components/schemas/Money' promotional_price: $ref: '#/components/schemas/Money' stock_management: type: boolean stock: type: integer nullable: true weight: $ref: '#/components/schemas/Money' width: $ref: '#/components/schemas/Money' height: $ref: '#/components/schemas/Money' depth: $ref: '#/components/schemas/Money' sku: type: string nullable: true barcode: type: string nullable: true values: type: array items: $ref: '#/components/schemas/LocalizedString' Money: type: string description: Decimal amount serialized as a string, e.g. "199.90". parameters: Id: name: id in: path required: true schema: type: integer securitySchemes: AuthenticationToken: type: apiKey in: header name: Authentication description: 'OAuth 2.0 access token obtained via the authorization-code flow, sent as "Authentication: bearer {access_token}". A descriptive User-Agent header is also required on every request.'