openapi: 3.0.0
info:
  version: SALESORDER
  title: 
  description: Sales Order
servers:
  - url: http://localhost:8094/
paths:
  /SalesOrders:
    get:
      description: ''
      operationId: 'getSalesOrders'
      parameters:
        - in: query
          name: createdon
          description: The date the item was created
          required: false
          schema:
            type: string
            format: date
        - in: query
          name: updatedon
          description: The date the item was last updated
          required: false
          schema:
            type: string
            format: date
      responses:
        200:
          description: A paged collection of items including a total count of matches
          content: 
            application/json:
              schema:
                $ref: '#/components/schemas/SalesOrdersCollection'
        403:
          description: A security issue occured, an incorrect API key is the most likely cause
        400:
          description: An incorrect query parameter or condition
    post:
      description: ''
      operationId: 'createNewSalesOrders'
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SalesOrders_Write'
      responses:
        200:
          description: The post was successful
          content: 
            application/json:
              schema:
                $ref: '#/components/schemas/PostResponse'
        403:
          description: A security issue occured, an incorrect API key is the most likely cause
    put:
      description: ''
      operationId: 'updateSalesOrders'
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SalesOrders_Write'
      responses:
        200:
          description: The put was successful
          content: 
            application/json:
              schema:
                $ref: '#/components/schemas/PutResponse'
        403:
          description: A security issue occured, an incorrect API key is the most likely cause
  /SalesOrders/{id}:
    get:
      description: ''
      operationId: 'getSalesOrdersById'
      parameters:
        - in: path
          name: id
          description: 'The ID of the item'
          required: true
          schema:
            type: integer
      responses:
        200:
          description: A single 
          content: 
            application/json:
              schema:
                $ref: '#/components/schemas/SalesOrders'
        403:
          description: A security issue occured, an incorrect API key is the most likely cause
        400:
          description: An incorrect query parameter or condition
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
  schemas:
    PostResponse:
      type: object
      properties:
        Status:
          type: string
        Message:
          type: string
        QueueEntryId:
          type: integer
        Data:
          type: array
          items:
            type: object
            properties:
              Id:
                type: integer
              TypeName:
                type: string
              Info:
                type: string
    PutResponse:
      type: object
      properties:
        Status:
          type: string
        Message:
          type: string
        QueueEntryId:
          type: integer
        Data:
          type: array
          items:
            type: object
            properties:
              Id:
                type: integer
              TypeName:
                type: string
              Info:
                type: string
    SalesOrders:
      type: object
      properties:
        ID:
          type: integer
          format: int64
        UpdatedOn:
          type: string
          format: date
        CreatedOn:
          type: string
          format: date
        Number:
          type: string
        Customer:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Name:
              type: string
            Mobile:
              type: string
        Deposits:
          type: array
          items:
            type: object
            properties:
              ID:
                type: integer
                format: int64
              UpdatedOn:
                type: string
                format: date
              CreatedOn:
                type: string
                format: date
              DepositReceived:
                type: number
        AlternateReference:
          type: string
        Items:
          type: array
          items:
            type: object
            properties:
              ID:
                type: integer
                format: int64
              UpdatedOn:
                type: string
                format: date
              CreatedOn:
                type: string
                format: date
              Product:
                type: object
                properties:
                  ID:
                    type: integer
                    format: int64
                  UpdatedOn:
                    type: string
                    format: date
                  CreatedOn:
                    type: string
                    format: date
                  Code:
                    type: string
                  Description:
                    type: string
              NetAmount:
                type: number
              Quantity:
                type: number
              Description:
                type: string
              TaxAmount:
                type: number
              GrossAmount:
                type: number
              NetPrice:
                type: number
              GrossAmount:
                type: number
              NetAmountBase:
                type: number
              NetPriceLessDiscount:
                type: number
              NetPriceBase:
                type: number
              PriceSource:
                type: string
              DiscountPercentage:
                type: number
              GrossPriceDiscountAmount:
                type: number
        DeliveryContact:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            FullName:
              type: string
            FirstName:
              type: string
            LastName:
              type: string
            Address:
              type: object
              properties:
                ID:
                  type: integer
                  format: int64
                UpdatedOn:
                  type: string
                  format: date
                CreatedOn:
                  type: string
                  format: date
                AddressLine1:
                  type: string
                AddressLine2:
                  type: string
                AddressLine3:
                  type: string
                AddressLine4:
                  type: string
                City:
                  type: string
                County:
                  type: string
                Country:
                  type: object
                  properties:
                    ID:
                      type: integer
                      format: int64
                    UpdatedOn:
                      type: string
                      format: date
                    CreatedOn:
                      type: string
                      format: date
                    Code:
                      type: string
                    Name:
                      type: string
                PostCode:
                  type: string
            Phone:
              type: string
            Mobile:
              type: string
            EmailAddress:
              type: string
            CompanyName:
              type: string
        SalesRep:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Name:
              type: string
        Branch:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Description:
              type: string
        WorkflowStatus:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Description:
              type: string
        InternalInstructions:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Text:
              type: string
        Source:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Description:
              type: string
        Receipts:
          type: array
          items:
            type: object
            properties:
              ID:
                type: integer
                format: int64
              UpdatedOn:
                type: string
                format: date
              CreatedOn:
                type: string
                format: date
              Amount:
                type: number
              ReceiptType:
                type: object
                properties:
                  ID:
                    type: integer
                    format: int64
                  UpdatedOn:
                    type: string
                    format: date
                  CreatedOn:
                    type: string
                    format: date
                  Code:
                    type: string
                  Description:
                    type: string
                  Currency:
                    type: object
                    properties:
                      ID:
                        type: integer
                        format: int64
                      UpdatedOn:
                        type: string
                        format: date
                      CreatedOn:
                        type: string
                        format: date
                      Code:
                        type: string
                      Description:
                        type: string
        Particulars:
          type: string
        Contact:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            FullName:
              type: string
        SalesContact:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            FullName:
              type: string
        DeliveryNetAmount:
          type: number
        DeliveryAgent:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Description:
              type: string
        DeliveryAgentService:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Description:
              type: string
        DeliveryAgentServiceChargeTypeOverride:
          type: string
        OrderType:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Description:
              type: string
        DeliveryMethod:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Code:
              type: string
            Description:
              type: string
        TransactionDeliveryContact:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            FirstName:
              type: string
            LastName:
              type: string
            Address:
              type: object
              properties:
                ID:
                  type: integer
                  format: int64
                UpdatedOn:
                  type: string
                  format: date
                CreatedOn:
                  type: string
                  format: date
                AddressLine1:
                  type: string
                AddressLine2:
                  type: string
                AddressLine3:
                  type: string
                AddressLine4:
                  type: string
                City:
                  type: string
                Country:
                  type: object
                  properties:
                    ID:
                      type: integer
                      format: int64
                    UpdatedOn:
                      type: string
                      format: date
                    CreatedOn:
                      type: string
                      format: date
                    Code:
                      type: string
                    Name:
                      type: string
                PostCode:
                  type: string
            Phone:
              type: string
            Mobile:
              type: string
            EmailAddress:
              type: string
            FullName:
              type: string
            CompanyName:
              type: string
        CashCustomer:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            FullName:
              type: string
            Name:
              type: string
            FirstName:
              type: string
            LastName:
              type: string
            Address:
              type: object
              properties:
                ID:
                  type: integer
                  format: int64
                UpdatedOn:
                  type: string
                  format: date
                CreatedOn:
                  type: string
                  format: date
                AddressLine1:
                  type: string
                AddressLine2:
                  type: string
                AddressLine3:
                  type: string
                City:
                  type: string
                County:
                  type: string
                Country:
                  type: object
                  properties:
                    ID:
                      type: integer
                      format: int64
                    UpdatedOn:
                      type: string
                      format: date
                    CreatedOn:
                      type: string
                      format: date
                    Code:
                      type: string
                    Name:
                      type: string
                PostCode:
                  type: string
            Phone:
              type: string
            Mobile:
              type: string
            EmailAddress:
              type: string
        DeliveryGrossAmount:
          type: number
        DeliveryInstructions:
          type: object
          properties:
            ID:
              type: integer
              format: int64
            UpdatedOn:
              type: string
              format: date
            CreatedOn:
              type: string
              format: date
            Text:
              type: string
    SalesOrders_Write:
      type: object
      properties:
        ID:
          type: integer
          format: int64
        UpdatedOn:
          type: string
          format: date
        CreatedOn:
          type: string
          format: date
        Number:
          type: string
        Customer:
          type: number
        Deposits:
          type: array
          items:
            type: object
            properties:
              ID:
                type: integer
                format: int64
              UpdatedOn:
                type: string
                format: date
              CreatedOn:
                type: string
                format: date
              DepositReceived:
                type: number
        AlternateReference:
          type: string
        Items:
          type: array
          items:
            type: object
            properties:
              ID:
                type: integer
                format: int64
              UpdatedOn:
                type: string
                format: date
              CreatedOn:
                type: string
                format: date
              Product:
                type: number
              NetAmount:
                type: number
              Quantity:
                type: number
              Description:
                type: string
              TaxAmount:
                type: number
              GrossAmount:
                type: number
              NetPrice:
                type: number
              GrossAmount:
                type: number
              NetAmountBase:
                type: number
              NetPriceLessDiscount:
                type: number
              NetPriceBase:
                type: number
              PriceSource:
                type: string
              DiscountPercentage:
                type: number
              GrossPriceDiscountAmount:
                type: number
        DeliveryContact:
          type: number
        SalesRep:
          type: number
        Branch:
          type: number
        WorkflowStatus:
          type: number
        InternalInstructions:
          type: number
        Source:
          type: number
        Receipts:
          type: array
          items:
            type: object
            properties:
              ID:
                type: integer
                format: int64
              UpdatedOn:
                type: string
                format: date
              CreatedOn:
                type: string
                format: date
              Amount:
                type: number
              ReceiptType:
                type: number
        Particulars:
          type: string
        Contact:
          type: number
        SalesContact:
          type: number
        DeliveryNetAmount:
          type: number
        DeliveryAgent:
          type: number
        DeliveryAgentService:
          type: number
        DeliveryAgentServiceChargeTypeOverride:
          type: string
        OrderType:
          type: number
        DeliveryMethod:
          type: number
        TransactionDeliveryContact:
          type: number
        CashCustomer:
          type: number
        DeliveryGrossAmount:
          type: number
        DeliveryInstructions:
          type: number
    SalesOrdersCollection:
      type: object
      properties:
        TotalCount:
          type: integer
        Data:
          type: array
          items:
            $ref: '#/components/schemas/SalesOrders'
security:
  - apiKey: []
