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

# Bulk Add or Update SalesOrder.



## OpenAPI

````yaml /api-reference/openapi.json post /openapi/v1/SalesOrders/BulkUpsert
openapi: 3.0.1
info:
  title: OmniServices Web API
  version: v1
servers:
  - url: https://api.oplog.one
    description: Production Server
  - url: https://api.staging.oplog.one
    description: Staging Server
security:
  - Authorization: []
paths:
  /openapi/v1/SalesOrders/BulkUpsert:
    post:
      tags:
        - SalesOrders
      summary: Bulk Add or Update SalesOrder.
      parameters:
        - name: X-Tenant-Id
          in: header
          description: If you want to emulate, please enter TenantId.
          schema:
            type: string
      requestBody:
        content:
          application/json-patch+json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CreateSalesOrderRequestDTO'
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CreateSalesOrderRequestDTO'
          text/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CreateSalesOrderRequestDTO'
          application/*+json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/CreateSalesOrderRequestDTO'
      responses:
        '200':
          description: Success
components:
  schemas:
    CreateSalesOrderRequestDTO:
      required:
        - billingAddress
        - customer
        - lineItems
        - referenceNumber
        - shippingAddress
      type: object
      properties:
        referenceNumber:
          type: string
        salesChannel:
          type: string
        orderCreatedAt:
          type: string
          format: date-time
        customer:
          $ref: '#/components/schemas/CreateCustomerRequestDTO'
        shippingAddress:
          $ref: '#/components/schemas/CreateAddressRequestDTO'
        billingAddress:
          $ref: '#/components/schemas/CreateAddressRequestDTO'
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/CreateSalesOrderLineItemRequestDTO'
        payment:
          $ref: '#/components/schemas/CreateSalesOrderPaymentRequestDTO'
        cargo:
          $ref: '#/components/schemas/CreateSalesOrderCargoRequestDTO'
        vas:
          $ref: '#/components/schemas/SyncSalesOrderVASRequestDTO'
        integrationId:
          type: string
          format: uuid
      additionalProperties: false
    CreateCustomerRequestDTO:
      type: object
      properties:
        email:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        phone:
          type: string
      additionalProperties: false
      required:
        - email
        - firstName
        - lastName
        - phone
    CreateAddressRequestDTO:
      type: object
      properties:
        addressFirstName:
          type: string
        addressLastName:
          type: string
        company:
          type: string
        addressOne:
          type: string
        addressTwo:
          type: string
        district:
          type: string
        city:
          type: string
        postalCode:
          type: string
        country:
          type: string
        addressPhone:
          type: string
        taxOffice:
          type: string
        taxNumber:
          type: string
      additionalProperties: false
    CreateSalesOrderLineItemRequestDTO:
      required:
        - amountInOrder
      type: object
      properties:
        amountInOrder:
          type: integer
          format: int32
        sku:
          type: string
        productSalePrice:
          type: number
          format: double
        currency:
          $ref: '#/components/schemas/Currency'
      additionalProperties: false
    CreateSalesOrderPaymentRequestDTO:
      required:
        - paymentOption
      type: object
      properties:
        paymentOption:
          $ref: '#/components/schemas/PaymentOption'
        totalPaymentAmount:
          type: number
          format: double
        currency:
          $ref: '#/components/schemas/Currency'
      additionalProperties: false
    CreateSalesOrderCargoRequestDTO:
      required:
        - cargoType
      type: object
      properties:
        cargoCarrier:
          type: string
        cargoDocumentUrl:
          type: string
        cargoCode:
          type: string
        cargoType:
          $ref: '#/components/schemas/CargoType'
        expectedShipmentDate:
          type: string
          format: date-time
      additionalProperties: false
    SyncSalesOrderVASRequestDTO:
      type: object
      properties:
        packageNote:
          type: string
        giftVAS:
          $ref: '#/components/schemas/CreateSalesOrderGiftVASRequestDTO'
        documentVAS:
          $ref: '#/components/schemas/CreateSalesOrderDocumentVASRequestDTO'
      additionalProperties: false
    Currency:
      enum:
        - TRY
        - USD
        - EUR
        - GBP
        - RUB
        - UAH
        - UNSUPPORTED
        - AFN
        - ALL
        - AOA
        - ARS
        - AMD
        - AWG
        - AZN
        - BSD
        - BHD
        - BDT
        - BBD
        - BYN
        - BZD
        - BMD
        - BTN
        - BOB
        - BAM
        - BWP
        - BRL
        - BGN
        - BIF
        - KHR
        - CAD
        - CVE
        - KYD
        - CLP
        - CNY
        - COP
        - KMF
        - CDF
        - CRC
        - HRK
        - CUP
        - CZK
        - DJF
        - DOP
        - EGP
        - ERN
        - SZL
        - ETB
        - FKP
        - FJD
        - XAF
        - GMD
        - GEL
        - GHS
        - GIP
        - DKK
        - GTQ
        - GNF
        - GYD
        - HTG
        - HNL
        - HUF
        - ISK
        - INR
        - IDR
        - IRR
        - IQD
        - JMD
        - JPY
        - KZT
        - KES
        - KPW
        - KRW
        - KWD
        - KGS
        - LAK
        - LBP
        - LSL
        - LRD
        - LYD
        - MOP
        - HKD
        - MGA
        - MWK
        - MYR
        - MVR
        - MUR
        - MXN
        - MDL
        - MNT
        - MZN
        - MMK
        - NAD
        - NPR
        - NIO
        - NGN
        - MKD
        - NOK
        - OMR
        - PKR
        - ILS
        - JOD
        - PAB
        - PGK
        - PYG
        - PEN
        - PHP
        - NZD
        - PLN
        - QAR
        - RON
        - RWF
        - DZD
        - MRU
        - MAD
        - SHP
        - XCD
        - WST
        - STN
        - SAR
        - RSD
        - SCR
        - SLL
        - SGD
        - BND
        - ANG
        - SBD
        - SOS
        - ZAR
        - SSP
        - LKR
        - SDG
        - SRD
        - SEK
        - CHF
        - SYP
        - TWD
        - TJS
        - TZS
        - THB
        - XOF
        - TOP
        - TTD
        - TND
        - TMT
        - AUD
        - UGX
        - AED
        - UYU
        - UZS
        - VUV
        - VES
        - VED
        - VND
        - XPF
        - YER
        - ZMW
      type: string
    PaymentOption:
      enum:
        - Paid
        - Cash
        - CreditCard
      type: string
    CargoType:
      enum:
        - RegularDelivery
        - SameDayDelivery
        - ScheduledDelivery
        - ManualDelivery
      type: string
    CreateSalesOrderGiftVASRequestDTO:
      required:
        - giftWrap
      type: object
      properties:
        giftWrap:
          type: boolean
        giftNotes:
          type: string
      additionalProperties: false
    CreateSalesOrderDocumentVASRequestDTO:
      type: object
      properties:
        documentUrl:
          type: string
      additionalProperties: false
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: Authorization

````