3M

3M Orders API

Submit and track purchase orders with 3M.

OpenAPI Specification

3m-orders-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: 3M Partner and Supplier Deliveries Orders API
  description: The 3M Partner and Supplier API provides real-time access to 3M product, pricing, order, delivery, and invoice data for partners and suppliers. The API supports GET and POST operations for product/price lookups, order and delivery tracking, and invoice status queries. Authentication uses OAuth 2.0 bearer tokens with client credentials provided during onboarding.
  version: '1.0'
servers:
- url: https://api.3m.com
  description: Production server
security:
- bearerAuth: []
tags:
- name: Orders
  description: Submit and track purchase orders with 3M.
paths:
  /orders:
    get:
      operationId: listOrders
      summary: 3M List Orders
      description: Retrieves a list of orders placed by the authenticated partner or supplier with status and tracking information.
      tags:
      - Orders
      parameters:
      - name: status
        in: query
        description: Filter orders by status (pending, processing, shipped, delivered, cancelled).
        schema:
          type: string
          enum:
          - pending
          - processing
          - shipped
          - delivered
          - cancelled
        example: shipped
      - name: startDate
        in: query
        description: Filter orders from this date.
        schema:
          type: string
          format: date
        example: '2025-01-01'
      responses:
        '200':
          description: Successful response with order list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderList'
              examples:
                ListOrders200Example:
                  summary: Default listOrders 200 response
                  x-microcks-default: true
                  value:
                    orders:
                    - orderId: ORD-67890
                      status: shipped
                      createdAt: '2025-03-15T10:30:00Z'
                      totalAmount: 499.95
                      currency: USD
                      items:
                      - productId: PROD-12345
                        quantity: 20
                        unitPrice: 24.99
        '401':
          description: Unauthorized
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createOrder
      summary: 3M Create an Order
      description: Submits a new order for 3M products on behalf of the authenticated partner or supplier.
      tags:
      - Orders
      requestBody:
        required: true
        description: Order details including line items and shipping address.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
            examples:
              CreateOrderRequestExample:
                summary: Default createOrder request
                x-microcks-default: true
                value:
                  items:
                  - productId: PROD-12345
                    quantity: 20
                  shippingAddress:
                    street: 3M Center
                    city: St. Paul
                    state: MN
                    zip: '55144'
                    country: US
      responses:
        '201':
          description: Order created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
              examples:
                CreateOrder201Example:
                  summary: Default createOrder 201 response
                  x-microcks-default: true
                  value:
                    orderId: ORD-67891
                    status: pending
                    createdAt: '2025-03-15T14:30:00Z'
                    totalAmount: 499.8
                    currency: USD
                    items:
                    - productId: PROD-12345
                      quantity: 20
                      unitPrice: 24.99
        '400':
          description: Invalid request body
        '401':
          description: Unauthorized
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    ShippingAddress:
      type: object
      description: Shipping address for an order
      properties:
        street:
          type: string
          description: Street address
          example: 3M Center
        city:
          type: string
          description: City name
          example: St. Paul
        state:
          type: string
          description: State or province code
          example: MN
        zip:
          type: string
          description: Postal/ZIP code
          example: '55144'
        country:
          type: string
          description: Country code (ISO 3166-1 alpha-2)
          example: US
    OrderList:
      type: object
      description: List of orders
      properties:
        orders:
          type: array
          description: Array of order records
          items:
            $ref: '#/components/schemas/Order'
    CreateOrderRequest:
      type: object
      description: Request body for creating a new order
      required:
      - items
      - shippingAddress
      properties:
        items:
          type: array
          description: Line items to order
          items:
            type: object
            properties:
              productId:
                type: string
                description: Product identifier
                example: PROD-12345
              quantity:
                type: integer
                description: Quantity to order
                example: 20
        shippingAddress:
          $ref: '#/components/schemas/ShippingAddress'
    Order:
      type: object
      description: A purchase order placed with 3M
      properties:
        orderId:
          type: string
          description: Unique order identifier
          example: ORD-67890
        status:
          type: string
          description: Current order status
          enum:
          - pending
          - processing
          - shipped
          - delivered
          - cancelled
          example: shipped
        createdAt:
          type: string
          format: date-time
          description: Order creation timestamp
          example: '2025-03-15T10:30:00Z'
        totalAmount:
          type: number
          description: Total order value
          example: 499.95
        currency:
          type: string
          description: Currency code (ISO 4217)
          example: USD
        items:
          type: array
          description: Line items in the order
          items:
            $ref: '#/components/schemas/OrderItem'
    OrderItem:
      type: object
      description: A line item within an order
      properties:
        productId:
          type: string
          description: Product identifier
          example: PROD-12345
        quantity:
          type: integer
          description: Quantity ordered
          example: 20
        unitPrice:
          type: number
          description: Unit price at time of order
          example: 24.99
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2.0 bearer token obtained through client credentials flow. Provided during onboarding.