Tiendanube Products API

The Products API from Tiendanube — 2 operation(s) for products.

OpenAPI Specification

tiendanube-products-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Tiendanube / Nuvemshop Categories Products 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: Products
paths:
  /products:
    get:
      operationId: listProducts
      tags:
      - Products
      summary: List products
      description: Returns a paginated list of products in the store's catalog.
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PerPage'
      - name: q
        in: query
        description: Full-text search across product names and SKUs.
        schema:
          type: string
      - name: category_id
        in: query
        description: Filter products belonging to a category.
        schema:
          type: integer
      - name: published
        in: query
        schema:
          type: boolean
      - name: updated_at_min
        in: query
        schema:
          type: string
          format: date-time
      responses:
        '200':
          description: A list of products.
          headers:
            x-total-count:
              schema:
                type: integer
              description: Total number of products matching the query.
            Link:
              schema:
                type: string
              description: RFC 5988 pagination links (rel="next", rel="prev").
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Product'
    post:
      operationId: createProduct
      tags:
      - Products
      summary: Create a product
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductInput'
      responses:
        '201':
          description: Product created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
  /products/{id}:
    parameters:
    - $ref: '#/components/parameters/Id'
    get:
      operationId: getProduct
      tags:
      - Products
      summary: Get a product
      responses:
        '200':
          description: The product.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateProduct
      tags:
      - Products
      summary: Update a product
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductInput'
      responses:
        '200':
          description: Product updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
    delete:
      operationId: deleteProduct
      tags:
      - Products
      summary: Delete a product
      responses:
        '200':
          description: Product deleted.
components:
  parameters:
    Page:
      name: page
      in: query
      schema:
        type: integer
        default: 1
    PerPage:
      name: per_page
      in: query
      schema:
        type: integer
        default: 30
        maximum: 200
    Id:
      name: id
      in: path
      required: true
      schema:
        type: integer
  schemas:
    Category:
      type: object
      properties:
        id:
          type: integer
        name:
          $ref: '#/components/schemas/LocalizedString'
        description:
          $ref: '#/components/schemas/LocalizedString'
        handle:
          $ref: '#/components/schemas/LocalizedString'
        parent:
          type: integer
          nullable: true
        subcategories:
          type: array
          items:
            type: integer
        created_at:
          type: string
          format: date-time
    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
    Error:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        description:
          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".
    ProductInput:
      type: object
      required:
      - name
      properties:
        name:
          $ref: '#/components/schemas/LocalizedString'
        description:
          $ref: '#/components/schemas/LocalizedString'
        brand:
          type: string
        published:
          type: boolean
        free_shipping:
          type: boolean
        categories:
          type: array
          items:
            type: integer
        variants:
          type: array
          items:
            $ref: '#/components/schemas/VariantInput'
    ProductImage:
      type: object
      properties:
        id:
          type: integer
        product_id:
          type: integer
        src:
          type: string
          format: uri
        position:
          type: integer
        alt:
          type: array
          items:
            type: string
    Product:
      type: object
      properties:
        id:
          type: integer
        name:
          $ref: '#/components/schemas/LocalizedString'
        description:
          $ref: '#/components/schemas/LocalizedString'
        handle:
          $ref: '#/components/schemas/LocalizedString'
        brand:
          type: string
          nullable: true
        published:
          type: boolean
        free_shipping:
          type: boolean
        categories:
          type: array
          items:
            $ref: '#/components/schemas/Category'
        variants:
          type: array
          items:
            $ref: '#/components/schemas/Variant'
        images:
          type: array
          items:
            $ref: '#/components/schemas/ProductImage'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  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.'