> ## Documentation Index
> Fetch the complete documentation index at: https://docs.winedirectfulfillment.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Uploads many orders all at once in a batch into a queue which can take 15 minutes to process. 

> This functionality closely mirrors the WineDirect Portal's Bulk Upload. Please visit: 
            
   https://fulfillment.winedirect.com/orders/upload for more details



## OpenAPI

````yaml /openapi.json post /api/v1/Orders/SubmitOrders
openapi: 3.0.4
info:
  title: WineDirect Fulfillment API Gateway UAT
  description: >-
    <i>Provides access to the Fulfillment system.</i><h2><a target="_blank"
    href='https://portal.wd-fs.com/administration/api-help'>Detailed
    Documentation</a></h2><h3>From your code:</h3><p> To use any of the
    endpoints, get the <b>Bearer Token</b> from the <b>AccessToken</b> endpoint,
    then pass that as a <b>HttpHeader</b> called <b>Authorization</b> like this
    on all calls.<br><pre>(C#)   request.AddParameter("Authorization", token, 
    ParameterType.HttpHeader);</pre><h3>From a browser:</h3><p>Press the
    <b>Authorize</b> button and enter the <b>Bearer Token</b> from the
    <b>AccessToken</b> endpoint.</p>
  version: '1.0'
servers: []
security:
  - Bearer: []
paths:
  /api/v1/Orders/SubmitOrders:
    post:
      tags:
        - Orders
      summary: >-
        Uploads many orders all at once in a batch into a queue which can take
        15 minutes to process. 
      description: "This functionality closely mirrors the WineDirect Portal's Bulk Upload. Please visit: \r\n            \r\n   https://fulfillment.winedirect.com/orders/upload for more details"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrdersImportRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderImportResponseServiceResult'
components:
  schemas:
    OrdersImportRequest:
      required:
        - accountNumber
      type: object
      properties:
        password:
          type: string
          description: The importer's password
          nullable: true
        accountNumber:
          minLength: 1
          type: string
          description: >-
            Account number that is connected to the customer account the request
            is related to. The account number is assigned by WineDirect during
            onboarding.
        batchNumber:
          maxLength: 240
          type: string
          description: >-
            An identifier that is shared among a group of orders. Often used to
            identify a specific club batch. If not submitted the system will
            automatically assign a unique BatchId for each request. The assigned
            batch id is based on a time stamp
          nullable: true
        orders:
          type: array
          items:
            $ref: '#/components/schemas/OrderImportDetail'
          description: Detail about the orders to import
          nullable: true
      additionalProperties: false
      description: Detail about a group of orders to import
    OrderImportResponseServiceResult:
      type: object
      properties:
        isSuccess:
          type: boolean
          description: >-
            Was the request successful. If not, the message will have more
            information.
        message:
          type: string
          description: Any error message
          nullable: true
        payload:
          $ref: '#/components/schemas/OrderImportResponse'
      additionalProperties: false
      description: Generic container for all service responses
    OrderImportDetail:
      required:
        - consumerHandlingFeeOrShippingHandling
        - consumerShippingCharge
        - customerOrderId
        - isOnSitePurchase
        - orderType
        - salesTaxAmount
        - shippingPriority
        - soldToAddress
        - totalChargeToConsumer
      type: object
      properties:
        customerOrderId:
          maxLength: 80
          minLength: 1
          type: string
          description: The order identifier from the submitting system.
        orderType:
          minLength: 1
          type: string
          description: "Order type being submitted, this identifier can be used to determine a distinct notification email to trigger, subinventory to pull order from and packing slip to be used with the order\r\n            \r\n    \"CLUB\" - Club Order\r\n    \"STND\" - Daily Order\r\n    \"SPCL\" - Special Order\r\n    \"VC\"   - Visitor Center\r\n    \"DAILY\" - Daily Order\r\n    \"SPECIAL\" - Special Order\r\n    \"CORP\" - Corp Order\r\n\r\n     The Special order type trigger special handling by operations and will also incur additional fees, this is used for order customization or special programs."
        requestedShipDate:
          type: string
          description: "Future ship date.  Enter the date you want the order to be processed.  We will hold the orders until that date.\r\n            \r\n      eg 2023-12-15"
          format: date-time
          nullable: true
        isOnSitePurchase:
          type: boolean
          description: >-
            Flag to indicate if the purchase was made in person at the winery
            location. On Site purchases allow different compliance and shipping
            rules in a few states
          default: 'false'
        warehouseCode:
          type: string
          description: "The warehouse (Code)   Warehouse Code will override the \"Warehouse Selection Rules\" configured for each customer. If Warehouse is left Null, The 'Warehouse Selection Rule' logic will define warehouse selection on a destination state basis\r\n            \r\n    \"GLW\" - Glenwillow,\r\n    \"WDI\" - Green Island,\r\n    \"PSO\" - Paso Robles,\r\n    \"SMA\" - Santa Maria,\r\n    \"SHW\" - Willamette Valley\r\n    \"DAL\" - Dallas"
          nullable: true
        subInventoryCode:
          maxLength: 80
          type: string
          description: "Subinventory to assign the order to pull inventory from, typical values are\r\n            \r\n    SHIP - Primary\r\n    CLUB - Club\r\n            \r\nHowever subinventories can be configured for specific programs and customers and are configured by WineDirect. The value is typically not sent on an order but is system assigned based on the order type, most accounts use only the SHIP subinventory"
          nullable: true
        notificationCode:
          maxLength: 80
          type: string
          description: >-
            Place holder for assigning a specific email notification template to
            an order, not yet implemented
          nullable: true
        packingSlipCode:
          maxLength: 80
          type: string
          description: >-
            Code used to assign a specific packing slip template to be used for
            the order. Codes are assigned in the packing slip template design
            process via the portal
          nullable: true
        shippingPriority:
          minLength: 1
          type: string
          description: "Shipping Priority, AKA ServiceLevel, for Order in caps - for example:\r\n            \r\n    FEDGROUND\r\n    FEX\r\n    UPS2DAY\r\n    UPSOVERNIGHT\r\n    UP1\r\n    UPSOVRNGHT\r\n    V55\r\n    UPSGROUND"
        shippingInstructions:
          maxLength: 1000
          type: string
          description: >-
            Message to Specialist to take action on the order.  If populated, it
            will stop the order from processing until actions are completed.
          nullable: true
        giftMessage:
          maxLength: 2000
          type: string
          description: >-
            Message to be printed on the bottom of the packing slip that is
            printed for the order. The string does not support formatting
            characters or newline. The string is limited to 1000 characters but
            the actual limit that will not overprint other packing slip elements
            varies with the packing slip design
          nullable: true
        reference1:
          maxLength: 239
          type: string
          description: >-
            A reference field that can be submitted with an order and used in
            the GetOrderStatus to retrieve the order
          nullable: true
        reference2:
          maxLength: 239
          type: string
          description: >-
            A reference field that can be submitted with an order and used in
            the GetOrderStatus to retrieve the order
          nullable: true
        reference3:
          maxLength: 239
          type: string
          description: >-
            A reference field that can be submitted with an order and used in
            the GetOrderStatus to retrieve the order
          nullable: true
        consumerHandlingFeeOrShippingHandling:
          type: number
          description: "Amount charged to the Consumer for Handling OR Shipping and Handling as one total (may be 0 or a negative number for a reduced price).\r\n            \r\n    NOT REQUIRED if just calling is \"Shipping\", then total can be listed in the field ConsumerShippingCharge only."
          format: double
        consumerShippingCharge:
          type: number
          description: >-
            Amount charged to the Consumer for  Shipping (may be 0), which is
            non-taxable.  If combined as one total with Handling, then the total
            amount is taxable.
          format: double
        salesTaxAmount:
          type: number
          description: "Applicable Sales Tax Amount charged to the Consumer.   Must be calculated prior to deducting the Rebate amount.\r\nThis value will be verified and may be re-calculated by WineDirect Fulfillment"
          format: double
        totalChargeToConsumer:
          type: number
          description: "Total amount charged to the end Consumer.  Must equal the sum of all SKU sub-totals and all other charges minus the Rebate.\r\nThis value is verified and may be re-calculated by WineDirect Fulfillment."
          format: double
        consumerInsurance:
          type: number
          description: Insurance charged for this order
          format: double
        vasOrderPersonalizations:
          type: array
          items:
            $ref: '#/components/schemas/VasOrderPersonalization'
          description: Value added service personalizations
          nullable: true
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/OrderImportLineItem'
          description: The line items to ship (1-18 max)
          nullable: true
        soldToAddress:
          $ref: '#/components/schemas/AddressNonValidatedApi'
        shipToAddress:
          $ref: '#/components/schemas/AddressApi'
        deliverToAddress:
          $ref: '#/components/schemas/AddressApi'
        deliverAddressType:
          type: string
          description: "Indicates the type of delivery address being submitted, currently the only supported carrier is FEDEX or UPS\r\n            \r\n    FEDEX_LOCATION : for HAL addresses.\r\n    UPS_ACCESSPOINT : for UPS Access Point addresses."
          nullable: true
        soldToId:
          maxLength: 80
          type: string
          description: Submitting system sold to record identifier.
          nullable: true
        shipToId:
          maxLength: 80
          type: string
          description: Ship-To Consumer ID
          nullable: true
        deliveryAddressId:
          maxLength: 80
          type: string
          description: "If a FedEx Hold at Location (HAL) address is submitted the corresponding LocationID from the FindFedExLocations service should submitted in this element.\r\n            \r\n    SEE: DeliveryAddress_Type"
          nullable: true
        deliveryToConsumerId:
          maxLength: 80
          type: string
          description: Submitting system deliver to record identifier.
          nullable: true
        soldToPhone:
          maxLength: 80
          type: string
          description: Phone (no extensions listed)
          nullable: true
        shipToPhone:
          maxLength: 80
          type: string
          description: Phone (no extensions listed)
          nullable: true
        deliverToPhone:
          maxLength: 80
          type: string
          description: Phone (no extensions listed)
          nullable: true
        soldToEmail:
          maxLength: 240
          type: string
          description: Email
          nullable: true
        shipToEmail:
          maxLength: 240
          type: string
          description: Email
          nullable: true
        deliverToEmail:
          maxLength: 240
          type: string
          description: Email
          nullable: true
      additionalProperties: false
      description: The detail information on the order import details
    OrderImportResponse:
      type: object
      properties:
        notifications:
          type: array
          items:
            $ref: '#/components/schemas/OrderImportNotification'
          description: What happened, good or bad
          nullable: true
        isSuccess:
          type: boolean
        isWarning:
          type: boolean
      additionalProperties: false
    VasOrderPersonalization:
      required:
        - type
      type: object
      properties:
        lineNumber:
          type: integer
          description: >-
            The line number of the SKU this personalization is assigned to. Not
            required for order header
          format: int32
          nullable: true
        type:
          maxLength: 80
          minLength: 1
          type: string
        message:
          maxLength: 2000
          type: string
          description: Messaging about the set of value added services
          nullable: true
        options:
          type: array
          items:
            $ref: '#/components/schemas/VasOrderPersonalizationOption'
          description: A collection of specific value added services
          nullable: true
      additionalProperties: false
      description: A set of value added services
    OrderImportLineItem:
      required:
        - lineNumber
        - quantity
        - sku
      type: object
      properties:
        lineNumber:
          minLength: 1
          type: string
          description: The line number of this item
        sku:
          minLength: 1
          type: string
          description: Customer's SKU -  Item order for the line being submitted
        quantity:
          type: integer
          description: Quantity of items ordered for the line being submitted
          format: int32
        unitPrice:
          type: number
          description: "Price charged to the end Consumer, per SKU.  In price posting states for wine, the amount must equal that posted.\r\nIt will be verified by WineDirect Fulfillment and corrected if necessary."
          format: double
        vasOrderPersonalizations:
          type: array
          items:
            $ref: '#/components/schemas/VasOrderPersonalization'
          description: Value added service personalizations
          nullable: true
      additionalProperties: false
      description: The line items to ship
    AddressNonValidatedApi:
      type: object
      properties:
        firstName:
          maxLength: 80
          type: string
          nullable: true
        middleName:
          maxLength: 80
          type: string
          nullable: true
        lastName:
          maxLength: 80
          type: string
          nullable: true
        companyName:
          maxLength: 80
          type: string
          nullable: true
        address1:
          maxLength: 80
          type: string
          nullable: true
        address2:
          maxLength: 80
          type: string
          nullable: true
        address3:
          maxLength: 80
          type: string
          nullable: true
        city:
          maxLength: 80
          type: string
          nullable: true
        stateOrProvince:
          maxLength: 22
          type: string
          nullable: true
        postalCode:
          maxLength: 22
          type: string
          nullable: true
        countryCode:
          maxLength: 22
          type: string
          default: US
          nullable: true
      additionalProperties: false
      description: A standard Address object
    AddressApi:
      type: object
      properties:
        firstName:
          maxLength: 80
          type: string
          nullable: true
        middleName:
          maxLength: 80
          type: string
          nullable: true
        lastName:
          maxLength: 80
          type: string
          nullable: true
        companyName:
          maxLength: 80
          type: string
          nullable: true
        address1:
          maxLength: 80
          type: string
          nullable: true
        address2:
          maxLength: 80
          type: string
          nullable: true
        address3:
          maxLength: 80
          type: string
          nullable: true
        city:
          maxLength: 80
          type: string
          nullable: true
        stateOrProvince:
          maxLength: 2
          type: string
          nullable: true
        postalCode:
          maxLength: 10
          type: string
          nullable: true
        countryCode:
          maxLength: 2
          type: string
          default: US
          nullable: true
      additionalProperties: false
      description: A standard Address object
    OrderImportNotification:
      type: object
      properties:
        message:
          type: string
          description: Tell me about the notification
          nullable: true
        kind:
          $ref: '#/components/schemas/NotificationColorTypeEnum'
        sourceOfNotification:
          type: string
          description: >-
            The source of why there is a notification. For example, the Order ID
            of an error
          nullable: true
      additionalProperties: false
    VasOrderPersonalizationOption:
      required:
        - type
      type: object
      properties:
        type:
          maxLength: 80
          minLength: 1
          type: string
          description: The type of the value added service. Eg a ribbon
        option:
          maxLength: 80
          type: string
          description: An option applied to the type. eg the color of the type's ribbon.
          nullable: true
        message:
          maxLength: 2000
          type: string
          description: Messaging about the value added service
          nullable: true
      additionalProperties: false
    NotificationColorTypeEnum:
      enum:
        - NotSet
        - Error
        - Warning
        - Success
      type: string
  securitySchemes:
    Bearer:
      type: apiKey
      description: 'Enter the Bearer AccessToken;  Example: ''Bearer 12345abcdef'''
      name: Authorization
      in: header

````