Tiendanube Scripts API

The Scripts API from Tiendanube — 1 operation(s) for scripts.

OpenAPI Specification

tiendanube-scripts-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Tiendanube / Nuvemshop Categories Scripts 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: Scripts
paths:
  /scripts:
    get:
      operationId: listScripts
      tags:
      - Scripts
      summary: List scripts
      responses:
        '200':
          description: A list of scripts.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Script'
    post:
      operationId: createScript
      tags:
      - Scripts
      summary: Create a script
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScriptInput'
      responses:
        '201':
          description: Script created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Script'
components:
  schemas:
    ScriptInput:
      type: object
      required:
      - src
      - event
      - where
      properties:
        src:
          type: string
          format: uri
        event:
          type: string
          enum:
          - onload
        where:
          type: string
          enum:
          - store
          - checkout
          - all
    Script:
      type: object
      properties:
        id:
          type: integer
        src:
          type: string
          format: uri
        event:
          type: string
          enum:
          - onload
        where:
          type: string
          enum:
          - store
          - checkout
          - all
        created_at:
          type: string
          format: date-time
  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.'