openapi: 3.0.1
info:
  title: Customer.API
  version: '1'
servers:
  - url: https://uat-api.flipgroup.com.au/customers
paths:
  '/{accountId}/consignments':
    get:
      tags:
        - Consignments
      summary: Finds Consignments for the specified account
      parameters:
        - name: accountId
          in: path
          description: "The account id to find consignments for.\r\n            Any child accounts of accountId will also be searched.\r\n            A child account may be specified in accountId to narrow the search."
          required: true
          schema:
            type: integer
            format: int32
        - name: dateFrom
          in: query
          description: The earliest dispatch date of the consignment
          schema:
            type: string
            format: date
            example: '2024-08-29'
        - name: dateTo
          in: query
          description: The latest dispatch date of the consignment
          schema:
            type: string
            format: date
            example: '2024-08-29'
        - name: reference
          in: query
          description: "A Reference or ConNote to search for.\r\nCannot be combined with TrackingNumber"
          schema:
            type: string
        - name: trackingNumber
          in: query
          description: "A tracking number or barcode to search for.\r\nCannot be combined with Reference"
          schema:
            type: string
        - name: maxResults
          in: query
          description: 'Maximum results, default 50. Up to 1000 results may be requested'
          schema:
            type: integer
            format: int32
            example: 50
          example: 50
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FindConsignmentsResponseModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - IsAuthorizedAccount
        - apiKeyQuery:
            - IsAuthorizedAccount
    post:
      tags:
        - Consignments
      summary: Creates a Consignment from the CreateConsignmentRequest for the specified account
      parameters:
        - name: accountId
          in: path
          description: "The account id to which the consignment will be assigned.\r\n            This can be the account id of the account making the request,\r\n            or any child account of the account making the request."
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: An object containing the data necessary to create a new consignment
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateConsignmentRequest'
              description: Class representing a request to create a new consignment
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateConsignmentRequest'
              description: Class representing a request to create a new consignment
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateConsignmentRequest'
              description: Class representing a request to create a new consignment
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateConsignmentResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - IsAuthorizedAccount
        - apiKeyQuery:
            - IsAuthorizedAccount
  '/{accountId}/consignments/{consignmentId}':
    get:
      tags:
        - Consignments
      summary: Gets a specific consignment by Id
      parameters:
        - name: accountId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
        - name: consignmentId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetConsignmentsResponseModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - CanAccessConsignment
            - IsAuthorizedAccount
        - apiKeyQuery:
            - CanAccessConsignment
            - IsAuthorizedAccount
  '/{accountId}/consignments/{consignmentId}/references':
    post:
      tags:
        - Consignments
      summary: Adds a reference to a Consignment
      parameters:
        - name: accountId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
        - name: consignmentId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/AddReferenceRequest'
              description: A request to add a reference to an existing consignment
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/AddReferenceRequest'
              description: A request to add a reference to an existing consignment
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/AddReferenceRequest'
              description: A request to add a reference to an existing consignment
      responses:
        '200':
          description: Success
        '400':
          description: 'The new reference is empty, the accountId does not match, or the consignment is not in a modifiable state (e.g. has been manifested)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - IsAuthorizedAccount
        - apiKeyQuery:
            - IsAuthorizedAccount
  '/{accountId}/consignments/{consignmentId}/label':
    get:
      tags:
        - Consignments
      summary: Generate label for the consignment.
      parameters:
        - name: accountId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
        - name: consignmentId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int64
        - name: reference
          in: query
          description: 'Optional: Only produce labels for shipping items with this reference'
          schema:
            type: string
      responses:
        '200':
          description: The labels as a PDF file
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The reference was not found on any of the shipping items for this consignment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - CanAccessConsignment
            - IsAuthorizedAccount
        - apiKeyQuery:
            - CanAccessConsignment
            - IsAuthorizedAccount
  '/{accountId}/consignments/{consignmentId}/connote':
    get:
      tags:
        - Consignments
      summary: "Generate connote for the consignment.\r\nDangerous goods paperwork can be included."
      parameters:
        - name: accountId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
        - name: consignmentId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int64
        - name: includeDG
          in: query
          description: Boolean value indicating whether the connote paperwork should also include dangerous goods paperwork if consignment has dangerous goods. Default is false.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Success
        '400':
          description: Bad Request
          content:
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - CanAccessConsignment
            - IsAuthorizedAccount
        - apiKeyQuery:
            - CanAccessConsignment
            - IsAuthorizedAccount
  '/{accountId}/consignments/{consignmentId}/proofofdeliveries':
    get:
      tags:
        - Consignments
      summary: Gets all of a consignment's proof of delivery documents.
      parameters:
        - name: accountId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
        - name: consignmentId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetProofOfDeliveriesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - CanAccessConsignment
            - IsAuthorizedAccount
        - apiKeyQuery:
            - CanAccessConsignment
            - IsAuthorizedAccount
  '/custom-request/{customRequestPath}':
    post:
      tags:
        - CustomRequest
      summary: Handles a request that's in a customer-specific format
      parameters:
        - name: customRequestPath
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - IsAuthenticated
        - apiKeyQuery:
            - IsAuthenticated
  /locations:
    get:
      tags:
        - Locations
      summary: 'Gets the location specified by locality, postcode and country code. Returns 404 Not Found if the location is not found.'
      parameters:
        - name: locality
          in: query
          description: The locality/suburb (exact match)
          required: true
          schema:
            type: string
          example: Melbourne
        - name: postcode
          in: query
          description: The postcode (exact match)
          required: true
          schema:
            type: string
          example: '3000'
        - name: countryCode
          in: query
          description: The ISO2 Country Code. (exact match)
          required: true
          schema:
            type: string
          example: AU
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - IsAuthenticated
        - apiKeyQuery:
            - IsAuthenticated
  '/{accountId}/orderlookup':
    post:
      tags:
        - OrderLookup
      summary: Creates an Order that can be looked up by reference within OneFlo.
      parameters:
        - name: accountId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/OrderLookupModel'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/OrderLookupModel'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/OrderLookupModel'
      responses:
        '200':
          description: Success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - IsAuthorizedAccount
        - apiKeyQuery:
            - IsAuthorizedAccount
  '/{accountId}/quotes':
    post:
      tags:
        - Quotes
      summary: 'Creates and returns a Quote based on the provided information. While most properties are optional, the more information provided the more accurate the quote.'
      parameters:
        - name: accountId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateQuoteRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateQuoteRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateQuoteRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateQuoteResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - IsAuthorizedAccount
        - apiKeyQuery:
            - IsAuthorizedAccount
  '/{accountId}/scans':
    get:
      tags:
        - Scans
      summary: Finds Scans for the specified account
      parameters:
        - name: accountId
          in: path
          description: "The account id of the consignment to find scans for.\r\n            Any child accounts of accountId will also be searched.\r\n            A child account may be specified in accountId to narrow the search."
          required: true
          schema:
            type: integer
            format: int32
        - name: nextScanId
          in: query
          description: "When specified, returns scan events created from this point.\r\nRequired when CreatedFrom is not specified.\r\nShould be populated from the NextScanId returned in a previous response."
          schema:
            type: integer
            format: int64
        - name: createdFrom
          in: query
          description: "When specified, returns scan events created from this time.\r\nRequired when NextScanId is not specified.\r\nThis time is the time scan matched with a consignment, not necessarily the time of the scan event."
          schema:
            type: string
            format: date-time
            example: '2023-11-27T23:15:30+11:00'
          example: '2023-11-27T23:15:30+11:00'
        - name: createdTo
          in: query
          description: "Optional: When specified, returns scan events created up to this time.\r\nThis time is the time scan matched with a consignment, not necessarily the time of the scan event."
          schema:
            type: string
            format: date-time
            example: '2023-11-27T23:15:45+11:00'
          example: '2023-11-27T23:15:45+11:00'
        - name: maxResults
          in: query
          description: 'Maximum results, default 1000. Up to 1000 results may be requested'
          schema:
            type: integer
            format: int32
            example: 1000
          example: 1000
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FindScansResponseModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - IsAuthorizedAccount
        - apiKeyQuery:
            - IsAuthorizedAccount
  '/{accountId}/services':
    get:
      tags:
        - Services
      summary: Gets a list of contracted services for the account. Previously "GetStandardServices"
      parameters:
        - name: accountId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ServiceResponseModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - apiKeyHeader:
            - IsAuthorizedAccount
        - apiKeyQuery:
            - IsAuthorizedAccount
components:
  schemas:
    AddReferenceRequest:
      required:
        - reference
      type: object
      properties:
        reference:
          maxLength: 20
          type: string
          description: "Internal reference to be added to this Consignment.\r\nIf it already exists (case insensitive match) then no changes will be made.\r\nMaximum length of 20 ANSI characters.\r\n\r\nPossible validation errors:\r\n- 'Reference' must not be empty.\r\n- The length of 'Reference' must be 20 characters or fewer. You entered {TotalLength} characters.\r\n- 'Reference' must not start with whitespace\r\n- 'Reference' must not end with whitespace"
      additionalProperties: false
      description: A request to add a reference to an existing consignment
    Address:
      type: object
      properties:
        name:
          type: string
          description: Addressee Name
          nullable: true
          example: Sample Receiver
        line1:
          type: string
          description: Address Line 1
          nullable: true
          example: 123 Sample Road
        line2:
          type: string
          description: Address Line 2
          nullable: true
          example: Receiving Dock 2
        suburb:
          type: string
          description: 'The suburb, town or locality'
          nullable: true
          example: MELBOURNE
        state:
          type: string
          description: The state or province in which the address is located
          nullable: true
          example: VIC
        postcode:
          type: string
          description: The postcode for the address
          nullable: true
          example: '3000'
        country:
          type: string
          description: 'The ISO2 Country Code, eg "AU"'
          nullable: true
          example: AU
        contactName:
          type: string
          description: The name of the person to contact at the address
          nullable: true
          example: Sample Contact
        phone:
          type: string
          description: The phone number of the contact
          nullable: true
          example: 0411 999 999
        email:
          type: string
          description: The email address of the receiver contact
          nullable: true
          example: contact@example.com
        instructions:
          type: string
          description: Any instructions or notes specific to this address
          nullable: true
        atl:
          type: boolean
          description: 'Authority to Leave. If true, Authority to leave is given when this address is a receiver address.'
          nullable: true
        isResidential:
          type: boolean
          description: 'If true, the address is residential. Defaults to false.'
      additionalProperties: false
    Consignment:
      type: object
      properties:
        consignmentId:
          type: integer
          description: The Id of the consignment in the database
          format: int64
        consignmentNote:
          type: string
          description: The Consignment Note (Connote) assigned to this Consignment by the database
          nullable: true
        consignmentType:
          allOf:
            - $ref: '#/components/schemas/ConsignmentTypes'
          description: 'The type of consignment, one of "Pickup" (default), "Transfer", or "Return"'
        reference:
          type: string
          description: A reference for the Consignment specified by the sender.
          nullable: true
        accountId:
          type: integer
          description: The Account ID to which this Consignment belongs
          format: int32
        dispatchDate:
          type: string
          description: The date on which the Consignment was / is to be manifested and released using the local time at the dispatch location.
          format: date
          example: '2023-01-16'
        readyAt:
          type: string
          description: The local time at the dispatch location at which the Consignment will be ready for pick up.
          nullable: true
          example: '15:00'
        closeAt:
          type: string
          description: The local time at the dispatch location at which the dispatch location closes its doors to pickup.
          nullable: true
          example: '17:00'
        service:
          type: string
          description: "The code for the service on which this Consignment is traveling.\r\nYou can get more information with the GET Services endpoint."
          nullable: true
        sender:
          allOf:
            - $ref: '#/components/schemas/Address'
          description: 'The address of the sender, i.e. where to pick up.'
          nullable: true
        receiver:
          allOf:
            - $ref: '#/components/schemas/Address'
          description: The address of the Receiver.
          nullable: true
        itemCount:
          type: integer
          description: "The total number of shipping units.\r\nThis will initially be the sum of known cartons/parcels/etc,\r\nbut may be updated later e.g. if reported by the carrier."
          format: int32
        weightInKilograms:
          type: number
          description: "The overall weight of the consignment in kilograms.\r\nThis will initially be calculated from the ShippingUnits,\r\nbut may be updated later e.g. if reported by the carrier."
          format: double
        volumeInCubicMeters:
          type: number
          description: "The overall volume of the consignment in cubic meters.\r\nThis will initially be calculated from the ShippingUnits,\r\nbut may be updated later e.g. if reported by the carrier."
          format: double
        description:
          type: string
          description: Sender-supplied free-text description of the consignment
          nullable: true
        pickupInstructions:
          type: string
          description: Sender-supplied free-text instructions relating to pickup of the consignment
          nullable: true
        deliveryInstructions:
          type: string
          description: Sender-supplied free-text instructions relating to delivery of the consignment
          nullable: true
        specialInstructions:
          type: string
          description: Machine-generated special instructions relating to the consignment.
          nullable: true
        allowConsolidation:
          type: boolean
          description: "Whether consolidation was allowed for this Consignment.\r\nThis may be different from the value requested at creation time.\r\nFor details, see the doc for 'AllowConsolidation' on the POST consignments call."
        userField1:
          type: string
          description: 'Optional field, as configured in OneFlo.'
          nullable: true
        userField2:
          type: string
          description: 'Optional field, as configured in OneFlo.'
          nullable: true
        userField3:
          type: string
          description: 'Optional field, as configured in OneFlo.'
          nullable: true
        userField4:
          type: string
          description: 'Optional field, as configured in OneFlo.'
          nullable: true
        userField5:
          type: string
          description: 'Optional field, as configured in OneFlo.'
          nullable: true
        thirdPartyAccount:
          type: string
          description: Optional Third Party Account ID.
          nullable: true
        costCenter:
          type: string
          description: Optional Cost-center code.
          nullable: true
        freightRecoveryAmount:
          type: number
          description: Optional Freight Recovery Amount in $AUD.
          format: double
        palletDetails:
          type: array
          items:
            $ref: '#/components/schemas/PalletTypeDetails'
          description: A collection of items specifying the type and quantity of pallets used when manifesting this Consignment.
          nullable: true
        deliveryDateFrom:
          type: string
          description: 'Optional: The local date at the receivers location from which the consignment delivery window starts.'
          format: date
          nullable: true
          example: '2023-01-16'
        deliveryDateTo:
          type: string
          description: 'Optional: The local date at the receivers location at which the consignment delivery window ends.'
          format: date
          nullable: true
          example: '2023-01-20'
        deliveryTimeFrom:
          type: string
          description: 'Optional: The local time at the receivers location at which they start accepting deliveries.'
          nullable: true
          example: '07:30'
        deliveryTimeTo:
          type: string
          description: 'Optional: The local time at the receivers location at which they stop accepting deliveries.'
          nullable: true
          example: '17:00'
        eta:
          type: string
          description: "The ETA of this consignment.\r\nThis is calculated automatically sometime after the consignment is created (may not be present in the Create Consignment response)"
          format: date
          nullable: true
          example: '2024-08-29'
        deliveredAtLocalTime:
          type: string
          description: "The date and time the consignment was delivered and has a proof of delivery available, or null otherwise.\r\nThe timezone is most likely the local time wherever the event happened (sorry, the timezone is not available)."
          nullable: true
          example: '2024-08-29T10:09:36'
        shippingItems:
          type: array
          items:
            $ref: '#/components/schemas/ShippingItem'
          description: The individual shipping items that the Consignment comprises
          nullable: true
        references:
          type: array
          items:
            type: string
          description: Internal sender-specific references for this Consignment
          nullable: true
        scanEvents:
          type: array
          items:
            $ref: '#/components/schemas/ScanEvent'
          description: 'All the scan events for this consignment, if any'
          nullable: true
      additionalProperties: false
      description: The consignment model suitable for saving to / retrieving from ChainIT
    ConsignmentDangerousGoods:
      type: object
      properties:
        unCode:
          type: integer
          description: The UN Code of the dangerous goods
          format: int32
        properShippingName:
          type: string
          description: The Proper Shipping Name of the dangerous goods.
          nullable: true
        name:
          type: string
          description: The name of the dangerous goods as specified by the sender
          nullable: true
        packagingGroup:
          type: string
          description: The Packaging Group
          nullable: true
        class:
          type: string
          description: The Class of Dangerous Goods
          nullable: true
        subsidiaryRisks:
          type: string
          description: 'The subsidiary risks, if any'
          nullable: true
        quantity:
          type: integer
          description: The number of packages or receptacles of the Dangerous Goods
          format: int32
        aggregateQuantity:
          type: number
          description: The aggregate quantity in the specified metric unit of the Dangerous Goods
          format: double
        unit:
          allOf:
            - $ref: '#/components/schemas/DangerousGoodsQuantityUnit'
          description: The unit of measurement - One of KG (Kilograms) or L (Liters)
        receptacle:
          type: string
          description: The type of receptacle the Dangerous Goods are transported in
          nullable: true
      additionalProperties: false
      description: A class representing a Dangerous Goods declaration
    ConsignmentTypes:
      enum:
        - Pickup
        - Return
        - Transfer
      type: string
    CreateConsignmentRequest:
      required:
        - dispatchDate
        - receiver
        - sender
        - service
        - shippingItems
      type: object
      properties:
        consignmentType:
          allOf:
            - $ref: '#/components/schemas/ConsignmentTypes'
          description: 'The type of consignment, one of "Pickup" (default), "Transfer", or "Return". Defaults to "Pickup".'
          example: Pickup
        dispatchDate:
          type: string
          description: "The date the consignment is to be dispatched using the local date at the point of dispatch. \r\nThis is required, and must be today or later.\r\n\r\nPossible validation errors:\r\n- 'DispatchDate' must not be empty.\r\n- 'DispatchDate' must be today or later."
          format: date
          example: '2024-08-30'
        readyAt:
          type: string
          description: "The local time at the dispatch location at which the Consignment will be ready for pick up.\r\nFormat is \"HH:mm\" (24hr).\r\nThis is optional when ConsignmentType is \"Pickup\" as ReadyAt will be determined by account configuration,\r\nbut is required for other values of ConsignmentType.\r\nIf specified, CloseAt must also be specified, and CloseAt must be later than ReadyAt.\r\n\r\nPossible validation errors:\r\n- 'ReadyAt' must be non-null when 'ConsignmentType' is not Pickup."
          nullable: true
          example: 
        closeAt:
          type: string
          description: "The local time at the dispatch location at which the dispatch location closes its doors to pickup.\r\nFormat is \"HH:mm\" (24hr).\r\nThis is optional when ConsignmentType is \"Pickup\" as CloseAt will be determined by account configuration,\r\nbut required for other values of ConsignmentType.\r\nIf specified, ReadyAt must also be specified, and CloseAt must be later than ReadyAt.\r\n\r\nPossible validation errors:\r\n- 'CloseAt' must be non-null when 'ConsignmentType' is not Pickup.\r\n- 'CloseAt' and 'ReadyAt' must both be null or both be non-null.\r\n- If specified, 'CloseAt' must be later than 'ReadyAt'."
          nullable: true
          example: 
        service:
          maxLength: 10
          type: string
          description: "The code for the service on which this Consignment is traveling. This is required. Examples: IPECX, TEE, STEEXP\r\n\r\nPossible validation errors:\r\n- 'Service' must not be empty.\r\n- The length of 'Service' must be 10 characters or fewer. You entered {TotalLength} characters."
          example: PLEASE_SPECIFY
        sender:
          allOf:
            - $ref: '#/components/schemas/SenderAddressModel'
          description: "The address of the sender, i.e. where to pick up. This is required.\r\n\r\nPossible validation errors:\r\n- 'Sender' must not be empty."
        receiver:
          allOf:
            - $ref: '#/components/schemas/ReceiverAddressModel'
          description: "The address of the Receiver. This is required.\r\n\r\nPossible validation errors:\r\n- 'Receiver' must not be empty."
        description:
          maxLength: 30
          type: string
          description: "A free-text description of the consignment.\r\n\r\nPossible validation errors:\r\n- The length of 'Description' must be 30 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: Shipment of 20 widgets
        pickupInstructions:
          maxLength: 80
          type: string
          description: "A free-text instructions relating to pickup of the consignment.\r\n\r\nPossible validation errors:\r\n- The length of 'PickupInstructions' must be 80 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: Use side entrance
        deliveryInstructions:
          maxLength: 80
          type: string
          description: "A free-text instructions relating to delivery of the consignment.\r\n\r\nPossible validation errors:\r\n- The length of 'DeliveryInstructions' must be 80 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: Use delivery door. OK to leave.
        shippingItems:
          type: array
          items:
            $ref: '#/components/schemas/ShippingItemModel'
          description: "The individual shipping items that the Consignment comprises. There must be at least one Shipping Item in this collection.\r\n\r\nPossible validation errors:\r\n- 'ShippingItems' must contain at least one ConsignmentItemModel."
        references:
          type: array
          items:
            maxLength: 20
            type: string
            description: "\r\n\r\nPossible validation errors:\r\n- The length of 'References' must be 20 characters or fewer. You entered {TotalLength} characters."
          description: "Internal references for this Consignment. The first one will become the Consignment-level reference.\r\nMaximum of 10 references. Each has maximum length of 20 ANSI characters.\r\n\r\nPossible validation errors:\r\n- 'References' must contain distinct values (case-insensitive).\r\n- 'References' must contain at most 10 elements."
          nullable: true
        userField1:
          maxLength: 20
          type: string
          description: "Optional field, as configured in OneFlo.\r\n\r\nPossible validation errors:\r\n- The length of 'UserField1' must be 20 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: '506180'
        userField2:
          maxLength: 20
          type: string
          description: "Optional field, as configured in OneFlo.\r\n\r\nPossible validation errors:\r\n- The length of 'UserField2' must be 20 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: Inspected/Confirmed
        userField3:
          maxLength: 20
          type: string
          description: "Optional field, as configured in OneFlo.\r\n\r\nPossible validation errors:\r\n- The length of 'UserField3' must be 20 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: MISC
        userField4:
          maxLength: 20
          type: string
          description: "Optional field, as configured in OneFlo.\r\n\r\nPossible validation errors:\r\n- The length of 'UserField4' must be 20 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: Rest
        userField5:
          maxLength: 20
          type: string
          description: "Optional field, as configured in OneFlo.\r\n\r\nPossible validation errors:\r\n- The length of 'UserField5' must be 20 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: OR-9874152162196
        thirdPartyAccount:
          maxLength: 20
          type: string
          description: "Optional Third Party Account ID.\r\n\r\nPossible validation errors:\r\n- The length of 'ThirdPartyAccount' must be 20 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: '999123'
        costCenter:
          maxLength: 30
          type: string
          description: "Optional Cost-center code.\r\n\r\nPossible validation errors:\r\n- The length of 'CostCenter' must be 30 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: EXPDEL
        freightRecoveryAmount:
          maximum: 1000000
          exclusiveMaximum: false
          minimum: 0
          exclusiveMinimum: false
          type: number
          description: "Optional Freight Recovery Amount in $AUD.\r\n\r\nPossible validation errors:\r\n- 'FreightRecoveryAmount' must be greater than or equal to '0'.\r\n- 'FreightRecoveryAmount' must be less than or equal to '1000000'."
          format: double
          example: 12.35
        palletDetails:
          type: array
          items:
            $ref: '#/components/schemas/PalletTypeDetails'
          description: A collection of items specifying the type and quantity of pallets used when manifesting this Consignment.
          nullable: true
        deliveryDateFrom:
          type: string
          description: "Optional: The local date at the receivers location from which the consignment delivery window starts.\r\n\r\nPossible validation errors:\r\n- 'DeliveryDateFrom' must be today or later."
          format: date
          nullable: true
          example: '2023-01-16'
        deliveryDateTo:
          type: string
          description: "Optional: The local date at the receivers location at which the consignment delivery window ends.\r\n\r\nPossible validation errors:\r\n- 'DeliveryDateTo' cannot be specified unless 'DeliveryDateFrom' is specified.\r\n- 'DeliveryDateTo' cannot be earlier than 'DeliveryDateFrom'."
          format: date
          nullable: true
          example: '2023-01-20'
        deliveryTimeFrom:
          type: string
          description: "Optional: The local time at the receivers location at which they start accepting deliveries.\r\n\r\nPossible validation errors:\r\n- 'DeliveryTimeFrom' cannot be specified unless 'DeliveryDateFrom' is specified."
          nullable: true
          example: '07:30'
        deliveryTimeTo:
          type: string
          description: "Optional: The local time at the receivers location at which they stop accepting deliveries.\r\n\r\nPossible validation errors:\r\n- 'DeliveryTimeTo' cannot be specified unless 'DeliveryDateFrom' is specified.\r\n- 'DeliveryTimeTo' cannot be specified unless 'DeliveryTimeFrom' is specified.\r\n- 'DeliveryTimeTo' cannot be earlier than 'DeliveryTimeFrom'."
          nullable: true
          example: '17:00'
        allowConsolidation:
          type: boolean
          description: "Whether to allow consolidation with an existing consignment that has matching details.\r\nIf not specified, this flag is loaded from OneFlo Account config.\r\n(Some services do not support consolidation. In this case, the consignment creation will still succeed and the result will show `WasConsolidated = false`)"
          nullable: true
          example: 
      additionalProperties: false
      description: Class representing a request to create a new consignment
    CreateConsignmentResponse:
      type: object
      properties:
        consignment:
          allOf:
            - $ref: '#/components/schemas/Consignment'
          description: The consignment model suitable for saving to / retrieving from ChainIT
          nullable: true
        wasConsolidated:
          type: boolean
          description: "Whether this consignment was consolidated with an existing consignment.\r\n\r\nThis can be requested using 'AllowConsolidation' or can be set as a default in OneFlo Account config.\r\nConsolidation only happens if the chosen service supports it."
      additionalProperties: false
    CreateQuoteRequest:
      required:
        - receiver
        - sender
      type: object
      properties:
        effectiveDate:
          type: string
          description: The Effective Date of the quote. Defaults to the current date if not supplied.
          format: date-time
          nullable: true
          example: '2024-04-12'
        sender:
          allOf:
            - $ref: '#/components/schemas/SenderQuoteDetails'
          description: "\r\n\r\nPossible validation errors:\r\n- 'Sender' must not be empty."
        receiver:
          allOf:
            - $ref: '#/components/schemas/ReceiverQuoteDetails'
          description: "\r\n\r\nPossible validation errors:\r\n- 'Receiver' must not be empty."
        noOfItems:
          type: integer
          description: "Number of items\r\n\r\nPossible validation errors:\r\n- When 'Items' is null or empty, 'NoOfItems' must be greater than 0.\r\n- When 'Items' is populated, 'NoOfItems' must either be null or be the sum of 'Items[i].NoOfItems'."
          format: int32
          example: 1
        weight:
          type: number
          description: "Total weight of all items in kgs\r\n\r\nPossible validation errors:\r\n- When 'Items' is null or empty, 'Weight' must be greater than 0.\r\n- When 'Items' is populated, 'Weight' must either be null or be the sum of 'Items[i].NoOfItems * Items[i].Weight'."
          format: double
          example: 15.5
        volume:
          type: number
          description: Total volume of all items in m^3
          format: double
          example: 0.005
        items:
          type: array
          items:
            $ref: '#/components/schemas/QuoteItem'
          description: 'A list of items to get a quote for. If provided the individual NoOfItems, Weight and Volume properties are ignored.'
          nullable: true
        time:
          type: number
          description: Optional:Estimated Travel Time. Recommended not to be used as inaccuracies in time calculation greatly vary quote results.
          format: double
        distance:
          type: number
          description: 'Optional: Estimated Distance between sender and receiver locations. Recommended not to be used as inaccuracies in route taken greatly vary quote results.'
          format: double
        serviceList:
          type: array
          items:
            type: string
          description: 'Optional: Filter quotes to only these services. The code provided here should match the Service'
          nullable: true
          example: 
        containsDangerousGoods:
          type: boolean
          description: ''
          example: false
      additionalProperties: false
    CreateQuoteResponse:
      type: object
      properties:
        services:
          type: array
          items:
            $ref: '#/components/schemas/Quote'
          nullable: true
      additionalProperties: false
    DangerousGoodsModel:
      required:
        - aggregateQuantity
        - class
        - name
        - packagingGroup
        - properShippingName
        - quantity
        - receptacle
        - unCode
        - unit
      type: object
      properties:
        unCode:
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: "The UN Code of the dangerous goods\r\n\r\nPossible validation errors:\r\n- 'UNCode' must be greater than '0'."
          format: int32
          example: 2010
        properShippingName:
          maxLength: 100
          type: string
          description: "The Proper Shipping Name of the dangerous goods.\r\n\r\nPossible validation errors:\r\n- 'ProperShippingName' must not be empty.\r\n- The length of 'ProperShippingName' must be 100 characters or fewer. You entered {TotalLength} characters."
          example: Magnesium hydride
        name:
          maxLength: 100
          type: string
          description: "The name of the dangerous goods as specified by the sender\r\n\r\nPossible validation errors:\r\n- 'Name' must not be empty.\r\n- The length of 'Name' must be 100 characters or fewer. You entered {TotalLength} characters."
          example: H2Mg powder
        packagingGroup:
          maxLength: 3
          type: string
          description: "The Packaging Group (one of I, II or III)\r\n\r\nPossible validation errors:\r\n- 'PackagingGroup' must not be empty.\r\n- The length of 'PackagingGroup' must be 3 characters or fewer. You entered {TotalLength} characters."
          example: I
        class:
          maxLength: 10
          type: string
          description: "The Class of Dangerous Goods\r\n\r\nPossible validation errors:\r\n- 'Class' must not be empty.\r\n- The length of 'Class' must be 10 characters or fewer. You entered {TotalLength} characters."
          example: '4.3'
        subsidiaryRisks:
          maxLength: 20
          type: string
          description: "The subsidiary risks, if any\r\n\r\nPossible validation errors:\r\n- The length of 'SubsidiaryRisks' must be 20 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: '8.1'
        quantity:
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: "The number of packages or receptacles of the Dangerous Goods\r\n\r\nPossible validation errors:\r\n- 'Quantity' must be greater than '0'."
          format: int32
          example: 24
        aggregateQuantity:
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: "The aggregate quantity in the specified metric unit of the Dangerous Goods\r\n\r\nPossible validation errors:\r\n- 'AggregateQuantity' must be greater than '0'."
          format: double
          example: 1.2
        unit:
          allOf:
            - $ref: '#/components/schemas/DangerousGoodsQuantityUnit'
          description: "The unit of measurement - One of \"Kg\" (Kilograms) or \"L\" (Liters)\r\n\r\nPossible validation errors:\r\n- 'Unit' must not be empty."
          example: KG
        receptacle:
          maxLength: 50
          type: string
          description: "The type of receptacle the Dangerous Goods are transported in\r\n\r\nPossible validation errors:\r\n- 'Receptacle' must not be empty.\r\n- The length of 'Receptacle' must be 50 characters or fewer. You entered {TotalLength} characters."
          example: Canister
      additionalProperties: false
    DangerousGoodsQuantityUnit:
      enum:
        - Kg
        - L
      type: string
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          nullable: true
      additionalProperties: false
    FindConsignmentsResponseModel:
      type: object
      properties:
        consignments:
          type: array
          items:
            $ref: '#/components/schemas/Consignment'
          description: An object for each consignment that matched the search
          nullable: true
      additionalProperties: false
      description: Response model for Find Consignments
    FindScansResponseModel:
      type: object
      properties:
        noOfResults:
          type: integer
          description: "Number of scan events returned in ScanEvents.\r\nFor last set of scans, this value will be less than the requested maximum limit."
          format: int32
        nextScanId:
          type: integer
          description: Internal reference which can be used to get the next set of scan events.
          format: int64
          nullable: true
        scanEvents:
          type: array
          items:
            $ref: '#/components/schemas/ScanEventResponseModel'
          description: An object for each scan that matched the search.
          nullable: true
      additionalProperties: false
    GetConsignmentsResponseModel:
      type: object
      properties:
        consignment:
          allOf:
            - $ref: '#/components/schemas/Consignment'
          description: An object containing the consignment
          nullable: true
      additionalProperties: false
      description: Response model for Get Consignment
    GetProofOfDeliveriesResponse:
      type: object
      properties:
        proofOfDeliveries:
          type: array
          items:
            $ref: '#/components/schemas/ProofOfDeliveryBinary'
          nullable: true
      additionalProperties: false
    Location:
      type: object
      properties:
        id:
          type: integer
          description: The Id of the Location as stored in the database.
          format: int32
        locality:
          type: string
          description: The locality/suburb.
          nullable: true
          example: Sydney
        state:
          type: string
          description: The state
          nullable: true
          example: VIC
        postcode:
          type: string
          description: The postcode
          nullable: true
          example: '2000'
        countryCode:
          type: string
          description: The ISO2 Country Code.
          nullable: true
          example: AU
      additionalProperties: false
    OrderLookupModel:
      required:
        - orderReference
      type: object
      properties:
        orderReference:
          type: string
          description: "Mandatory: The primary reference number for your consignment. Also used to look up this order\r\n\r\nPossible validation errors:\r\n- 'OrderReference' must not be empty."
          example: BANANA4
        references:
          type: array
          items:
            type: string
          description: 'Optional: Repeat for as many references you wish to add'
          nullable: true
        thirdPartyAccount:
          type: string
          description: ''
          nullable: true
          example: APPLE36
        costCentre:
          type: string
          description: ''
          nullable: true
          example: APPLE1
        readyAt:
          type: string
          description: "Must be a 24 hour time formatted like HH:mm\r\n\r\nPossible validation errors:\r\n- 'ReadyAt' must be a 24 hour time formatted like HH:mm."
          nullable: true
          example: '16:00'
        closeAt:
          type: string
          description: "Must be a 24 hour time formatted like HH:mm\r\n\r\nPossible validation errors:\r\n- 'CloseAt' must be a 24 hour time formatted like HH:mm."
          nullable: true
          example: '18:00'
        dispatchDate:
          type: string
          description: "DispatchDate must be a date formatted like yyyy-mm-dd\r\n\r\nPossible validation errors:\r\n- 'DispatchDate' must be a date formatted like yyyy-mm-dd."
          nullable: true
          example: '2023-01-16'
        sender:
          allOf:
            - $ref: '#/components/schemas/SenderAddressModel'
          description: "The Sender's address. This doesn't need to be provided for normal Outbound consignments, \r\nit will use the default OneFlo values that are setup for your account if not provided."
          nullable: true
        receiver:
          allOf:
            - $ref: '#/components/schemas/ReceiverAddressModel'
          description: The Receiver's address. This doesn't need to be provided for Return consignments.
          nullable: true
        shippingUnits:
          type: array
          items:
            $ref: '#/components/schemas/ShippingUnitModel'
          description: 'Optional: Provide your shipping unit details'
          nullable: true
        userFields:
          allOf:
            - $ref: '#/components/schemas/UserFieldsModel'
          description: "Custom fields configured in OneFlo. Defined in https://portal.oneflo.com.au/MyUserFields/Index \r\nOptional: If not used don't supply."
          nullable: true
        service:
          type: string
          description: 'Optional: If an incorrect service code is used it will successfully import without selecting a service'
          nullable: true
        deliveryDateFrom:
          type: string
          description: "The local date at the receivers location from which the consignment delivery window starts.\r\nOptional: If not used don't supply.\r\n\r\nPossible validation errors:\r\n- 'DeliveryDateFrom' must be today or later."
          format: date
          nullable: true
          example: '2023-01-16'
        deliveryDateTo:
          type: string
          description: "The local date at the receivers location at which the consignment delivery window ends.\r\nOptional: If not used don't supply.\r\n\r\nPossible validation errors:\r\n- 'DeliveryDateTo' cannot be specified unless 'DeliveryDateFrom' is specified.\r\n- 'DeliveryDateTo' cannot be earlier than 'DeliveryDateFrom'."
          format: date
          nullable: true
          example: '2023-01-20'
        deliveryTimeFrom:
          type: string
          description: "The local time at the receivers location at which they start accepting deliveries.\r\nOptional: If not used don't supply.\r\n\r\nPossible validation errors:\r\n- 'DeliveryTimeFrom' cannot be specified unless 'DeliveryDateFrom' is specified."
          nullable: true
          example: '07:30'
        deliveryTimeTo:
          type: string
          description: "The local time at the receivers location at which they stop accepting deliveries.\r\nOptional: If not used don't supply.\r\n\r\nPossible validation errors:\r\n- 'DeliveryTimeTo' cannot be specified unless 'DeliveryDateFrom' is specified.\r\n- 'DeliveryTimeTo' cannot be specified unless 'DeliveryTimeFrom' is specified.\r\n- 'DeliveryTimeTo' cannot be earlier than 'DeliveryTimeFrom'."
          nullable: true
          example: '17:00'
      additionalProperties: false
    PackagingType:
      enum:
        - Bag
        - Cage
        - Crate
        - Carton
        - Drum
        - Length
        - Others
        - Pallet
        - Satchel
        - Skid
      type: string
      description: "The packaging type of the item. \r\nOptional, can be null or one of Bag, Cage, Carton, Crate, Drum, Length, Others, Pallet, Satchel, Skid\r\nSee https://flipgroup.atlassian.net/wiki/spaces/OIUG/pages/961445944/Shipping+Items+-+Packaging+Type"
    PalletTypeDetails:
      required:
        - count
      type: object
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/PalletTypes'
          description: 'One of "Chep", "Loscam" or "Plain". Defaults to "Plain".'
          example: Chep
        count:
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: "The quantity of this pallet type. Must be greater than 0.\r\n\r\nPossible validation errors:\r\n- 'Count' must be greater than '0'."
          format: int32
          example: 2
      additionalProperties: false
      description: A class describing the type and quantity of pallet used
    PalletTypes:
      enum:
        - Plain
        - Chep
        - Loscam
      type: string
    ProofOfDeliveryBinary:
      type: object
      properties:
        contentType:
          type: string
          description: The mime content type of the document (should always be image/png)
          nullable: true
        content:
          type: string
          description: Binary content of the document (encoded as Base64)
          format: byte
          nullable: true
      additionalProperties: false
      description: A proof of delivery (POD) document.
    Quote:
      type: object
      properties:
        id:
          type: integer
          format: int64
        rateID:
          type: integer
          format: int32
        carrierID:
          type: integer
          format: int32
        carrierName:
          type: string
          nullable: true
        service:
          type: string
          nullable: true
        carrierService:
          type: string
          nullable: true
        serviceDescription:
          type: string
          nullable: true
        zoneFrom:
          type: string
          nullable: true
        zoneTo:
          type: string
          nullable: true
        freight:
          type: number
          description: The freight cost charged to the shipper.
          format: double
        fees:
          type: number
          description: The freight fees charged to the shipper.
          format: double
        net:
          type: number
          description: The net costs (freight + fees) charged to the shipper.
          format: double
        tax:
          type: number
          description: The tax charged to the shipper.
          format: double
        total:
          type: number
          description: The total cost charged to the shipper.
          format: double
        eta:
          type: string
          nullable: true
        sortCode:
          type: string
          description: 'The carrier-specific hub information based on the receiver location to print on the item labels, for the carrier''s use when sorting the item.'
          nullable: true
        sortCodeHub2:
          type: string
          description: 'The carrier-specific hub information based on the receiver location to print on the item labels, for the carrier''s use when sorting the item.'
          nullable: true
        sortCodeZone:
          type: string
          description: 'The carrier-specific zone information based on the receiver location to print on the item labels, for the carrier''s use when sorting the item.'
          nullable: true
      additionalProperties: false
    QuoteItem:
      required:
        - noOfItems
        - weight
      type: object
      properties:
        noOfItems:
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: "The number of items of this type / dims / weight\r\n\r\nPossible validation errors:\r\n- 'NoOfItems' must be greater than '0'."
          format: int32
          example: 1
        length:
          type: number
          description: The length of the item in cms
          format: double
          example: 30.5
        width:
          type: number
          description: The width of the item in cms
          format: double
          example: 20.5
        height:
          type: number
          description: The height of the item in cms
          format: double
          example: 10.5
        weight:
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: "The weight of one of these items in kg. This will be multiplied by the noOfItems to get a total weight for this QuoteItem.\r\n\r\nPossible validation errors:\r\n- 'Weight' must be greater than '0'."
          format: double
          example: 15.5
        packagingType:
          allOf:
            - $ref: '#/components/schemas/PackagingType'
          description: "The packaging type of the item. \r\nOptional, can be null or one of Bag, Cage, Carton, Crate, Drum, Length, Others, Pallet, Satchel, Skid"
          nullable: true
      additionalProperties: false
    ReceiverAddressModel:
      required:
        - country
        - line1
        - name
        - postcode
        - suburb
      type: object
      properties:
        name:
          maxLength: 50
          type: string
          description: "Recipient Name\r\n\r\nPossible validation errors:\r\n- 'Name' must not be empty.\r\n- The length of 'Name' must be 50 characters or fewer. You entered {TotalLength} characters."
          example: Sample Receiver
        line1:
          maxLength: 30
          type: string
          description: "Address Line 1\r\n\r\nPossible validation errors:\r\n- 'Line1' must not be empty.\r\n- The length of 'Line1' must be 30 characters or fewer. You entered {TotalLength} characters."
          example: 123 Sample Road
        line2:
          maxLength: 30
          type: string
          description: "Address Line 2\r\n\r\nPossible validation errors:\r\n- The length of 'Line2' must be 30 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: Receiving Dock 2
        suburb:
          maxLength: 50
          type: string
          description: "The suburb, town or locality\r\n\r\nPossible validation errors:\r\n- 'Suburb' must not be empty.\r\n- The length of 'Suburb' must be 50 characters or fewer. You entered {TotalLength} characters."
          example: MELBOURNE
        state:
          maxLength: 5
          type: string
          description: "The state or province in which the address is located\r\n\r\nPossible validation errors:\r\n- The length of 'State' must be 5 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: VIC
        postcode:
          maxLength: 10
          type: string
          description: "The postcode for the address\r\n\r\nPossible validation errors:\r\n- 'Postcode' must not be empty.\r\n- The length of 'Postcode' must be 10 characters or fewer. You entered {TotalLength} characters."
          example: '3000'
        country:
          maxLength: 2
          minLength: 2
          type: string
          description: "The ISO2 Country Code, eg \"AU\"\r\n\r\nPossible validation errors:\r\n- 'Country' must not be empty.\r\n- 'Country' must be 2 characters in length. You entered {TotalLength} characters."
          example: AU
        contactName:
          maxLength: 20
          type: string
          description: "The name of the person to contact at the receiver address\r\n\r\nPossible validation errors:\r\n- The length of 'ContactName' must be 20 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: Sample Contact
        phone:
          maxLength: 15
          type: string
          description: "The phone number of the receiver contact\r\n\r\nPossible validation errors:\r\n- The length of 'Phone' must be 15 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: 0411 999 999
        email:
          maxLength: 50
          type: string
          description: "The email address of the receiver contact\r\n\r\nPossible validation errors:\r\n- The length of 'Email' must be 50 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: contact@example.com
        instructions:
          maxLength: 250
          type: string
          description: "Any instructions specific to this receiver\r\n\r\nPossible validation errors:\r\n- The length of 'Instructions' must be 250 characters or fewer. You entered {TotalLength} characters."
          nullable: true
        atl:
          type: boolean
          description: 'Authority to Leave. If true, Authority to leave is given. Defaults to null (unset).'
          nullable: true
        isResidential:
          type: boolean
          description: 'If true, the address is residential. Defaults to false.'
      additionalProperties: false
      description: A model of the address of a receiver of consignments
    ReceiverQuoteDetails:
      required:
        - countryCode
        - locality
        - postcode
      type: object
      properties:
        address1:
          type: string
          description: The street address of the receiver.
          nullable: true
          example: 123 Test
        address2:
          type: string
          description: ''
          nullable: true
          example: ''
        locality:
          type: string
          description: "The locality/suburb of the receiver.\r\n\r\nPossible validation errors:\r\n- 'Locality' must not be empty."
          example: Sydney
        postcode:
          type: string
          description: "The postcode of the receiver\r\n\r\nPossible validation errors:\r\n- 'Postcode' must not be empty."
          example: '2000'
        countryCode:
          type: string
          description: "The ISO2 Country Code.\r\n\r\nPossible validation errors:\r\n- 'CountryCode' must not be empty."
          example: AU
        isResidential:
          type: boolean
          description: Flags for whether the address is residential. Used to pre-empt residential pick up fees.
          example: false
      additionalProperties: false
    ReturnablePackagingTypes:
      enum:
        - None
        - Chep
        - Loscam
        - Cage
        - Container
        - Other
      type: string
    ScanEvent:
      type: object
      properties:
        occurredAtLocalTime:
          type: string
          description: "The time the event happened.\r\nThe timezone is most likely the local time wherever the event happened (sorry, the timezone is not available).\r\nEvents aren't always available from Customer API straight away."
          example: '2024-08-29T10:09:36'
        code:
          type: string
          description: "The code for this type of event.\r\nThis is recommended for app conditional logic to use.\r\nA list of common event types is available in OneFlo Knowledge Base: https://flipgroup.atlassian.net/wiki/x/P4AAO#OneFlo-TrackConsignments-ScanEvents"
          nullable: true
          example: DEL
        description:
          type: string
          description: "The meaning of the event Code.\r\nThis is recommended for display to users.\r\nA list of common event types is available in OneFlo Knowledge Base: https://flipgroup.atlassian.net/wiki/x/P4AAO#OneFlo-TrackConsignments-ScanEvents"
          nullable: true
          example: Delivered
        extraInfo:
          type: string
          description: Extra info associated with the scan event.
          nullable: true
        barcode:
          type: string
          description: Barcode that was scanned
          nullable: true
        itemNumber:
          type: integer
          description: The ItemNumber of the ShippingItem that this scan relates to. This will be null for scans that related to the consignment as a whole.
          format: int32
          nullable: true
      additionalProperties: false
      description: An event affecting a Consignment.
    ScanEventResponseModel:
      type: object
      properties:
        occurredAtLocalTime:
          type: string
          description: "The time the event happened.\r\nThe timezone is most likely the local time wherever the event happened (sorry, the timezone is not available).\r\nEvents aren't always available from Customer API straight away."
          example: '2024-08-29T10:09:36'
        code:
          type: string
          description: "The code for this type of event.\r\nThis is recommended for app conditional logic to use.\r\nA list of common event types is available in OneFlo Knowledge Base: https://flipgroup.atlassian.net/wiki/x/P4AAO#OneFlo-TrackConsignments-ScanEvents"
          nullable: true
          example: DEL
        description:
          type: string
          description: "The meaning of the event Code.\r\nThis is recommended for display to users.\r\nA list of common event types is available in OneFlo Knowledge Base: https://flipgroup.atlassian.net/wiki/x/P4AAO#OneFlo-TrackConsignments-ScanEvents"
          nullable: true
          example: Delivered
        extraInfo:
          type: string
          description: Extra info associated with the scan event.
          nullable: true
        barcode:
          type: string
          description: Barcode that was scanned
          nullable: true
        itemNumber:
          type: integer
          description: The ItemNumber of the ShippingItem that this scan relates to. This will be null for scans that related to the consignment as a whole.
          format: int32
          nullable: true
        consignmentId:
          type: integer
          description: Internal consignment id that the scan event belongs to
          format: int64
        connote:
          type: string
          description: Connote of the consignment that the scan event belongs to
          nullable: true
        consignmentReference:
          type: string
          description: Sender-specified reference number for the consignment.
          nullable: true
      additionalProperties: false
    SenderAddressModel:
      required:
        - country
        - line1
        - name
        - postcode
        - suburb
      type: object
      properties:
        name:
          maxLength: 50
          type: string
          description: "Sender  Name\r\n\r\nPossible validation errors:\r\n- 'Name' must not be empty.\r\n- The length of 'Name' must be 50 characters or fewer. You entered {TotalLength} characters."
          example: Sample Sender
        line1:
          maxLength: 30
          type: string
          description: "Address Line 1\r\n\r\nPossible validation errors:\r\n- 'Line1' must not be empty.\r\n- The length of 'Line1' must be 30 characters or fewer. You entered {TotalLength} characters."
          example: 123 Sample Road
        line2:
          maxLength: 30
          type: string
          description: "Address Line 2\r\n\r\nPossible validation errors:\r\n- The length of 'Line2' must be 30 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: Receiving Dock 2
        suburb:
          maxLength: 50
          type: string
          description: "The suburb, town or locality\r\n\r\nPossible validation errors:\r\n- 'Suburb' must not be empty.\r\n- The length of 'Suburb' must be 50 characters or fewer. You entered {TotalLength} characters."
          example: MELBOURNE
        state:
          maxLength: 5
          type: string
          description: "The state or province in which the address is located\r\n\r\nPossible validation errors:\r\n- The length of 'State' must be 5 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: VIC
        postcode:
          maxLength: 10
          type: string
          description: "The postcode for the address\r\n\r\nPossible validation errors:\r\n- 'Postcode' must not be empty.\r\n- The length of 'Postcode' must be 10 characters or fewer. You entered {TotalLength} characters."
          example: '3000'
        country:
          maxLength: 2
          minLength: 2
          type: string
          description: "The ISO2 Country Code, eg \"AU\"\r\n\r\nPossible validation errors:\r\n- 'Country' must not be empty.\r\n- 'Country' must be 2 characters in length. You entered {TotalLength} characters."
          example: AU
        contactName:
          maxLength: 20
          type: string
          description: "The name of the person to contact at the sender address\r\n\r\nPossible validation errors:\r\n- The length of 'ContactName' must be 20 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: Sample Contact
        phone:
          maxLength: 15
          type: string
          description: "The phone number of the sender contact\r\n\r\nPossible validation errors:\r\n- The length of 'Phone' must be 15 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: 0411 999 999
        email:
          maxLength: 50
          type: string
          description: "the email address of the sender contact\r\n\r\nPossible validation errors:\r\n- The length of 'Email' must be 50 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: contact@example.com
        instructions:
          maxLength: 250
          type: string
          description: "Any instructions specific to this sender\r\n\r\nPossible validation errors:\r\n- The length of 'Instructions' must be 250 characters or fewer. You entered {TotalLength} characters."
          nullable: true
      additionalProperties: false
      description: A model of the address of a sender of consignments
    SenderQuoteDetails:
      required:
        - countryCode
        - locality
        - postcode
      type: object
      properties:
        address1:
          type: string
          description: The street address of the sender.
          nullable: true
          example: 123 Test
        address2:
          type: string
          description: ''
          nullable: true
          example: ''
        locality:
          type: string
          description: "The locality/suburb of the sender.\r\n\r\nPossible validation errors:\r\n- 'Locality' must not be empty."
          example: Melbourne
        postcode:
          type: string
          description: "The postcode of the sender\r\n\r\nPossible validation errors:\r\n- 'Postcode' must not be empty."
          example: '3000'
        countryCode:
          type: string
          description: "The ISO2 Country Code.\r\n\r\nPossible validation errors:\r\n- 'CountryCode' must not be empty."
          example: AU
        isResidential:
          type: boolean
          description: Flags for whether the address is residential. Used to pre-empt residential pick up fees.
          example: false
      additionalProperties: false
    ServiceResponseModel:
      type: object
      properties:
        carrierID:
          type: integer
          format: int32
        carrierName:
          type: string
          nullable: true
        service:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        webDescription:
          type: string
          nullable: true
        bookingCutOffTime:
          type: string
          nullable: true
        carrierService:
          type: string
          nullable: true
        maxItems:
          type: integer
          format: int32
        maxWeight:
          type: number
          format: double
        maxVolume:
          type: number
          format: double
        maxWidth:
          type: number
          format: double
        maxLength:
          type: number
          format: double
        maxHeight:
          type: number
          format: double
        useExternalPriceCalculator:
          type: boolean
        canConsignFreight:
          type: boolean
      additionalProperties: false
    ShippingItem:
      type: object
      properties:
        itemNumber:
          type: integer
          description: The ordinal position of the item within the consignment. This is set by the database.
          format: int32
        productCode:
          type: string
          description: 'The Product Code / SKU / Item Type that applies to this item, if any.'
          nullable: true
        reference:
          type: string
          description: The sender's internal reference for this Consignment Item. Defaults to the reference for the consignment.
          nullable: true
        weightInKilograms:
          type: number
          description: The weight of the item as measured by the sender
          format: double
        lengthInCentimeters:
          type: number
          description: The length of the item as measured by the sender. This is the longest dimension.
          format: double
        widthInCentimeters:
          type: number
          description: The width of the item as measured by the sender. This is the second longest dimension.
          format: double
        heightInCentimeters:
          type: number
          description: The height of the item as measured by the sender. This is the shortest dimension.
          format: double
        volumeInCubicMeters:
          type: number
          description: The calculated volume of the item as calculated by the dimensions
          format: double
          readOnly: true
        barcode:
          type: string
          description: Barcode as for the label for the shipping item. Set by the database.
          nullable: true
        description:
          type: string
          description: The sender-specified item level description
          nullable: true
        returnablePackagingType:
          allOf:
            - $ref: '#/components/schemas/ReturnablePackagingTypes'
          description: 'Returnable Packaging Type, defaults to ReturnablePackagingTypes.None'
        exchangeReturnablePackaging:
          type: boolean
          description: 'If true, Returnable Packaging can be exchanged'
        dangerousGoods:
          type: array
          items:
            $ref: '#/components/schemas/ConsignmentDangerousGoods'
          description: A collection of zero or more Dangerous Goods codes that apply to the item
          nullable: true
        packagingType:
          allOf:
            - $ref: '#/components/schemas/PackagingType'
          description: A short string denoting the packaging type
          nullable: true
        palletised:
          type: boolean
          description: 'If true the item is palletised. This is set by the API, and not by a user.'
      additionalProperties: false
    ShippingItemModel:
      required:
        - heightInCentimeters
        - lengthInCentimeters
        - weightInKilograms
        - widthInCentimeters
      type: object
      properties:
        productCode:
          maxLength: 20
          type: string
          description: "The Product Code / SKU / Item Type that applies to this item, if any. \r\nOptional: Defaults to PackagingType if not specified\r\n\r\nPossible validation errors:\r\n- The length of 'ProductCode' must be 20 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: SKU1234
        reference:
          maxLength: 20
          type: string
          description: "Your company's internal reference for this Shipping Item. Defaults to the reference for the consignment, if the consignment reference exists and this value is unset.\r\n\r\nPossible validation errors:\r\n- The length of 'Reference' must be 20 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: SREF00182
        weightInKilograms:
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: "The weight of the item in kilograms as measured by the sender. Must be greater than 0.\r\n\r\nPossible validation errors:\r\n- 'WeightInKilograms' must be greater than '0'."
          format: double
          example: 5.54
        lengthInCentimeters:
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: "The length of the item in centimeters as measured by the sender. This is the longest dimension. Must be greater than 0.\r\n\r\nPossible validation errors:\r\n- 'LengthInCentimeters' must be greater than '0'."
          format: double
          example: 15.6
        widthInCentimeters:
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: "The width of the item in centimeters as measured by the sender. This is the second longest dimension. Must be greater than 0.\r\n\r\nPossible validation errors:\r\n- 'WidthInCentimeters' must be greater than '0'."
          format: double
          example: 10.1
        heightInCentimeters:
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: "The height of the item in centimeters as measured by the sender. This is the shortest dimension. Must be greater than 0.\r\n\r\nPossible validation errors:\r\n- 'HeightInCentimeters' must be greater than '0'."
          format: double
          example: 8.7
        description:
          maxLength: 40
          type: string
          description: "The item level description.\r\n\r\nPossible validation errors:\r\n- The length of 'Description' must be 40 characters or fewer. You entered {TotalLength} characters."
          nullable: true
          example: Premium Widget
        returnablePackagingType:
          allOf:
            - $ref: '#/components/schemas/ReturnablePackagingTypes'
          description: 'Returnable Packaging Type, defaults to ReturnablePackagingTypes.None'
          example: Chep
        exchangeReturnablePackaging:
          type: boolean
          description: 'If true, Returnable Packaging can be exchanged. Default is false.'
          example: false
        packagingType:
          allOf:
            - $ref: '#/components/schemas/PackagingType'
          description: A short string denoting the packaging type. Defaults to "Others".
          example: Pallet
        dangerousGoods:
          type: array
          items:
            $ref: '#/components/schemas/DangerousGoodsModel'
          description: "A collection of zero or more Dangerous Goods codes that apply to the product.\r\nNOTE: Consignments cannot be consolidated when they have Shipping Items with Dangerous Goods."
          nullable: true
      additionalProperties: false
      description: A class representing one or more items of a particular type to be consigned on a ConsignmentRequest
    ShippingUnitModel:
      type: object
      properties:
        reference:
          type: string
          description: Sender reference
          nullable: true
          example: '4530803'
        code:
          type: string
          description: "The Product Code of the item, defined: https://portal.oneflo.com.au/MyProducts/Index\r\nOptional: Defaults to PackagingType if not specified"
          nullable: true
          example: DB19
        description:
          type: string
          description: Description of the item
          nullable: true
          example: CARTON of toy cars
        packagingType:
          allOf:
            - $ref: '#/components/schemas/PackagingType'
          description: "The packaging type of the item. \r\nCan be one of Bag, Cage, Carton, Crate, Drum, Length, Others, Pallet, Satchel, Skid. Defaults to Others."
        items:
          type: integer
          description: number of items of this type / dims / weight
          format: int32
          example: 1
        length:
          type: number
          description: 'in centimeters, can include decimal'
          format: double
          example: 10
        width:
          type: number
          description: 'in centimeters, can include decimal'
          format: double
          example: 20
        height:
          type: number
          description: 'in centimeters, can include decimal'
          format: double
          example: 30
        weight:
          type: number
          description: 'in kilograms, can include decimal'
          format: double
          example: 5.5
      additionalProperties: false
    UserFieldsModel:
      type: object
      properties:
        userField1:
          type: string
          description: ''
          nullable: true
          example: '506180'
        userField2:
          type: string
          description: ''
          nullable: true
          example: Inspected and Confirmed
        userField3:
          type: string
          description: ''
          nullable: true
          example: MISC
        userField4:
          type: string
          description: ''
          nullable: true
          example: Rest
        userField5:
          type: string
          description: ''
          nullable: true
          example: OR-9874152162196
      additionalProperties: false
      description: "Custom fields configured in OneFlo. Defined in https://portal.oneflo.com.au/MyUserFields/Index\r\nOptional: If not used don't supply."
    ValidationErrorResponse:
      type: object
      properties:
        message:
          type: string
          nullable: true
        validationErrors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
            nullable: true
          nullable: true
      additionalProperties: false
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      name: Ocp-Apim-Subscription-Key
      in: header
    apiKeyQuery:
      type: apiKey
      name: subscription-key
      in: query
security:
  - apiKeyHeader: [ ]
  - apiKeyQuery: [ ]