openapi: 3.0.0 servers: - url: 'https://api.qa.se.com/productstocklevelchecker/1.1' description: QA/test environment - url: 'https://api.se.com/productstocklevelchecker/1.1' description: Production server info: title: Product-StockLevelChecker version: '1.1' description: The service providing the stock quantity for a distributor. The data is coming straightly from the ERP without any special SE systems. contact: name: Contact Us email: distributorapiportal.global@se.com url: 'http://se.com' paths: /products/stock-levels: post: responses: '200': description: OK content: application/json: schema: type: object properties: stockLevelDetails: type: array items: $ref: '#/components/schemas/multiple-stock-level-details' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error400' '401': description: 'The client is not authorized to perform this request because its identity has not yet been established, or the token is invalid or has expired.' content: application/json: schema: $ref: '#/components/schemas/error401' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/error404' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/error500' summary: 'Get the current stock quantity for multiple products. Supports Nordic countries (Norway, Sweden, Denmark, Finland)' operationId: multipleProductsStockLevel description: Provides the stock quantity for list of product references. requestBody: content: application/json: schema: type: object properties: productsList: type: array items: $ref: '#/components/schemas/multipleProductsList' examples: {} description: Please specify the product you want to know availability of and the type of product ID you have. tags: - stockLevel '/products/{productReference}': get: responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/stockAvailabilities' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error400' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/error401' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/error404' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/error500' summary: 'Returns the stock availability for one product reference. Supports customers from US, Russia and India' description: 'This method supports customers from the US, Russia and India' operationId: singleProductStockLevel tags: - stockLevel parameters: - in: path name: productReference required: true schema: type: string - in: query name: shipTo schema: type: string - in: query name: purchaserID schema: type: string tags: - name: stockLevel security: - oauth2: [] components: schemas: multipleProductsList: title: MultipleProductsList type: object description: 'A set of JSON objects - one for each commercial reference. ' properties: productReference: type: string example: MGU2.002.18 description: 'The Schneider Electric product ID as you know it. Don''t forget to define the reference type in the other input field if it''s not Customer Material Number. May be a Customer Material Number, EL Number, EAN Code or SE Material Number.' referenceType: type: integer description: |- Please specify what product ID you are using. 1 = Customer Material Nr 2 = EL Number 3 = EAN Code 4 = Material Number enum: - 1 - 2 - 3 - 4 default: 1 example: 1 multiple-stock-level-details: title: MultipleStockLevelDetails type: object description: 'The response you will be getting from the service. Contains either stock availability or the message if the product is not locally stocked. ' properties: productReference: type: string example: BLVA1230987 description: Just a commercial reference as used for identirying the products. productDescription: type: string example: The very best product description: The description of the product - in your local language (if found) or in English. referenceType: type: integer enum: - 1 - 2 - 3 - 4 description: |- 1 = Customer Material Nr 2 = EL Number 3 = EAN Code 4 = Material Number example: 1 unitOfMeasure: type: string description: A UCUM unit of measure. Can be up to 3 symbols. maxLength: 3 example: M stockLevel: type: number example: 54 description: The available quantity; is returned with respect to your local country commercial rules. statusMessage: type: string example: The product is not locally stocked description: This message will appear if the product is not locally stocked or any other error appears. statusCode: type: string description: |- The status code of processing for this product reference. 200-00: "Stocked product"; please check the "stockLevel" value. 200-01: "Non-stock product"; this product is not stocked in SE plants. The stock level cannot be obtained. 200-02: "Invalid product reference type"; the reference type you've provided does not match the provided product reference. 200-03: "Product reference not found"; the product reference was not found. 200-04: "Internal error"; Please contact your local SE representative with this error code. 200-05: "Internal error"; Please contact your local SE representative with this error code. All the "500" error codes represent different kinds of internal errors. This means, that most likely you're doing everything right, but something is not set up properly on our side. Just let us know which one are you facing. 500-00: Internal error; Please contact your local SE representative with this error code. 500-01: Internal error; Please contact your local SE representative with this error code. 500-02: Internal error; Please contact your local SE representative with this error code. enum: - 200-01 - 200-02 - 200-03 - 200-04 - 200-05 required: - productReference error401: type: object title: Error401 description: 'Unauthorized : Invalid or missing credentials.' properties: fault: type: object properties: code: type: string example: '900902' description: type: string example: Missing Credentials stockAvailabilities: title: SingleProductStockLevelDetails description: This model describes the response of GET method for one reference. type: object properties: productRef: type: string example: A9F79106 description: Product Reference for which availability is requested. shipTo: type: string description: The ID of your address. example: '1000033834' warehouseList: type: array items: type: object properties: name: type: string description: Name of the warehouse example: RU01 Central DC stockLevel: type: integer description: Stock level of the product in the named warehouse example: 1231 error400: type: object title: Error400 description: Bad Request. Something went wrong and the server cannot recognize the request. Please check if the call is corresponding the described structure and try once more. properties: errorCode: type: string example: BAD_REQUEST description: The more detailed description of the error. errorMessage: type: string example: Mandatory input missing description: The error text error404: type: object title: Error404 description: Not found. The product of products you're requesting cannot be found. Please try another one. properties: errorCode: type: string example: PRODUCT_NOT_FOUND description: The code of the error. errorMessage: type: string example: This Product reference is not known description: The more detailed description of the error. error500: type: object title: Error500 description: 'Fault from server. Seems like we’re having some issues with the server. Please try again later, it won’t take long.' properties: errorCode: type: string example: INTERNAL SERVER ERROR description: The code of the error. errorMessage: type: string example: This information is not available right now description: The more detailed description of the error. securitySchemes: oauth2: type: oauth2 description: Oauth2 Application security flows: clientCredentials: tokenUrl: '/token' scopes: get_stock_level: Retrieve stock level