Loop organizations API

The organizations API from Loop — 3 operation(s) for organizations.

OpenAPI Specification

loop-organizations-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Loop Onboarding artifacts organizations API
  description: HTTP REST API for Loop Payments Onboarding.
  version: '1.0'
  contact: {}
servers:
- url: https://onboarding.api.loop.com
security:
- bearerAuth: []
tags:
- name: organizations
paths:
  /v1/organizations:
    post:
      description: 'Create an organization. Idempotent on uniqueness-enforced tags: if the request includes a tag whose type has enforceUniqueness=true that already resolves to an existing organization, that organization is returned with a 200 instead of creating a duplicate.'
      operationId: Organizations_create
      parameters:
      - name: expand
        required: false
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - activeQuickPayRelationships
            - tags
            - truckingCarrierInfo.factorOrganizationQid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationInput'
      responses:
        '200':
          description: An organization with a matching uniqueness-enforced tag already existed; the existing organization is returned unchanged.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '409':
          description: Request tags resolve to multiple existing organizations; cannot upsert.
      summary: Create an organization
      tags:
      - organizations
  /v1/organizations/tagged/{tagType}/{tagTypeValue}:
    get:
      description: Returns the organization with the specified tag
      operationId: Organizations_getByTag
      parameters:
      - name: tagType
        required: true
        in: path
        schema:
          example: externalId
          type: string
      - name: tagTypeValue
        required: true
        in: path
        schema:
          example: '123456789'
          type: string
      - name: expand
        required: false
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - activeQuickPayRelationships
            - tags
            - truckingCarrierInfo.factorOrganizationQid
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '422':
          description: uniqueness not enabled for tagType "{tagType}"
      summary: Retrieve an organization
      tags:
      - organizations
  /v1/organizations/{qid}:
    get:
      description: Returns the organization with the specified QID
      operationId: Organizations_get
      parameters:
      - name: expand
        required: false
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - activeQuickPayRelationships
            - tags
            - truckingCarrierInfo.factorOrganizationQid
      - name: qid
        required: true
        in: path
        description: QID of the entity to retrieve
        schema:
          format: qid
          example: qid::organization:0ca6f700-4137-4d09-b44a-43bb8d7900c5
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '400':
          description: Invalid QID
        '404':
          description: Organization not found
      summary: Retrieve an organization
      tags:
      - organizations
    put:
      description: Update an organization
      operationId: Organizations_update
      parameters:
      - name: expand
        required: false
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - activeQuickPayRelationships
            - tags
            - truckingCarrierInfo.factorOrganizationQid
      - name: qid
        required: true
        in: path
        description: QID of the entity to retrieve
        schema:
          format: qid
          example: qid::organization:0ca6f700-4137-4d09-b44a-43bb8d7900c5
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrganizationInput'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
      summary: Update an organization
      tags:
      - organizations
components:
  schemas:
    TruckingCarrierInfo:
      type: object
      properties:
        factorOrganizationQid:
          type: string
          description: QID of the organization the carrier currently uses for factoring
          format: qid
          example: qid::organization:0ca6f700-4137-4d09-b44a-43bb8d7900c5
        mcNumber:
          type: string
          nullable: true
          example: MC-179059
          description: Motor Carrier Number
        scac:
          type: string
          nullable: true
          example: FDEG
          description: Standard Carrier Alpha Code (SCAC)
        usdotNumber:
          type: string
          nullable: true
          example: '265752'
          description: US Department of Transportation Number
        offersFtl:
          type: boolean
          nullable: true
          example: true
          description: Whether the carrier offers LTL services
        offersLtl:
          type: boolean
          nullable: true
          example: true
          description: Whether the carrier offers LTL services
    AddressValue:
      type: object
      properties:
        addressLine1:
          type: string
          example: 123 Main Street
        addressLine2:
          type: string
          example: Suite 456
        city:
          type: string
          example: Chicago
        state:
          type: string
          example: IL
        postalCode:
          type: string
          example: '60601'
        country:
          type: string
          example: US
          description: ISO 3166-1 alpha-2 country code.
      required:
      - addressLine1
      - city
      - postalCode
      - country
    OrganizationAsPayorInput:
      type: object
      properties:
        invoicing:
          description: An object specifying information about the organization's invoicing terms.
          allOf:
          - $ref: '#/components/schemas/OrganizationAsPayorInputInvoicingRelationship'
        primaryBillingAddress:
          nullable: true
          type: object
          allOf:
          - $ref: '#/components/schemas/AddressValue'
    FactorInfo:
      type: object
      properties: {}
    AirCarrierInfo:
      type: object
      properties:
        scac:
          type: string
          nullable: true
          example: AAL
          description: Standard Carrier Alpha Code (SCAC) - 2 to 4 alphabetic characters
        iataCode:
          type: string
          nullable: true
          example: AA
          description: International Air Transport Association (IATA) code - 2 to 3 alphabetic characters
        icaoCode:
          type: string
          nullable: true
          example: AAL
          description: International Civil Aviation Organization (ICAO) code - 3 alphabetic characters
    OrganizationAsPayorInputInvoicingRelationship:
      type: object
      properties:
        daysToPay:
          type: number
          example: 30
          description: Number of days after invoice finalization until payment is due.
      required:
      - daysToPay
    ClientDivisionInfo:
      type: object
      properties:
        isEligiblePayor:
          type: boolean
          nullable: false
          description: Whether the client division is an eligible payor for AP invoices.
        vatRegistrationNumber:
          type: string
          nullable: true
          description: VAT registration number for the organization.
        payorClientId:
          type: string
          nullable: true
          description: Legacy-system client id (D2L Client Id / SIQC Customer Id) this client division maps to, used for payor determination during replatforming.
      required:
      - isEligiblePayor
    QuickPayRelationship:
      type: object
      properties:
        createdAt:
          type: string
          format: utc-timestamp
          example: '2023-01-01T00:00:00.000Z'
        revisionNumber:
          type: number
          example: 1
        revisionCreatedAt:
          type: string
          format: utc-timestamp
          example: '2023-01-01T00:00:00.000Z'
        payeeOrganizationQid:
          type: string
          description: Qualified unique identifier.
          example: qid::organization:0ca6f700-4137-4d09-b44a-43bb8d7900c4
          format: qid
        payorOrganizationQid:
          type: string
          description: Qualified unique identifier.
          example: qid::organization:0ca6f700-4137-4d09-b44a-43bb8d7900c4
          format: qid
        daysToPay:
          type: number
          description: Number of days to pay under this QuickPay offer.
          example: 1
        discountPercentage:
          type: string
          format: percent-string
          example: '0.02'
          description: Discount percentage applied when the `daysToPay` requirement is met. Between "0" and "1".
        effectiveFrom:
          type: string
          description: Timestamp when the QuickPay relationship became effective.
          example: '2025-05-01T00:00:00.000Z'
          format: utc-timestamp
        effectiveTo:
          type: string
          description: Timestamp when the QuickPay relationship is no longer effective, or null if open-ended.
          nullable: true
          example: '2025-06-01T00:00:00.000Z'
          format: utc-timestamp
      required:
      - createdAt
      - revisionNumber
      - revisionCreatedAt
      - payeeOrganizationQid
      - payorOrganizationQid
      - daysToPay
      - discountPercentage
      - effectiveFrom
      - effectiveTo
    ForwarderInfo:
      type: object
      properties:
        scac:
          type: string
          nullable: true
          example: FDEG
          description: Standard Carrier Alpha Code (SCAC) - 2 to 4 alphabetic characters
        fmcOrganizationNumber:
          type: string
          nullable: true
          example: FMC123456
          description: Federal Maritime Commission (FMC) Organization Number
    CustomerInfo:
      type: object
      properties:
        billingEmails:
          nullable: false
          example:
          - billing@customer.com
          description: The primary billing email address for the customer organization.
          type: array
          items:
            type: string
        invoiceDeliveryMethod:
          type: string
          nullable: true
          example: EMAIL
          description: Invoice delivery method for the customer organization. This is used to determine which receivable invoice workflow will be used.
          enum:
          - EMAIL
          - OFFLINE
        note:
          type: string
          nullable: true
          description: Any note regarding this customer organization's invoicing profile
        receivableInvoiceRequiredSupportingArtifacts:
          type: array
          nullable: false
          example:
          - BILL_OF_LADING
          description: The artifact types required to be attached to customer receivable invoices for finalization.
          items:
            type: string
            enum:
            - BILL_OF_LADING
            - CUSTOMER_RATE_CONFIRMATION
            - IN_OUT_GATE
            - LUMPER_RECEIPT
            - PACKING_LIST
            - SCALE_TICKET
            - WASHOUT_RECEIPT
            - WORK_ORDER
        receivableInvoiceProofOfDeliveryRequired:
          type: boolean
          nullable: false
          example: true
          description: Whether the customer requires a proof of delivery for receivable invoice finalization. If set to true, at least one of the supporting artifacts must be marked as a proof of delivery.
    BrokerageInfo:
      type: object
      properties: {}
    OrganizationAsPayeeInputInvoicingRelationship:
      type: object
      properties:
        daysToPay:
          type: number
          example: 30
          description: Number of days until the invoice is due.
        daysToPayFrom:
          type: string
          example: ISSUE_DATE
          description: The anchor date from which we determine the invoice due date.
          enum:
          - ISSUE_DATE
          - RECEIPT_DATE
      required:
      - daysToPay
      - daysToPayFrom
    OceanCarrierInfo:
      type: object
      properties:
        scac:
          type: string
          nullable: true
          example: MAEU
          description: Standard Carrier Alpha Code (SCAC) - 2 to 4 alphabetic characters
        bicCode:
          type: string
          nullable: true
          example: MSCU
          description: Bureau International des Containers (BIC) code - 4-letter prefix registered with BIC
    OrganizationAsPayeePaymentInfoInput:
      type: object
      properties:
        achDisplayName:
          type: string
          description: Display name that shows up in ACH records, on statements opposite to this org in a payment. Max 13 characters; otherwise may be truncated.
          example: ACME Inc.
          nullable: true
        businessType:
          type: string
          example: LLC
          description: Business type of the organization.
          nullable: true
          enum:
          - SOLE_PROPRIETORSHIP
          - LLC
          - TRUST
          - PUBLIC_CORPORATION
          - PRIVATE_CORPORATION
          - PARTNERSHIP
          - UNINCORPORATED_ASSOCIATION
          - UNINCORPORATED_NONPROFIT
          - INCORPORATED_NONPROFIT
        remittanceEmails:
          description: Array of emails that should receive remittance emails for payments to this organization.
          example:
          - acme@acme.com
          nullable: true
          type: array
          items:
            type: string
        primaryAddress:
          description: Primary payment (billing) address of the organization.
          allOf:
          - $ref: '#/components/schemas/AddressValue'
        remittanceAddress:
          description: Payment remittance address of the organization, if different from the primary address.
          nullable: true
          type: object
          allOf:
          - $ref: '#/components/schemas/AddressValue'
        stopPayment:
          type: boolean
          description: Whether payments to this organization have been stopped.
          example: true
      required:
      - primaryAddress
    OrganizationAsPayeeInput:
      type: object
      properties:
        invoicing:
          description: An object specifying information about the organization's invoicing terms.
          example:
            daysToPay: 30
            daysToPayFrom: ISSUE_DATE
          allOf:
          - $ref: '#/components/schemas/OrganizationAsPayeeInputInvoicingRelationship'
        quickPay:
          description: An object specifying information about the organization's quickPay terms. Leave blank if this organization does not use quickpay.
          example:
            daysToPay: 1
            discountPercentage: '0.02'
          allOf:
          - $ref: '#/components/schemas/OrganizationAsPayeeQuickpayInput'
        paymentInfo:
          description: An object specifying information about the organization's payments.
          allOf:
          - $ref: '#/components/schemas/OrganizationAsPayeePaymentInfoInput'
    Organization:
      type: object
      properties:
        qid:
          type: string
          description: Qualified unique identifier.
          format: qid
          example: qid::organization:0ca6f700-4137-4d09-b44a-43bb8d7900c4
        createdAt:
          type: string
          format: utc-timestamp
          example: '2023-01-01T00:00:00.000Z'
        revisionNumber:
          type: number
          example: 1
        revisionCreatedAt:
          type: string
          format: utc-timestamp
          example: '2023-01-01T00:00:00.000Z'
        displayName:
          type: string
          example: ACME
          description: Name of the organization.
        legalName:
          type: string
          example: ACME Inc.
          description: Legal name of the organization, if defined.
          nullable: true
        websiteUrl:
          type: string
          nullable: true
          example: https://example.com
          description: Website of the organization.
        parentOrganizationQid:
          type: string
          description: Qualified unique identifier of the parent organization.
          nullable: true
          example: qid::organization:9bafb1b4-3bdf-4326-bc0d-2d0ff9d616a8
          format: qid
        clientDivisionInfo:
          nullable: true
          example:
            isEligiblePayor: true
            vatRegistrationNumber: DE123456789
            payorClientId: '102019'
          description: Client division information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/ClientDivisionInfo'
        customerInfo:
          nullable: true
          example:
            billingEmails:
            - billing@customer.com
            invoiceDeliveryMethod: EMAIL
          description: Customer information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/CustomerInfo'
        airCarrierInfo:
          nullable: true
          example:
            scac: AAL
            iataCode: AA
            icaoCode: AAL
          description: Air carrier information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/AirCarrierInfo'
        oceanCarrierInfo:
          nullable: true
          example:
            scac: MAEU
            bicCode: MSCU
          description: Ocean carrier information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/OceanCarrierInfo'
        truckingCarrierInfo:
          nullable: true
          example:
            mcNumber: '179059'
            scac: FDEB
            usdotNumber: '265752'
          description: Trucking carrier information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/TruckingCarrierInfo'
        forwarderInfo:
          nullable: true
          example:
            scac: FDEG
            fmcOrganizationNumber: FMC123456
          description: Forwarder information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/ForwarderInfo'
        factorInfo:
          nullable: true
          example: {}
          description: Factor information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/FactorInfo'
        brokerageInfo:
          nullable: true
          example: {}
          description: Brokerage information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/BrokerageInfo'
        tags:
          type: object
          nullable: false
          example:
            accountNumber: AC-123
            externalId: '123456789'
          description: Entity tags assigned to the organization.
        activeQuickPayRelationships:
          nullable: false
          description: The organization's currently-active QuickPay relationships in which it is the payee. Only present when requested via the `activeQuickPayRelationships` expand parameter.
          type: array
          items:
            $ref: '#/components/schemas/QuickPayRelationship'
      required:
      - qid
      - createdAt
      - revisionNumber
      - revisionCreatedAt
      - displayName
      - legalName
      - websiteUrl
      - parentOrganizationQid
      - clientDivisionInfo
      - customerInfo
      - airCarrierInfo
      - oceanCarrierInfo
      - truckingCarrierInfo
      - forwarderInfo
      - factorInfo
      - brokerageInfo
    UpdateOrganizationInput:
      type: object
      properties:
        displayName:
          type: string
          example: ACME
          description: Name of the organization.
        legalName:
          type: string
          example: ACME Inc.
          description: Legal name of the organization, if defined.
          nullable: true
        tradeNames:
          description: Array of trade names (also known as DBA names) for the organization.
          example:
          - ACME Trucking
          - ACME Group
          nullable: true
          type: array
          items:
            type: string
        websiteUrl:
          type: string
          nullable: true
          example: https://example.com
          description: Website of the organization.
        parentOrganizationQid:
          type: string
          description: Qualified unique identifier of the parent organization.
          nullable: true
          example: qid::organization:9bafb1b4-3bdf-4326-bc0d-2d0ff9d616a8
          format: qid
        tags:
          type: object
          additionalProperties:
            type: string
          properties: {}
          nullable: true
          example:
            tag1: value1
            tag2: value2
          description: Entity tags assigned to the organization.
        clientDivisionInfo:
          nullable: true
          example:
            isEligiblePayor: true
            vatRegistrationNumber: DE123456789
            payorClientId: '102019'
          description: Client division information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/ClientDivisionInfo'
        customerInfo:
          nullable: true
          example:
            billingEmails:
            - billing@customer.com
            invoiceDeliveryMethod: EMAIL
          description: Customer information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/CustomerInfo'
        airCarrierInfo:
          nullable: true
          example:
            scac: AAL
            iataCode: AA
            icaoCode: AAL
          description: Air carrier information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/AirCarrierInfo'
        oceanCarrierInfo:
          nullable: true
          example:
            scac: MAEU
            bicCode: MSCU
          description: Ocean carrier information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/OceanCarrierInfo'
        truckingCarrierInfo:
          nullable: true
          example:
            mcNumber: '179059'
            scac: FDEB
            usdotNumber: '265752'
          description: Trucking carrier information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/TruckingCarrierInfo'
        forwarderInfo:
          nullable: true
          example:
            scac: FDEG
            fmcOrganizationNumber: FMC123456
          description: Forwarder information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/ForwarderInfo'
        factorInfo:
          nullable: true
          example: {}
          description: Factor information, if relevant to the organization. The presence of an empty object here will create the organization as a factor.
          type: object
          allOf:
          - $ref: '#/components/schemas/FactorInfo'
        asPayee:
          example:
            invoicing:
              daysToPay: 30
              daysToPayFrom: ISSUE_DATE
            quickPay:
              daysToPay: 1
              discountPercentage: '0.02'
          description: Invoicing relationship information applicable when this organization is the payee on a payable invoice, such as payment terms.
          allOf:
          - $ref: '#/components/schemas/OrganizationAsPayeeInput'
        asPayor:
          description: Information applicable when this organization is the payor on a receivable invoice.
          allOf:
          - $ref: '#/components/schemas/OrganizationAsPayorInput'
        occupiedAddresses:
          description: Addresses occupied by the organization
          type: array
          items:
            $ref: '#/components/schemas/AddressValue'
    OrganizationAsPayeeQuickpayInput:
      type: object
      properties:
        daysToPay:
          type: number
          description: Number of days to pay.
          example: 1
          nullable: false
        discountPercentage:
          type: string
          format: percent-string
          example: '0.02'
          description: Discount percentage if the `daysToPay` quickpay requirement is met. Must be between "0" and "1".
          nullable: false
      required:
      - daysToPay
      - discountPercentage
    CreateOrganizationInput:
      type: object
      properties:
        displayName:
          type: string
          example: ACME
          description: Name of the organization.
        legalName:
          type: string
          example: ACME Inc.
          description: Legal name of the organization, if defined.
          nullable: true
        tradeNames:
          description: Array of trade names (also known as DBA names) for the organization.
          example:
          - ACME Trucking
          - ACME Group
          nullable: true
          type: array
          items:
            type: string
        websiteUrl:
          type: string
          nullable: true
          example: https://example.com
          description: Website of the organization.
        parentOrganizationQid:
          type: string
          description: Qualified unique identifier of the parent organization.
          nullable: true
          example: qid::organization:9bafb1b4-3bdf-4326-bc0d-2d0ff9d616a8
          format: qid
        tags:
          type: object
          nullable: true
          example:
            accountNumber: AC-123
            externalId: '123456789'
          description: Entity tags assigned to the organization.
        clientDivisionInfo:
          nullable: true
          example:
            isEligiblePayor: true
            vatRegistrationNumber: DE123456789
            payorClientId: '102019'
          description: Client division information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/ClientDivisionInfo'
        customerInfo:
          nullable: true
          example:
            billingEmails:
            - billing@customer.com
            invoiceDeliveryMethod: EMAIL
          description: Customer information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/CustomerInfo'
        airCarrierInfo:
          nullable: true
          example:
            scac: AAL
            iataCode: AA
            icaoCode: AAL
          description: Air carrier information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/AirCarrierInfo'
        oceanCarrierInfo:
          nullable: true
          example:
            scac: MAEU
            bicCode: MSCU
          description: Ocean carrier information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/OceanCarrierInfo'
        truckingCarrierInfo:
          nullable: true
          example:
            mcNumber: '179059'
            scac: FDEB
            usdotNumber: '265752'
          description: Trucking carrier information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/TruckingCarrierInfo'
        forwarderInfo:
          nullable: true
          example:
            scac: FDEG
            fmcOrganizationNumber: FMC123456
          description: Forwarder information, if relevant to the organization.
          type: object
          allOf:
          - $ref: '#/components/schemas/ForwarderInfo'
        factorInfo:
          nullable: true
          example: {}
          description: Factor information, if relevant to the organization. The presence of an empty object here will create the organization as a factor.
          type: object
          allOf:
          - $ref: '#/components/schemas/FactorInfo'
        brokerageInfo:
          nullable: true
          example: {}
          description: Brokerage information, if relevant to the organization. The presence of an empty object here will create the organization as a brokerage.
          type: object
          allOf:
          - $ref: '#/components/schemas/BrokerageInfo'
        asPayee:
          example:
            invoicing:
              daysToPay: 30
              daysToPayFrom: ISSUE_DATE
            quickPay:
              daysToPay: 1
              discountPercentage: '0.02'
          description: Information applicable when this organization is the payee on a payable invoice, such as payment terms.
          allOf:
          - $ref: '#/components/schemas/OrganizationAsPayeeInput'
        asPayor:
          description: Information applicable when this organization is the payor on a receivable invoice.
          allOf:
          - $ref: '#/components/schemas/OrganizationAsPayorInput'
        occupiedAddresses:
          description: Addresses occupied by the organization
          type: array
          items:
            $ref: '#/components/schemas/AddressValue'
      required:
      - displayName
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: apiKey
      name: bearerAuth
      type: http
      description: "Bearer HTTP authentication. Allowed headers: \n  Authorization: Bearer <apiKey>"