@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Catalog API - Seller Portal
@base https://apiexamples.vtexcommercestable.com.br
@auth ApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header
@common_fields {Content-Type: str, Accept: str}
@endpoints 16
@toc api(16)

@endpoint GET /api/catalog-seller-portal/products/{productId}
@required {productId: str}
@returns(200) {id: str, externalId: str, status: str, name: str, brandId: str, description: str, brandName: str, categoryIds: [str], categoryNames: [str], specs: [map], attributes: [map], slug: str, images: [map], skus: [map], transportModal: str?, taxCode: str?, origin: str, createdAt: str, updatedAt: str}

@endpoint PUT /api/catalog-seller-portal/products/{productId}
@required {productId: str, status: str, name: str, brandId: str, categoryIds: [str], specs: [map{name!: str, values!: [str]}], attributes: [map{name!: str, value!: str}], slug: str, images: [map{id!: str, url!: str, alt: str}], skus: [map{id: str, name: str, externalId: str, description: str, ean: str, manufacturerCode: str, isActive!: bool, weight!: int, dimensions!: map, RealWeight: num, RealDimensions: map, specs!: [map], images!: [str]}], origin: str}
@optional {id: str, externalId: str, description: str, transportModal: str, taxCode: str}
@returns(204)

@endpoint GET /api/catalog-seller-portal/products/{productId}/description
@required {productId: str}
@returns(200) {productId: str, createdAt: str, updatedAt: str}

@endpoint PUT /api/catalog-seller-portal/products/{productId}/description
@required {productId: str, productId: str, description: str}
@returns(204)

@endpoint GET /api/catalog-seller-portal/products/{param}
@required {param: str}
@returns(200) {id: str, externalId: str, description: str, status: str, name: str, brandId: str, brandName: str, categoryIds: [str], categoryNames: [str], specs: [map], attributes: [map], slug: str, images: [map], skus: [map], transportModal: str, taxCode: str, origin: str, createdAt: str, updatedAt: str}

@endpoint POST /api/catalog-seller-portal/products
@required {status: str, name: str, brandId: str, categoryIds: [str], specs: [map{name!: str, values!: [str]}], attributes: [map{name!: str, value!: str}], slug: str, images: [map{id!: str, url!: str, alt: str}], skus: [map{name!: str, externalId: str, description: str, ean: str, manufacturerCode: str, isActive!: bool, weight!: int, dimensions!: map, RealWeight: num, RealDimensions: map, specs!: [map], images!: [str]}], origin: str}
@optional {externalId: str, description: str, transportModal: str, taxCode: str}
@returns(200) {id: str, externalId: str, status: str, name: str, brandId: str, brandName: str, description: str, categoryIds: [str], categoryNames: [str], specs: [map], attributes: [map], slug: str, images: [map], skus: [map], origin: str, transportModal: str?, taxCode: str?, createdAt: str, updatedAt: str}
@returns(204)

@endpoint GET /api/catalog-seller-portal/skus/_search
@optional {from: str, to: str, id: int, externalid: int}
@returns(200) {data: [map], _metadata: map{total: int, from: int, to: int}}

@endpoint GET /api/catalog-seller-portal/skus/ids
@optional {from: str, to: str}
@returns(200) {data: [str], _metadata: map{total: int, from: int, to: int}}

@endpoint GET /api/catalog-seller-portal/brands
@optional {q: str, from: str, to: str, orderBy: str, name: str}
@returns(200) {data: [map], _metadata: map{total: int, from: int, to: int, orderBy: str}}

@endpoint POST /api/catalog-seller-portal/brands
@required {name: str, isActive: bool}
@returns(200) {id: str, name: str, isActive: bool, createdAt: str, updatedAt: str}

@endpoint GET /api/catalog-seller-portal/brands/{brandId}
@required {brandId: str}
@returns(200) {id: str, name: str, isActive: bool, createdAt: str, updatedAt: str}

@endpoint PUT /api/catalog-seller-portal/brands/{brandId}
@required {brandId: str, id: str, name: str, isActive: bool}
@returns(204)

@endpoint GET /api/catalog-seller-portal/category-tree
@optional {depth: int}
@returns(200) {roots: [map], createdAt: str, updatedAt: str}

@endpoint PUT /api/catalog-seller-portal/category-tree
@required {roots: [map{value!: map, children!: [map]}]}
@returns(204)

@endpoint GET /api/catalog-seller-portal/category-tree/categories/{categoryId}
@required {categoryId: str}
@returns(200) {value: map{id: str, name: str, isActive: bool}, children: [map]}

@endpoint POST /api/catalog-seller-portal/category-tree/categories
@required {parentId: str, Name: str}
@returns(200) {value: map{id: str, name: str, isActive: bool}, children: [map]}

@end
