Coder Social home page Coder Social logo

vtex / openapi-schemas Goto Github PK

View Code? Open in Web Editor NEW
103.0 102.0 134.0 61.75 MB

OpenAPI 3.0 JSON schemas. Files are automatically synced to the VTEX Developer Portal.

Home Page: https://developers.vtex.com/docs/api-reference

JavaScript 100.00%
openapi-schemas vtex-apis vtex

openapi-schemas's Introduction

openapi-schemas

This documentation comprises VTEX's public APIs as OpenAPI 3.0 JSON schemas. Files are automatically synced with VTEX's Developer Portal API Reference page and can be imported to Postman following these instructions.

Contributing with the documentation

Please check our Contributing Guide for more information about how to contribute with this repository.

Code of Conduct

Please read our Code of Conduct before contributing.

VTEX APIs

  • Antifraud Provider API Swagger Validator
  • Catalog API Seller Portal Swagger Validator
  • Catalog API Swagger Validator
  • Checkout API Swagger Validator
  • Customer Credit API Swagger Validator
  • Data Subject Rights API Swagger Validator
  • GiftCard Hub API Swagger Validator
  • GiftCard API Swagger Validator
  • GiftCard Provider Protocol Swagger Validator
  • Headless CMS API Swagger Validator
  • Intelligent Search API Swagger Validator
  • Intelligent Search Events API - Headless Swagger Validator
  • Legacy CMS Portal API Swagger Validator
  • License Manager API Swagger Validator
  • Logistics API Swagger Validator
  • Marketplace APIs - Sent Offers Swagger Validator
  • Marketplace APIs - Suggestions Swagger Validator
  • Marketplace Protocol - External Marketplace Mapper Swagger Validator
  • Marketplace Protocol - External Marketplace Orders Swagger Validator
  • Marketplace Protocol - External Seller Fulfillment Swagger Validator
  • Marketplace Protocol - External Seller Marketplace Swagger Validator
  • Master Data API - v1 Swagger Validator
  • Master Data API - v2 Swagger Validator
  • Message Center API Swagger Validator
  • Orders API Swagger Validator
  • Orders API (PII compliant) Swagger Validator
  • Payment Provider Protocol Swagger Validator
  • Payments Gateway API Swagger Validator
  • Policies System API Swagger Validator
  • Pricing API Swagger Validator
  • Pricing Hub Swagger Validator
  • Profile System API Swagger Validator
  • Promotions & Taxes API - v2 Swagger Validator
  • Promotions & Taxes API Swagger Validator
  • Reviews and Ratings API Swagger Validator
  • SKU Bindings API Swagger Validator
  • Search API Swagger Validator
  • Session Manager API Swagger Validator
  • Subscriptions API (v3) Swagger Validator
  • VTEX Tracking API Swagger Validator
  • VTEX DO API Swagger Validator
  • VTEX ID API Swagger Validator
  • VTEX Shipping Network API Swagger Validator

Requisites

Before contributing to this repository, read the following requisites.

Servers

OpenAPI describes the full endpoint for accessing the API as {server URL} + {endpoint path} + {path parameters}.

Example: an endpoint with /api/getResults as the path, https://example.com as the URL in the server object and no parameters will send requests to the https://example.com/api/getResults URL.

Example - servers object:

"servers": [
    {
        "url": "https://{accountName}.{environment}.com.br",
        "description": "VTEX server URL.",
        "variables": {
            "accountName": {
                "description": "Name of the VTEX account. Used as part of the URL.",
                "default": "apiexamples"
            },
            "environment": {
                "description": "Environment to use. Used as part of the URL.",
                "enum": [
                    "vtexcommercestable"
                ],
                "default": "vtexcommercestable"
            }
        }
    }
],

The servers key contains an array of objects.

Authentication

Security schemes

Security schemes describe autentication types that are available in the API. You can check the all the available options in the Security Scheme Specification.

They should be added inside the components object.

The security schemes we use are:

"securitySchemes": {
    "appKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-VTEX-API-AppKey",
        "description": "Unique identifier of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys)."
    },
    "appToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-VTEX-API-AppToken",
        "description": "Secret token of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys)."
    },
    "VtexIdclientAutCookie": {
        "type": "apiKey",
        "in": "header",
        "name": "VtexIdclientAutCookie",
        "description": "[User token](https://developers.vtex.com/docs/guides/api-authentication-using-user-tokens), valid for 24 hours."
    }
}

Security requirement

If defined inside the Open API schema, the security object will define the required security schemes for all endpoints. This specifies that requests should have the X-VTEX-API-AppKey and X-VTEX-API-AppToken pair or VtexIdClientAutCookie as part of the request header.

If defined inside an endpoint object, the security object will define the security scheme for that specific endpoint.

The security object we use at VTEX is:

"security": [
        {
            "appKey": [],
            "appToken": []
        },
        {
            "VtexIdclientAutCookie": []
        }
    ]

Adding a new file

After creating a file for a new API reference in this repository, read this step-by-step to publish it on our Developer Portal.

openapi-schemas's People

Contributors

acnmello avatar aliceoq avatar anabaarbosa avatar ancrln avatar brenobarreto avatar brunoamui avatar caetano1 avatar carolinamenezes avatar choque9 avatar fltiago avatar garrucho avatar geisecosta avatar georgebrindeiro avatar gustavofigueredo avatar henriquessb avatar hiagolcm avatar htadashi avatar isabella-veloso avatar isabombonatti avatar julia-rabello avatar julianameyerarruda avatar jumeyermattosarruda avatar karenkrieger avatar leonardoanjos16 avatar lucalves avatar marcellasiqueira avatar mariana-caetano avatar pedroantunescosta avatar ricardoaerobr avatar thalytafabrine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openapi-schemas's Issues

Missing Catalog Seller Portal Get Products List API documentation

Previous version named CatalogV2 had the Get Products List method which returned all the products from the seller account with pagination - old URL https://developers.vtex.com/vtex-rest-api/reference/list

This method allowed for scenarios of quickly indexing the Seller Portal CatalogV2 products for the purpose of mapping the products to the Marketplace CatalogV1 - see project https://github.com/vtex-apps/seller-send-offers and specifically:

Reference: #637

OPENAPI 3.0 Schema errors on multiple arrays found on logistics

Describe the bug
According to the OpenAPI schema 3.0 each type of array needs a sibling with the name "items".
At least in the logistics, this is not the case in some cases. Postman does NOT have a problem with this, but swagger (defining the spec) does!
Screenshot 2023-01-04 at 16 26 28

The specification should more or less look like this, but is forgotten in some of the definitions in the logistics section. i did not cross check the others.

{
  "type": "array",
  "items": {
    "type": "string" | "object"
  }
}

Expected behavior
The specification should be followed and the code should be importable in swagger without any issues..

Screenshots
If applicable, add screenshots to help explain your problem.

Autenticação appkey/token automática na coleção

Pessoal,

Eu não entendi direito o manual. Então não sei se está descrito como resolver.
Mas, estou com dificuldade no postman para por o 'X-VTEX-API-AppKey' e '{{X-VTEX-API-AppToken}}'.
Em todas as coleções, eles não vem preenchidos. Antigamente, vinham direto no header do request quando pvt. Agora eu preciso ficar preenchendo-os em cada request.
Para contornar isso, eu criei as 2 linhas abaixo no "Pré-request Script" de cada coleção. Mas, são muitas coleções.

pm.request.headers.add ({key: 'X-VTEX-API-AppKey', value: '{{X-VTEX-API-AppKey}}'})
pm.request.headers.upsert ({key: 'X-VTEX-API-AppToken', value: '{{X-VTEX-API-AppToken}}'} )

Existe outra forma de configurar 1 única vez o key/token e funcionar para todas as coleções?

SKU Create File não funciona

Estou tentando utilizar o exemplo disponível em https://developers.vtex.com/reference/catalog-api-sku-file#catalog-api-post-sku-file para criar uma nova imagem para um produto mas esse endpoint parece não estar funcionando. Poderiam corrigir ou me dizer o que estou fazendo de errado nesse caso?

Eu já confirmei que minhas credenciais estão OK (consigo fazer um GET nessa mesma API para listar as imagens desse SKU) e tentei fazer tanto através da URL quanto no meu postman recriando passo-a-passo, mas o resultado é sempre o mesmo (400 Bad Request - Parameter is not valid):

Request body:
{ IsMain: false, Label: 'label', Name: 'prod-bottle', Url: 'https://intellihub.s3.us-east-2.amazonaws.com/testobjs/07891150060883.jpg', Text: 'product-bottle' }

Response body:
{ "Message": "Parameter is not valid." }

Response header:
access-control-allow-origin: *
cache-control: no-cache
connection: keep-alive
content-length: 37
content-type: application/json; charset=utf-8
date: Fri, 09 Oct 2020 00:08:40 GMT
expires: -1
pragma: no-cache
server: Microsoft-IIS/10.0
x-aspnet-version: 4.0.30319
x-powered-by: ASP.NET
x-vtex-janus-router-backend-app: ctgapi-vv1.16.42+263

VTEX BUG

Cara eu não to conseguindo duplicar um site por cms vtex 8596144336

catalog api errors on schema

When I validate the schema with openapi tool generator on catalog api, I get these errors:

Errors:
        - attribute
          paths.'/api/catalog-seller-portal/products/{param}={value}'(get).responses.200.content.'application/json'.schema.items
          is missing
        - attribute
          paths.'/api/catalog-seller-portal/products/{productId}'(get).responses.200.content.'application/json'.schema.items
          is missing
        - attribute
          paths.'/api/catalog-seller-portal/products'(post).requestBody.content.'application/json'.schema.items
          is missing
        - attribute
          paths.'/api/catalog-seller-portal/products'(post).responses.200.content.'application/json'.schema.items
          is missing
        - attribute
          paths.'/api/catalog-seller-portal/products/{productId}'(put).requestBody.content.'application/json'.schema.items
          is missing

How to fix that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.