swagger: '2.0'
info:
  version: '2.0'
  title: shipping-modes
consumes:
  - application/json
produces:
  - application/json
paths:
  /shipping-modes:
    get:
      tags:
        - shipping-modes
      description: Get a collection of Shipping Modes.
      operationId: getShippingModes
      parameters:
        - name: id
          in: query
          description: The Shipping Mode ID.
          required: false
          type: integer
          format: int32
        - name: carrier
          in: query
          description: A shipping carrier identifier. The company that provides shipping services from a fulfillment center to a customer.
          required: false
          type: string
        - name: field1
          in: query
          description: An additional description. A brief description of the shipping mode and the carrier.
          required: false
          type: string
        - name: field2
          in: query
          description: 'Estimated delivery time description. For example, 1 to 3 business days, 2-3 days etc.'
          required: false
          type: integer
          format: int32
        - name: trackingName
          in: query
          description: Reserved for IBM internal use.
          required: false
          type: string
        - name: trackingURL
          in: query
          description: 'The URL address that customers can use to find out more about the status of their shipment. For example, www.xyzcarrier.com.'
          required: false
          type: string
        - name: trackingSocksHost
          in: query
          description: Reserved for IBM internal use.
          required: false
          type: string
        - name: trackingSocksPort
          in: query
          description: Reserved for IBM internal use.
          required: false
          type: integer
          format: int32
        - name: trackingIcon
          in: query
          description: Reserved for IBM internal use.
          required: false
          type: string
        - name: trackingInquiryType
          in: query
          description: Reserved for IBM internal use.
          required: false
          type: string
        - name: markForDelete
          in: query
          description: The description of the Role.
          required: false
          type: integer
          format: int32
        - name: storeId
          in: query
          description: The description of the Role.
          required: false
          type: integer
          format: int32
        - name: shippingCode
          in: query
          description: 'A character string that uniquely identifies this shipping mode, unique for the StoreEntity.'
          required: false
          type: string
        - name: offset
          in: query
          description: 'The position within the resulting dataset where the query begins returning item records. If the offset is "5", the records that returned begin with the sixth record that matches the query parameters. If the offset is "0", the records that are returned begin with the first record that matches the query parameters.'
          required: false
          type: integer
          format: int32
        - name: limit
          in: query
          description: The maximum number of records to return.
          required: false
          type: integer
          format: int32
        - name: fields
          in: query
          description: 'The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.'
          required: false
          type: string
        - name: expand
          in: query
          description: 'The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.'
          required: false
          type: string
      responses:
        '200':
          description: A collection of Shipping Modes.
          schema:
            $ref: '#/definitions/ShippingModeCollection'
        '400':
          description: There was a client error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
        '500':
          description: There was a server error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
    post:
      tags:
        - shipping-modes
      description: Create a shipping mode.
      operationId: createShippingMode
      parameters:
        - in: body
          name: ShippingMode
          description: A Shipping Mode.
          required: true
          schema:
            $ref: '#/definitions/ShippingMode'
      responses:
        '201':
          description: The operation was successful.
        '400':
          description: There was a client error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
        '500':
          description: There was a server error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
  '/shipping-modes/{id}':
    get:
      tags:
        - shipping-modes
      description: Get a shipping mode.
      operationId: getShippingModeById
      parameters:
        - name: fields
          in: query
          description: 'The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.'
          required: false
          type: string
        - name: expand
          in: query
          description: 'The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.'
          required: false
          type: string
      responses:
        '200':
          description: A Shipping Mode.
          schema:
            $ref: '#/definitions/ShippingMode'
        '400':
          description: There was a client error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
        '404':
          description: The resource was not found.
        '500':
          description: There was a server error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
    delete:
      tags:
        - shipping-modes
      description: Delete a shipping mode.
      operationId: deleteShippingModeById
      parameters: []
      responses:
        '204':
          description: The operation was successful.
        '400':
          description: There was a client error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
        '404':
          description: The resource was not found.
        '500':
          description: There was a server error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
    patch:
      tags:
        - shipping-modes
      description: Update a shipping mode.
      operationId: updateShippingModeById
      parameters:
        - in: body
          name: ShippingMode
          description: A Shipping Mode.
          required: true
          schema:
            $ref: '#/definitions/ShippingMode'
      responses:
        '200':
          description: The operation was successful.
        '400':
          description: There was a client error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
        '404':
          description: The resource was not found.
        '500':
          description: There was a server error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
    parameters:
      - name: id
        in: path
        description: The Shipping Mode ID.
        required: true
        type: integer
        format: int32
  '/shipping-modes/{id}/descriptions':
    get:
      tags:
        - shipping-modes
      description: ''
      operationId: getDescriptionsOfShippingMode
      parameters:
        - name: offset
          in: query
          description: 'The position within the resulting dataset where the query begins returning item records. If the offset is "5", the records that returned begin with the sixth record that matches the query parameters. If the offset is "0", the records that are returned begin with the first record that matches the query parameters.'
          required: false
          type: integer
          format: int32
        - name: limit
          in: query
          description: The maximum number of records to return.
          required: false
          type: integer
          format: int32
        - name: fields
          in: query
          description: 'The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.'
          required: false
          type: string
        - name: expand
          in: query
          description: 'The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.'
          required: false
          type: string
      responses:
        '200':
          description: A collection of Shipping Mode Descriptions.
          schema:
            $ref: '#/definitions/ShippingModeDescriptionCollection'
        '400':
          description: There was a client error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
        '500':
          description: There was a server error.
          schema:
            $ref: '#/definitions/ErrorResponseContainer'
    parameters:
      - name: id
        in: path
        description: The Shipping Mode ID.
        required: true
        type: integer
        format: int32
definitions:
  Link:
    type: object
    properties:
      href:
        type: string
        format: uri
        description: The URL of the link.
    description: Links to related resources.
  Error:
    type: object
    properties:
      code:
        type: string
        description: The error message code.
      message:
        type: string
        description: The error message.
      messageKey:
        type: string
        description: The error message key.
      messageArguments:
        type: array
        description: The arguments used to construct the error message.
        items:
          type: object
      correlationId:
        type: string
        description: The unique identifier for the request.
      locale:
        type: string
        description: The locale of the error message.
    description: The error message item model.
  ErrorResponseContainer:
    type: object
    properties:
      requestId:
        type: string
        description: The request identifier.
      errors:
        type: array
        description: The errors.
        items:
          $ref: '#/definitions/Error'
    description: The error message model.
  ShippingMode:
    type: object
    properties:
      id:
        type: integer
        format: int32
        description: The Shipping Mode ID.
      carrier:
        type: string
        description: A shipping carrier identifier. The company that provides shipping services from a fulfillment center to a customer.
      field1:
        type: string
        description: An additional description. A brief description of the shipping mode and the carrier.
      field2:
        type: integer
        format: int32
        description: 'Estimated delivery time description. For example, 1 to 3 business days, 2-3 days etc.'
      trackingName:
        type: string
        description: Reserved for IBM internal use.
      trackingURL:
        type: string
        description: 'The URL address that customers can use to find out more about the status of their shipment. For example, www.xyzcarrier.com.'
      trackingSocksHost:
        type: string
        description: Reserved for IBM internal use.
      trackingSocksPort:
        type: integer
        format: int32
        description: Reserved for IBM internal use.
      trackingIcon:
        type: string
        description: Reserved for IBM internal use.
      trackingInquiryType:
        type: string
        description: Reserved for IBM internal use.
      markForDelete:
        type: integer
        format: int32
        description: The description of the Role.
      storeId:
        type: integer
        format: int32
        description: The description of the Role.
      shippingCode:
        type: string
        description: 'A character string that uniquely identifies this shipping mode, unique for the StoreEntity.'
      links:
        type: object
        description: Links to related resources.
        properties:
          descriptions:
            type: object
            description: ''
            properties:
              href:
                type: string
                description: The URL of the link.
    description: A Shipping Mode.
  ShippingModeCollection:
    type: object
    properties:
      count:
        type: integer
        format: int64
        description: The total number of items.
      items:
        type: array
        description: The items.
        items:
          $ref: '#/definitions/ShippingMode'
    description: A collection of Shipping Modes.
  ShippingModeDescription:
    type: object
    properties:
      shippingModeId:
        type: integer
        format: int32
        description: The Shipping Mode ID.
      languageId:
        type: integer
        format: int32
        description: The Language ID.
      description:
        type: string
        description: 'A brief description of the shipping mode, suitable for display to a customer for selection. For example, XYZ Carrier, Overnight shipping mode.'
      field1:
        type: string
        description: Customizable.
      field2:
        type: string
        description: Customizable.
    description: A Shipping Mode Description.
  ShippingModeDescriptionCollection:
    type: object
    properties:
      count:
        type: integer
        format: int64
        description: The total number of items.
      items:
        type: array
        description: The items.
        items:
          $ref: '#/definitions/ShippingModeDescription'
    description: A collection of Shipping Mode Descriptions.
