--- swagger: "2.0" info: title: "Order Status API for direct customers" version: "1.0" description: "Discover all the order information provided by Schneider Electric\ \ mySE service via the API" contact: url: "http://www.se.com" name: "Contact Us" email: "distributorapiportal.global@se.com" host: "api.preprod.se.com" paths: /orders/{country}: get: responses: "200": description: "The list of orders for the requested parameters." schema: type: "object" properties: orderList: type: "array" items: $ref: "#/definitions/order" pagination: type: "object" properties: totalNumberOfRecords: type: "integer" format: "int32" pageNumber: type: "integer" format: "int32" totalNumberOfPages: type: "integer" format: "int32" "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." schema: type: "object" title: "Error Response" description: "Error response returned to the consumer when an HTTP error\ \ status has occurred." properties: code: type: "string" example: "MISSING_FIELD or 12345" description: "Server-defined error code which may be numeric or a\ \ string." userMessage: type: "string" example: "Required field is missing: productSku" description: "Human-readable description of the error with hints about\ \ how to fix it." developerMessage: type: "string" description: "Optional human-readable description of the error, meaningful\ \ to a developer." example: "Product master API ParseException: required tag expected" moreInfo: type: "string" description: "Optional link to error documentation, which has more\ \ information about the error." format: "uri" example: "https://example.com/product-master/v1/error/12345" required: - "code" - "userMessage" "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." schema: $ref: "#/definitions/Error401" "403": description: "" "404": description: "Requested resource does not exist on the server. It is assumed\ \ that the URI is valid for this type of resource." schema: type: "object" title: "Error Response" description: "Error response returned to the consumer when an HTTP error\ \ status has occurred." properties: code: type: "string" example: "MISSING_FIELD or 12345" description: "Server-defined error code which may be numeric or a\ \ string." userMessage: type: "string" example: "Required field is missing: productSku" description: "Human-readable description of the error with hints about\ \ how to fix it." developerMessage: type: "string" description: "Optional human-readable description of the error, meaningful\ \ to a developer." example: "Product master API ParseException: required tag expected" moreInfo: type: "string" description: "Optional link to error documentation, which has more\ \ information about the error." format: "uri" example: "https://example.com/product-master/v1/error/12345" required: - "code" - "userMessage" "500": description: "" schema: $ref: "#/definitions/error500" summary: "Search for the order" operationId: "orderSearch" tags: - "orderStatus" consumes: - "application/json" produces: - "application/json" parameters: - in: "query" name: "order-number" type: "string" description: "Order number, starting from a value. Might me a full order number\ \ or just a \"starting from\"." minLength: 3 - in: "query" name: "order-status" type: "string" 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." - in: "path" name: "country" type: "string" required: true description: "The country code (US, RU, etc)" - in: "query" name: "purchaser-id" type: "string" description: "A 10-digit ID of the purchaser used in mySE" - in: "query" name: "page" type: "integer" description: "A page number. Default value = 1, if the parameter exceeds the\ \ number of pages, the last page will be returned." - in: "query" name: "page-size" type: "integer" description: "The size of the page. Maximum is 100, default value is 10." 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)." /orders/{country}/{order-number}/{item-number}/shipment-schedules: get: responses: "200": description: "" schema: $ref: "#/definitions/shipping-schedule" "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." schema: type: "object" title: "Error Response" description: "Error response returned to the consumer when an HTTP error\ \ status has occurred." properties: code: type: "string" example: "MISSING_FIELD or 12345" description: "Server-defined error code which may be numeric or a\ \ string." userMessage: type: "string" example: "Required field is missing: productSku" description: "Human-readable description of the error with hints about\ \ how to fix it." developerMessage: type: "string" description: "Optional human-readable description of the error, meaningful\ \ to a developer." example: "Product master API ParseException: required tag expected" moreInfo: type: "string" description: "Optional link to error documentation, which has more\ \ information about the error." format: "uri" example: "https://example.com/product-master/v1/error/12345" required: - "code" - "userMessage" "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." schema: $ref: "#/definitions/Error401" "404": description: "Requested resource does not exist on the server. It is assumed\ \ that the URI is valid for this type of resource." schema: type: "object" title: "Error Response" description: "Error response returned to the consumer when an HTTP error\ \ status has occurred." properties: code: type: "string" example: "MISSING_FIELD or 12345" description: "Server-defined error code which may be numeric or a\ \ string." userMessage: type: "string" example: "Required field is missing: productSku" description: "Human-readable description of the error with hints about\ \ how to fix it." developerMessage: type: "string" description: "Optional human-readable description of the error, meaningful\ \ to a developer." example: "Product master API ParseException: required tag expected" moreInfo: type: "string" description: "Optional link to error documentation, which has more\ \ information about the error." format: "uri" example: "https://example.com/product-master/v1/error/12345" required: - "code" - "userMessage" "500": description: "" schema: $ref: "#/definitions/error500" 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" tags: - "orderStatus" consumes: - "application/json" produces: - "application/json" parameters: - in: "path" name: "country" type: "string" required: true - in: "path" name: "order-number" type: "string" required: true - in: "path" name: "item-number" type: "string" required: true /orders/{country}/{order-number}: get: responses: "200": description: "" schema: $ref: "#/definitions/orderDetails" "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." schema: type: "object" title: "Error Response" description: "Error response returned to the consumer when an HTTP error\ \ status has occurred." properties: code: type: "string" example: "MISSING_FIELD or 12345" description: "Server-defined error code which may be numeric or a\ \ string." userMessage: type: "string" example: "Required field is missing: productSku" description: "Human-readable description of the error with hints about\ \ how to fix it." developerMessage: type: "string" description: "Optional human-readable description of the error, meaningful\ \ to a developer." example: "Product master API ParseException: required tag expected" moreInfo: type: "string" description: "Optional link to error documentation, which has more\ \ information about the error." format: "uri" example: "https://example.com/product-master/v1/error/12345" required: - "code" - "userMessage" "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." schema: $ref: "#/definitions/Error401" "404": description: "Requested resource does not exist on the server. It is assumed\ \ that the URI is valid for this type of resource." schema: type: "object" title: "Error Response" description: "Error response returned to the consumer when an HTTP error\ \ status has occurred." properties: code: type: "string" example: "MISSING_FIELD or 12345" description: "Server-defined error code which may be numeric or a\ \ string." userMessage: type: "string" example: "Required field is missing: productSku" description: "Human-readable description of the error with hints about\ \ how to fix it." developerMessage: type: "string" description: "Optional human-readable description of the error, meaningful\ \ to a developer." example: "Product master API ParseException: required tag expected" moreInfo: type: "string" description: "Optional link to error documentation, which has more\ \ information about the error." format: "uri" example: "https://example.com/product-master/v1/error/12345" required: - "code" - "userMessage" "500": description: "" schema: $ref: "#/definitions/error500" summary: "Get the order and item details" operationId: "details" consumes: - "application/json" produces: - "application/json" parameters: - in: "path" name: "country" type: "string" required: true description: "Two-letter country code (US, RU, etc)" - in: "path" name: "order-number" type: "string" required: true description: "The number of your order" - in: "query" name: "item-number" type: "string" description: "The ID of the item in the order. If not used, all items of the\ \ order will be returned." tags: - "orderStatus" 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.\nThe 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.\nIf you need to get the shipping details,\ \ use the /orders/{country}/{order-number}/{item-number}/shipping-schedules\ \ GET method." definitions: 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" example: "PO098234" description: "The number of the payment order." item: type: "object" properties: itemNumber: type: "string" example: "79895" description: "The ID of the line" productReference: type: "string" example: "MTN872082" description: "The Schneider Electric commercial reference" 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" example: "2010093835" description: "A shipping number provided by SE" shippedQuantity: type: "number" example: 65 description: "The quantity shipped" shipmentLocation: type: "string" example: "65484984251" description: "The encoding of the shipping location" carrierName: type: "string" example: "Schneider Delivery" description: "The name of the carrier of this order." 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" example: "Routing" description: "The routing details of the shipping." trackingNumbersList: type: "array" description: "The details of the cracking" items: type: "object" properties: tracking: type: "object" properties: trackingNumber: type: "string" example: "0857558875" description: "The tracking number in the delivery\ \ system" trackingURL: type: "string" description: "Tracking URL, sent as CDATA " trackingURLMobile: type: "string" description: "Tracking URL for mobile, sent as CDATA" order: type: "object" title: "Order" properties: orderNumber: type: "string" example: "1236484" description: "The number of the order listed" purchaserID: type: "string" example: "12321323" description: "A purchased ID via which the order was placed" poNumber: type: "string" example: "PO203948" description: "The number of the payment order for Schneider Electric" releaseDate: type: "string" description: "The date of releasing the order" format: "date-time" projectName: type: "string" example: "The very best project ever" description: "The name of the project to which the order is linked." expressDelivery: type: "boolean" example: false description: "The flag of order urgency." orderPlacedThrough: type: "string" example: "mySE" description: "Where this order came from." projectManager: type: "string" example: "John Wick" description: "The name of your project manager" totalAmount: type: "object" title: "Currency" description: "Resource representing a currency amount." properties: currency: type: "string" description: "Three character currency code, as defined by ISO 4217." pattern: "^[a-zA-Z]{2}$" value: type: "string" description: "Currency amount as a decimal value." pattern: "^\\d*(.\\d+)?$" display: type: "string" description: "Currency amount suitable for display." example: "$45.21" required: - "currency" - "value" totalAmountWithTax: type: "object" title: "Currency" description: "Resource representing a currency amount." properties: currency: type: "string" description: "Three character currency code, as defined by ISO 4217." pattern: "^[a-zA-Z]{2}$" value: type: "string" description: "Currency amount as a decimal value." pattern: "^\\d*(.\\d+)?$" display: type: "string" description: "Currency amount suitable for display." example: "$45.21" required: - "currency" - "value" orderStatus: $ref: "#/definitions/orderStatus" orderDetails: title: "OrderDetails" type: "object" description: "The details of the order, including its item list and items' shipping\ \ data" properties: orderNumber: type: "string" example: "12345656541" description: "The 10-digit number of your order" poNumber: type: "string" example: "PO12039809" description: "The number of the payment order of Schneider Electric." purchaserID: type: "string" example: "321654789" description: "The ID of the customer" accountName: type: "string" example: "The very very best account" description: "The text description of the account" specialTerms: type: "string" example: "The list of special terms" description: "The special terms for this order - if specified" orderPlacedThrough: type: "string" example: "mySE" description: "The source of the order" carrierName: type: "string" example: "Schneider Express" description: "The name of the carrier for your order" completeDelivery: type: "boolean" example: true description: "Shows of the order is fully delivered or not" releaseDate: type: "string" description: "The date in UTC when the order was released" format: "date-time" expressDelivery: type: "boolean" example: false description: "Shows whether the order is delivered in express-mode or not." paymentTermsCode: type: "string" example: "Some payment terms defined" description: "The payment terms code" paymentTermsLabel: type: "string" example: "Some payment terms defined" description: "The payment terms label" totalAmount: type: "object" title: "Currency" description: "Resource representing a currency amount." properties: currency: type: "string" description: "Three character currency code, as defined by ISO 4217." pattern: "^[a-zA-Z]{2}$" value: type: "string" description: "Currency amount as a decimal value." pattern: "^\\d*(.\\d+)?$" display: type: "string" description: "Currency amount suitable for display." example: "$45.21" required: - "currency" - "value" totalAmountWithTax: type: "object" title: "Currency" description: "Resource representing a currency amount." properties: currency: type: "string" description: "Three character currency code, as defined by ISO 4217." pattern: "^[a-zA-Z]{2}$" value: type: "string" description: "Currency amount as a decimal value." pattern: "^\\d*(.\\d+)?$" display: type: "string" description: "Currency amount suitable for display." example: "$45.21" required: - "currency" - "value" quotationNumber: type: "string" example: "ABC-1235" description: "The number of original quote" projectNumber: type: "string" example: "DL513" description: "The number of the project the order is referred to" projectName: type: "string" example: "Disney Land" description: "The name of the project the order is reffering to" projectManager: type: "string" example: "John Wick" description: "The name of your project manager" orderStatus: $ref: "#/definitions/orderStatus" customer: $ref: "#/definitions/customer" 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" example: "3" description: "The number of the item in the order." productReference: type: "string" example: "GN120398" description: "The SE product ID" description: type: "string" example: "The short description of the line" description: "Just a description of this ordered product" itemHasShipped: type: "boolean" example: false description: "Shows if the item has been shipped or not." productCrossRefNumber: type: "string" description: "The cross-reference of the product" example: "CF120938" elNumber: type: "string" description: "EL Number of the product" catalogNumber: type: "string" description: "The number of the product ordered" totalQtyOrdered: type: "integer" example: 234 description: "The ordered quantity of the product." totalQtyShipped: type: "integer" example: 45 description: "The quantity shipped." 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" trackingNumber: type: "string" example: "8693546834" description: "The tracking ID of the delivery with this line" trackingUrl: type: "object" title: "Link" description: "Link to related resource endpoint." properties: rel: type: "string" description: "A word describing the relationship\n\nStandardized\ \ relationship names are defined here but names are not limited\ \ to this list.\n\nhttps://www.iana.org/assignments/link-relations/link-relations.xhtml" default: "related" example: "self, related, help, chapter, first, last, parent" href: type: "string" format: "uri" description: "URI for a resource endpoint." example: "https://example.com/book/v1/chapter2" title: type: "string" description: "Optional human-readable title for the link." example: "Next Chapter" required: - "rel" - "href" itemStatusCode: type: "string" example: "03" description: "The code of the item status." itemStatusLabel: type: "string" example: "In Delivery" description: "The easy-to-read description of the current status\ \ of the item status." itemStatusDate: type: "string" description: "The date when the item was ordered." format: "date-time" totalBackOrdered: type: "number" example: 12 description: "The amount of back-ordered products" notBeforeQuantity: type: "number" example: 5 description: "The \"Not Before\" quantity" totalQuantityCancelled: type: "number" example: 3 description: "The total amount of cancelled products" 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." pattern: "^[a-zA-Z]{2}$" value: type: "string" description: "Currency amount as a decimal value." pattern: "^\\d*(.\\d+)?$" display: type: "string" description: "Currency amount suitable for display." example: "$45.21" 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." pattern: "^[a-zA-Z]{2}$" value: type: "string" description: "Currency amount as a decimal value." pattern: "^\\d*(.\\d+)?$" display: type: "string" description: "Currency amount suitable for display." example: "$45.21" required: - "currency" - "value" shipTo: type: "array" description: "The block of shipping information" items: type: "object" properties: shipToAddress1: type: "string" example: "35, rue Joseph Monier" description: "The first line of the address" shipToAddress2: type: "string" example: "Le Hive" description: "The second line of the address" shipToCity: type: "string" example: "Rueil-Malmaison" description: "The city or town the order is being delivered\ \ to." shipToState: type: "string" example: "Ile de France" description: "The region or the state for the order to be\ \ delivered to" shipToCountry: type: "string" example: "France" description: "The target country" shipToZipcode: type: "integer" example: 92500 description: "The ZIP-code" orderStatus: type: "object" description: "One of the predefined statuses of the order" title: "OrderStatus" properties: orderStatusCode: type: "string" example: "DV" description: "The code of the status as shown in mySE" orderStatusLabel: type: "string" example: "Delivered" description: "The label of the order status. Is dependent on the country set\ \ up in mySE" orderStatusDesctiption: type: "string" example: "The order has been delivered" description: "The more detailed information about the order status." customer: type: "object" title: "Customer" properties: customerID: type: "string" customerName: type: "string" 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" error500: type: "object" title: "Error500" properties: errorCode: type: "string" errorMessage: type: "string" basePath: "/v1/supply-chain/partner-order-status" schemes: - "https" consumes: - "application/json" produces: - "application/json" tags: - name: "orderStatus" description: "All related to the Order Status" responses: {} securityDefinitions: oauth2: type: "oauth2" flow: "application" tokenUrl: "https://api.preprod.se.com/token" description: "Oauth2 Application security" scopes: get_order_status: "Retrieve the status of the order" security: - oauth2: []