{"openapi":"3.0.1","info":{"title":"Sorter","description":"Provide a sorter management\n <b><h1>Deprecated endpoints:</h1></b><table border=\"1px;\"><tr><th style=\"text-align: center; vertical-align: middle;\"><b><h3>Uri</b></h3></th><th><b>Method</b></th><th><b><h3>Since</h3></b></th><th><b><h3>End of life</h3></b></th></tr></table>","version":"1-apps"},"servers":[{"url":"api.test.bluestonepim.com/sorter"}],"tags":[{"name":"Technical","description":"To get technical information."},{"name":"Catalog","description":"To interact with catalog's attributes/products."},{"name":"Category selection groups","description":"To interact with category selection group."},{"name":"Metadata","description":"To sync metadata to PAPI sync."},{"name":"Product","description":"To interact with product's attributes."},{"name":"Selected attributes","description":"To interact with selected attributes."}],"paths":{"/technical/version":{"get":{"tags":["Technical"],"summary":"Show service version.","operationId":"presentVersion","responses":{"200":{"description":"Show service version."},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]}},"/catalogs/{catalogId}/products":{"get":{"tags":["Catalog"],"summary":"Get sorted products under the catalog.","operationId":"getSortedProducts","parameters":[{"name":"catalogId","in":"path","description":"Catalog id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get catalog products successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogProductListResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Catalog not found"}},"security":[{"oauth2":[]}]},"post":{"tags":["Catalog"],"summary":"Sort products under the catalog.","operationId":"setSortedProducts","parameters":[{"name":"catalogId","in":"path","description":"Catalog id.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"PimProductRequest.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PimProductRequest"}}}},"responses":{"200":{"description":"Create/Update catalog product successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Catalog not found"}},"security":[{"oauth2":[]}]},"delete":{"tags":["Catalog"],"summary":"Delete product sorting under the catalog.","operationId":"deleteProductSorting","parameters":[{"name":"catalogId","in":"path","description":"Catalog id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Delete successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCatalogResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]}},"/catalogs/{catalogId}/sortedProducts":{"get":{"tags":["Catalog"],"summary":"Get sorted products metadata of the given catalog id. (For MAPI)","operationId":"listMetaProductResponse","parameters":[{"name":"catalogId","in":"path","description":"Catalog id.","required":true,"schema":{"pattern":"^[a-fA-F0-9]{24}$","type":"string"}}],"responses":{"200":{"description":"Get catalog metadata products successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMetadataProductResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Catalog metadata product not found"}},"security":[{"oauth2":[]}]}},"/category-selection-groups":{"get":{"tags":["Category selection groups"],"summary":"Get category selection group.","operationId":"getCategorySelectionGroup","responses":{"200":{"description":"Get category selection group successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategorySelectionGroupResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]}},"/products/{productId}/attributes":{"get":{"tags":["Product"],"summary":"Get sorted product attributes.","operationId":"getProductAttributes","parameters":[{"name":"productId","in":"path","description":"Product id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get attribute products successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SortedAttributesResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Product not found"}},"security":[{"oauth2":[]}]},"post":{"tags":["Product"],"summary":"Sort product attributes.","operationId":"sortProductAttributes","parameters":[{"name":"productId","in":"path","description":"Product id.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"PimProductRequest.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductAttributeRequest"}}}},"responses":{"200":{"description":"Create or update product attributes successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductAttributeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Product not found"}},"security":[{"oauth2":[]}]},"delete":{"tags":["Product"],"summary":"Remove product attribute sorting of the given product id.","operationId":"deleteCatalogProduct","parameters":[{"name":"productId","in":"path","description":"Product id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Delete successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProductAttributeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Product not found"}},"security":[{"oauth2":[]}]}},"/selected-attributes":{"put":{"tags":["Selected attributes"],"summary":"Set complete selected attributes.","operationId":"setCompleteListSelectedAttributes","requestBody":{"description":"SelectedAttributeRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectedAttributeRequest"}}}},"responses":{"200":{"description":"Set complete list of selected attributes successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectedAttributeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]},"post":{"tags":["Selected attributes"],"summary":"Upsert selected attributes.","operationId":"upsertSelectedAttributes","requestBody":{"description":"SelectedAttributeRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectedAttributeRequest"}}}},"responses":{"200":{"description":"Upsert selected attributes successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectedAttributeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]},"delete":{"tags":["Selected attributes"],"summary":"Delete selected attributes.","operationId":"deleteSelectedAttributes","requestBody":{"description":"SelectedAttributeRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSelectedAttributeRequest"}}}},"responses":{"200":{"description":"Delete selected attributes successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectedAttributeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]}},"/selected-attributes/list":{"post":{"tags":["Selected attributes"],"summary":"List selected attributes.","operationId":"listSelectedAttributes","requestBody":{"description":"ListSelectedAttributesRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSelectedAttributesRequest"}}}},"responses":{"200":{"description":"List selected attributes successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectedAttributeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]}}},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"status":{"title":"Error status code.","type":"integer","format":"int32"},"error":{"title":"General error description.","type":"string"},"errorDetails":{"title":"List of errors details.","type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}},"requestId":{"title":"Request ID used for logging.","type":"string"},"timestamp":{"title":"Error timestamp.","type":"integer","format":"int64"},"quotaLimitExceededDetails":{"title":"Additional entity id list related to error","type":"array","items":{"$ref":"#/components/schemas/QuotaLimitExceededDetails"}}}},"ErrorDetails":{"type":"object","properties":{"message":{"title":"Error message.","type":"string"},"field":{"title":"Error related field.","type":"string"},"rejectedValue":{"title":"Invalid value causing error.","type":"string"}}},"QuotaLimitExceededDetails":{"type":"object","properties":{"quota":{"title":"Quota name.","type":"string"},"message":{"title":"Quota limit message.","type":"string"},"limit":{"title":"Quota limit.","type":"integer","format":"int32"},"entityId":{"title":"Id of the entity that caused the quota limit to be exceeded.","type":"string","nullable":true},"entityType":{"title":"Type of the entity that caused the quota limit to be exceeded.","type":"string","nullable":true}}},"DeleteCatalogResponse":{"type":"object","properties":{"n":{"title":"Amount of deleted catalog data.","type":"integer","format":"int32"}}},"CatalogProductListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CatalogProductResponse"}}}},"CatalogProductResponse":{"type":"object","properties":{"id":{"title":"Product id.","type":"string"},"name":{"title":"Product name.","type":"string"},"number":{"title":"Product number.","type":"string"}}},"MetadataProductResponse":{"type":"object","properties":{"id":{"title":"Product id.","type":"string"},"type":{"title":"Product type. (Only available for some organizations)","type":"string"}}},"ListMetadataProductResponse":{"type":"object","properties":{"data":{"title":"List of attribute id","type":"array","items":{"$ref":"#/components/schemas/MetadataProductResponse"}}}},"ProductResponse":{"type":"object","properties":{"products":{"title":"List of product id.","type":"array","items":{"title":"List of product id.","type":"string"}}}},"PimProductRequest":{"type":"object","properties":{"products":{"title":"List of product id.","type":"array","items":{"title":"Product id.","type":"string"}}}},"CategorySelectionGroupResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GroupCategory"}},"maxAttributeSize":{"type":"integer","format":"int32"}}},"GroupCategory":{"required":["name","number"],"type":"object","properties":{"name":{"type":"string"},"number":{"type":"string"}}},"DeleteProductAttributeResponse":{"type":"object","properties":{"n":{"title":"Amount of deleted product data.","type":"integer","format":"int32"}}},"AttributeResponse":{"type":"object","properties":{"id":{"type":"string"}}},"SortedAttributesResponse":{"type":"object","properties":{"data":{"title":"List of attribute id","type":"array","items":{"$ref":"#/components/schemas/AttributeResponse"}}}},"ProductAttributeResponse":{"type":"object","properties":{"values":{"title":"List of attribute id.","type":"array","items":{"title":"List of attribute id.","type":"string"}}}},"ProductAttributeRequest":{"type":"object","properties":{"values":{"title":"List of attribute id.","type":"array","items":{"title":"List of attribute id.","type":"string"}}}},"SelectedAttribute":{"type":"object","properties":{"id":{"title":"Attribute id.","type":"string"}}},"SelectedAttributeResponse":{"type":"object","properties":{"data":{"title":"List of selected attributes","type":"array","items":{"$ref":"#/components/schemas/SelectedAttribute"}}}},"DeleteSelectedAttributeRequest":{"required":["entityId","entityType","selectionGroupNumber"],"type":"object","properties":{"entityType":{"title":"Entity type.","type":"string","example":"CATEGORY","enum":["CATEGORY"]},"entityId":{"title":"Entity id.","type":"string"},"selectionGroupNumber":{"title":"Selection group number.","type":"string"},"attributeIds":{"title":"Attribute ids.","maxItems":50,"minItems":1,"uniqueItems":true,"type":"array","items":{"title":"Attribute ids.","type":"string"}}}},"ListSelectedAttributesRequest":{"required":["entityId","entityType","selectionGroupNumber"],"type":"object","properties":{"entityType":{"title":"Entity type.","type":"string","example":"CATEGORY","enum":["CATEGORY"]},"entityId":{"title":"Entity id.","type":"string"},"selectionGroupNumber":{"title":"Selection group number.","type":"string"}}},"SelectedAttributeRequest":{"required":["attributeIds","entityId","entityType","selectionGroupNumber"],"type":"object","properties":{"entityType":{"title":"Entity type.","type":"string","example":"CATEGORY","enum":["CATEGORY"]},"entityId":{"title":"Entity id.","type":"string"},"selectionGroupNumber":{"title":"Selection group number.","type":"string"},"attributeIds":{"title":"Attribute ids.","maxItems":50,"minItems":1,"uniqueItems":true,"type":"array","items":{"title":"Attribute ids.","type":"string"}}}}},"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://idp.test.bluestonepim.com/op/token","scopes":{"openid profile systemRoles permissions organization email name nickname":"All needed scopes."}}}}}},"x-amazon-apigateway-api-key-source":"AUTHORIZER"}