Nuvemshop / Tiendanube Products API

Items for sale in the store.

Documentation

Specifications

Other Resources

OpenAPI Specification

nuvemshop-products-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Nuvemshop / Tiendanube Admin Categories Products API
  description: 'Store-scoped REST Admin API for the Nuvemshop (Tiendanube) e-commerce platform. This document models a grounded, representative subset of the public API - products, product variants, product images, categories, orders, customers, coupons, webhooks, scripts, and store - as documented at https://tiendanube.github.io/api-documentation/.


    Every path is relative to a per-store base that embeds the store id, for example `https://api.tiendanube.com/2025-03/{store_id}`. The Brazilian mirror `https://api.nuvemshop.com.br/2025-03/{store_id}` serves the same API, and the long-standing `v1` path (`https://api.tiendanube.com/v1/{store_id}`) remains available as the legacy equivalent.


    Authentication is OAuth 2 (authorization code grant). The resulting non-expiring access token is sent in a NON-STANDARD header named `Authentication` with a lowercase `bearer` prefix (`Authentication: bearer ACCESS_TOKEN`) - using `Authorization` or a different case returns 401. Every request must also send a descriptive `User-Agent` header identifying the app and a contact (name/email or URL); omitting it returns 400.


    NOTE ON MODELING: endpoint paths, methods, and the auth/header/rate-limit behavior below are grounded in the live documentation. Request and response body schemas are simplified representative models (marked with additionalProperties) rather than the provider''s full field-level schema.'
  version: 2025-03
  contact:
    name: Nuvemshop / Tiendanube Developers
    url: https://tiendanube.github.io/api-documentation/
  license:
    name: MIT (documentation)
    url: https://github.com/TiendaNube
servers:
- url: https://api.tiendanube.com/2025-03/{store_id}
  description: Tiendanube (Spanish-speaking markets)
  variables:
    store_id:
      default: '0'
      description: The numeric store id (user_id) returned during OAuth authorization.
- url: https://api.nuvemshop.com.br/2025-03/{store_id}
  description: Nuvemshop (Brazil)
  variables:
    store_id:
      default: '0'
      description: The numeric store id (user_id) returned during OAuth authorization.
security:
- authenticationHeader: []
tags:
- name: Products
  description: Items for sale in the store.
paths:
  /products:
    get:
      operationId: listProducts
      tags:
      - Products
      summary: List products
      description: Receive a paginated list of all products in the store.
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PerPage'
      - name: q
        in: query
        required: false
        description: Filter products by a free-text search term.
        schema:
          type: string
      - name: fields
        in: query
        required: false
        description: Comma-separated list of fields to return.
        schema:
          type: string
      responses:
        '200':
          description: A list of products.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Product'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
    post:
      operationId: createProduct
      tags:
      - Products
      summary: Create a product
      description: Create a new product in the store.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductInput'
      responses:
        '201':
          description: The created product.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
  /products/{id}:
    parameters:
    - $ref: '#/components/parameters/Id'
    get:
      operationId: getProduct
      tags:
      - Products
      summary: Get a product
      description: Receive a single product by its id.
      responses:
        '200':
          description: The requested product.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateProduct
      tags:
      - Products
      summary: Update a product
      description: Modify an existing product.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductInput'
      responses:
        '200':
          description: The updated product.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
    delete:
      operationId: deleteProduct
      tags:
      - Products
      summary: Delete a product
      description: Remove a product from the store.
      responses:
        '200':
          description: Deletion confirmation (empty object).
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /products/sku/{sku}:
    parameters:
    - name: sku
      in: path
      required: true
      description: The SKU of a product variant.
      schema:
        type: string
    get:
      operationId: getProductBySku
      tags:
      - Products
      summary: Get a product by variant SKU
      description: Receive the product that owns the variant with the given SKU.
      responses:
        '200':
          description: The requested product.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /products/stock-price:
    patch:
      operationId: updateProductsStockPrice
      tags:
      - Products
      summary: Bulk update stock and price
      description: Update stock and/or price for multiple products and variants in one request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
              description: Array of product/variant stock and price update objects.
      responses:
        '200':
          description: Bulk update result.
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      description: The numeric resource id.
      schema:
        type: integer
        format: int64
    PerPage:
      name: per_page
      in: query
      required: false
      description: Results per page (max 200).
      schema:
        type: integer
        default: 30
        maximum: 200
    Page:
      name: page
      in: query
      required: false
      description: Page number for pagination.
      schema:
        type: integer
        default: 1
  schemas:
    Product:
      allOf:
      - type: object
        properties:
          id:
            type: integer
            format: int64
          created_at:
            type: string
            format: date-time
          updated_at:
            type: string
            format: date-time
      - $ref: '#/components/schemas/ProductInput'
    Error:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        description:
          type: string
      additionalProperties: true
    ImageInput:
      type: object
      properties:
        src:
          type: string
          format: uri
          description: Public URL of the image to import.
        attachment:
          type: string
          description: Base64-encoded image data (alternative to src).
        filename:
          type: string
        position:
          type: integer
      additionalProperties: true
    LocalizedString:
      type: object
      description: A map of language code to localized text (e.g. {"es":"...","pt":"..."}).
      additionalProperties:
        type: string
    VariantInput:
      type: object
      properties:
        price:
          type: string
        promotional_price:
          type: string
        stock:
          type: integer
          nullable: true
        stock_management:
          type: boolean
        sku:
          type: string
          nullable: true
        weight:
          type: string
        values:
          type: array
          items:
            $ref: '#/components/schemas/LocalizedString'
      additionalProperties: true
    ProductInput:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/LocalizedString'
        description:
          $ref: '#/components/schemas/LocalizedString'
        handle:
          $ref: '#/components/schemas/LocalizedString'
        published:
          type: boolean
        free_shipping:
          type: boolean
        categories:
          type: array
          items:
            type: integer
        variants:
          type: array
          items:
            $ref: '#/components/schemas/VariantInput'
        images:
          type: array
          items:
            $ref: '#/components/schemas/ImageInput'
      additionalProperties: true
  responses:
    ValidationError:
      description: The request payload failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or malformed `Authentication` header, or invalid token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Too many requests - the per-store leaky bucket overflowed. Inspect the x-rate-limit-limit, x-rate-limit-remaining, and x-rate-limit-reset headers and back off.
      headers:
        x-rate-limit-limit:
          schema:
            type: integer
          description: Total requests the bucket can hold.
        x-rate-limit-remaining:
          schema:
            type: integer
          description: Remaining capacity before the bucket fills.
        x-rate-limit-reset:
          schema:
            type: integer
          description: Milliseconds remaining to completely empty the bucket.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    authenticationHeader:
      type: apiKey
      in: header
      name: Authentication
      description: 'NON-STANDARD auth header. Send the OAuth 2 access token as `Authentication: bearer ACCESS_TOKEN` - the header name must be `Authentication` (not `Authorization`) and the `bearer` prefix must be lowercase, or the API returns 401. A descriptive `User-Agent` header is also required on every request.'