openapi: 3.0.0 servers: - url: 'https://api.qa.se.com/v1/supply-chain/partner-order-status' description: QA/test environment - url: 'https://api.se.com/v1/supply-chain/partner-order-status' description: Production info: title: Order Status API for direct customers version: '1.1' description: >- This API provides current order status, order shipment schedule and also list of items in the order based on parameters passed in the request. Returned information is based on registered account. contact: url: "https://www.se.com" name: "Contact Us" email: "distributorapiportal.global@se.com" paths: '/orders/{country}': get: tags: - orderStatus summary: Search for the order description: 'This method will return the list of orders linked to your company based on the country you define as an input. Your credentials are already linked to a customer''s ID, so you don''t have to worry about providing it; nevertheless, the current process allows the companies working in different countries to have one customer ID for several local representatives; that''s why you have to define the country in two-letter codification (for example, US, RU, etc).' operationId: orderSearch parameters: - name: order-number in: query description: 'Order number, starting from a value. Might be a full order number or just a "starting from".' schema: type: string minLength: 3 - name: order-status in: query description: The order status is one of the pre-defined values. The full list available for your country can be obtained from your local DCX. schema: type: string - name: purchaser-id in: query description: A 10-digit or 5-digit ID of the purchaser used in mySE schema: type: string - name: page in: query description: 'A page number. Default value = 1, if the parameter exceeds the number of pages, the last page will be returned.' schema: type: integer - name: page-size in: query description: 'The size of the page. Maximum is 100, default value is 10.' schema: type: integer - name: country in: path description: 'The country code (US, RU, etc)' required: true schema: type: string responses: '200': description: The list of orders for the requested parameters. content: application/json: schema: type: object properties: orderList: type: array items: $ref: '#/components/schemas/order' pagination: type: object properties: totalNumberOfRecords: type: string pageNumber: type: string totalNumberOfPages: type: string '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' '429': $ref: '#/components/responses/429' '500': $ref: '#/components/responses/500' security: - oauth2: [] servers: - url: 'https://api.qa.se.com/v1/supply-chain/partner-order-status' description: QA/test environment - url: 'https://api.se.com/v1/supply-chain/partner-order-status' description: Production '/orders/{country}/{order-number}/{item-number}/shipment-schedules': get: tags: - orderStatus summary: Get the Shipping Schedule for an item description: The shipping shedule is generally all the shipping information SE can provide you about each line. Use it when you already know the order number and the item (line) number inside the order. One product in the order (which is equal to one line or item in the order) can have several shipping schedules and each shipping schedule can have several sets of tracking information. operationId: shippingSchedule parameters: - name: purchaser-id in: query description: 'description: A 10-digit or 5-digit ID of the purchaser used in mySE' schema: type: string - name: country in: path required: true schema: type: string - name: order-number in: path required: true schema: type: string - name: item-number in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/shipping-schedule' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' '429': $ref: '#/components/responses/429' '500': $ref: '#/components/responses/500' security: - oauth2: [] servers: - url: 'https://api.qa.se.com/v1/supply-chain/partner-order-status' description: QA/test environment - url: 'https://api.se.com/v1/supply-chain/partner-order-status' description: Production '/orders/{country}/{order-number}': get: tags: - orderStatus summary: Get the order and item details description: |- This method is supposed to respond with all the details of a particular order. Use it when you have the order number which can be obtained with /orders/{country} GET method. The order contains one ir several items - generally one for each product in the order. The details of each line are also provided by this method. If you need to get the shipping details, use the /orders/{country}/{order-number}/{item-number}/shipping-schedules GET method. operationId: details parameters: - name: item-number in: query description: 'The ID of the item in the order. If not used, all items of the order will be returned.' schema: type: string - name: purchaser-id in: query description: A 10-digit or 5-digit ID of the purchaser used in mySE schema: type: string - name: country in: path description: 'Two-letter country code (US, RU, etc)' required: true schema: type: string - name: order-number in: path description: The number of your order required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/orderDetails' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' '429': $ref: '#/components/responses/429' '500': $ref: '#/components/responses/500' security: - oauth2: [] servers: - url: 'https://api.qa.se.com/v1/supply-chain/partner-order-status' description: QA/test environment - url: 'https://api.se.com/v1/supply-chain/partner-order-status' description: Production tags: - name: orderStatus description: All related to the Order Status components: securitySchemes: oauth2: type: oauth2 description: Oauth2 Application security flows: clientCredentials: scopes: get_order_status: Retrieve the status of the order tokenUrl: /token responses: '400': description: 'Request is invalid and cannot be processed due one or more issues such as syntax errors, missing required fields, out of range values, conflicting query parameters, or unknown URI.' content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Example: value: code: BAD_REQUEST userMessage: 'Request is invalid and cannot be processed due one or more issues such as syntax errors, missing required fields, out of range values, conflicting query parameters, or unknown URI.' developerMessage: Request content is malformed or exceeded structural limits moreInfo: 'https://example.com/error/123' '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/ErrorResponse' examples: Example: value: code: UNAUTHORIZED userMessage: '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.' developerMessage: Invalid Access Token moreInfo: 'https://example.com/error/123' '403': description: The client does not have permission to perform the requested action e.g. POST or DELETE. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Example: value: code: FORBIDDEN userMessage: The client does not have permission to perform the requested action e.g. POST or DELETE. developerMessage: Http verb DELETE is not supported for path suffix /installed-products/track moreInfo: 'https://example.com/error/123' '404': description: Requested resource does not exist on the server. It is assumed that the URI is valid for this type of resource. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Example: value: code: NOT_FOUND userMessage: Requested resource does not exist on the server. It is assumed that the URI is valid for this type of resource. developerMessage: Records not found moreInfo: 'https://example.com/error/123' '429': description: Number of requests has exceeded the client's rate limits. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Example: value: code: TOO_MANY_REQUESTS userMessage: Number of requests has exceeded the client’s rate limits. developerMessage: Spike arrest violation moreInfo: 'https://example.com/error/123' '500': description: Requested operation encountered an unexpected server error. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: Example: value: code: INTERNAL_SERVER_ERROR userMessage: Requested operation encountered an unexpected server error. developerMessage: 'Target service is unavailable, please try again later.' moreInfo: 'https://example.com/error/123' schemas: order: type: object title: Order properties: orderNumber: type: string description: The number of the order listed example: '1236484' purchaserID: type: string description: A purchased ID via which the order was placed example: '12321323' poNumber: type: string description: The number of the payment order for Schneider Electric example: PO203948 releaseDate: type: string description: The date of releasing the order format: date-time expressDelivery: type: boolean description: The flag of order urgency. example: false orderPlacedThrough: type: string description: Where this order came from. example: mySE orderStatus: $ref: '#/components/schemas/orderStatus' orderStatus: type: object title: OrderStatus description: One of the predefined statuses of the order properties: orderStatusCode: type: string description: The code of the status as shown in mySE example: DV orderStatusLabel: type: string description: The label of the order status. Is dependent on the country set up in mySE example: Delivered orderStatusDesctiption: type: string description: The more detailed information about the order status. example: The order has been delivered shipping-schedule: type: object title: ShippingSchedule description: The order shipping report object. Contains info about the shipping status of each item in the order. properties: orderNumber: type: string description: The ID number of the order (as shown in mySE) example: AB12345 poNumber: type: string description: The number of the payment order. example: PO098234 item: type: object properties: itemNumber: type: string description: The ID of the line example: '79895' catalogNumber: type: string description: The catalog number of the item shippingScheduleList: type: array description: A Shipping Schedule object. Contains all necessary info about the shipping and tracking. May contain several tracking numbers. items: type: object properties: shippingSchedule: type: object properties: shipmentNumber: type: string description: A shipping number provided by SE example: '2010093835' shippedQuantity: type: number description: The quantity shipped example: 65 shipmentLocation: type: string description: The encoding of the shipping location example: '65484984251' carrierName: type: string description: The name of the carrier of this order. example: Schneider Delivery promiseDate: type: string description: The date when an order should be delivered format: date-time notBeforeDate: type: string description: The date before which the order won't be delivered format: date-time shipmentDate: type: string description: The actual shipping date format: date-time routing: type: string description: The routing details of the shipping. example: Routing trackingNumbersList: type: array description: The details of the cracking items: type: object properties: tracking: type: object properties: trackingNumber: type: string description: The tracking number in the delivery system example: 0857558875 trackingURL: type: string description: 'Tracking URL, sent as CDATA ' trackingURLMobile: type: string description: 'Tracking URL for mobile, sent as CDATA' orderDetails: type: object title: OrderDetails description: 'The details of the order, including its item list and items'' shipping data' properties: orderNumber: type: string description: The 10-digit number of your order example: '12345656541' poNumber: type: string description: The number of the payment order of Schneider Electric. example: PO12039809 purchaserID: type: string description: The ID of the customer example: '321654789' accountName: type: string description: The text description of the account example: The very very best account orderPlacedThrough: type: string description: The source of the order example: mySE completeDelivery: type: boolean description: Shows of the order is fully delivered or not example: true releaseDate: type: string description: The date in UTC when the order was released format: date-time expressDelivery: type: boolean description: Shows whether the order is delivered in express-mode or not. example: false paymentTermsCode: type: string description: The payment terms code example: Some payment terms defined paymentTermsLabel: type: string description: The payment terms label example: Some payment terms defined projectNumber: type: string description: The number of the project the order is referred to example: DL513 projectName: type: string description: The name of the project the order is reffering to example: Disney Land projectManager: type: string description: The name of your project manager example: John Wick orderStatus: $ref: '#/components/schemas/orderStatus' itemList: type: array description: The list of order items items: type: object properties: item: type: object description: One item for one commercial reference in the order properties: itemNumber: type: string description: The number of the item in the order. example: '3' productReference: type: string description: The SE product ID example: GN120398 description: type: string description: Just a description of this ordered product example: The short description of the line itemHasShipped: type: boolean description: Shows if the item has been shipped or not. example: false catalogNumber: type: string description: The number of the product ordered totalQtyOrdered: type: string description: The ordered quantity of the product. example: 234 totalQtyShipped: type: string description: The quantity shipped. example: 45 requestedDeliveryDate: type: string description: The date of delivery as requested by the customer format: date-time estimatedDeliveryDate: type: string description: The estimated delivery date. format: date-time itemStatusCode: type: string description: The code of the item status. example: '03' itemStatusLabel: type: string description: The easy-to-read description of the current status of the item status. example: In Delivery totalBackOrdered: type: string description: The amount of back-ordered products example: 12 notBeforeQuantity: type: string description: The "Not Before" quantity example: 5 totalQuantityCancelled: type: string description: The total amount of cancelled products example: 3 priceNet: type: object title: Currency description: Resource representing a currency amount. properties: currency: type: string description: 'Three character currency code, as defined by ISO 4217.' value: type: string description: Currency amount as a decimal value. pattern: ^\d*(.\d+)?$ required: - currency - value priceIncludingTax: type: object title: Currency description: Resource representing a currency amount. properties: currency: type: string description: 'Three character currency code, as defined by ISO 4217.' required: - currency shipTo: type: array description: The block of shipping information items: type: object properties: shipToCountry: type: string description: The target country example: France ErrorResponse: type: object title: ErrorResponse description: Error response returned to the consumer when an HTTP error status has occurred. properties: code: type: string description: |- Service-defined error code which may be numeric or a string. Errors detected by the APIM platform result in the following codes. BAD_REQUEST (for 400) UNAUTHORIZED (for 401) FORBIDDEN (for 403) NOT_FOUND (for 404) GONE (for 410) PRECONDITION_FAILED (for 412) TOO_MANY_REQUESTS (for 429) INTERNAL_SERVER_ERROR (for 500) NOT_IMPLEMENTED (for 501) Any specific service validation errors would replace BAD_REQUEST. example: MISSING_FIELD or 12345 userMessage: type: string description: Human-readable general description of the error. example: 'Required field is missing: productSku' developerMessage: type: string description: Optional human-readable description of the error details. example: 'Product master API ParseException: required tag expected' moreInfo: type: string description: 'Optional link to error documentation, which has more information about the error.' example: 'https://example.com/product-master/v1/error/12345' required: - code - userMessage security: - oauth2: []