Rapidata Order API

The Order API from Rapidata — 19 operation(s) for order.

OpenAPI Specification

rapidata-order-api-openapi.yml Raw ↑
openapi: 3.0.4
info:
  title: Rapidata Asset Order API
  description: The API for the Rapidata Asset service
  version: v1
servers:
- url: https://api.rapidata.ai/
tags:
- name: Order
  x-displayName: Order
paths:
  /order/{orderId}/approve:
    post:
      tags:
      - Order
      summary: Approves a submitted order so the pipeline can start processing it.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order to approve.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/{orderId}/clone:
    post:
      tags:
      - Order
      summary: Clones an existing public order.
      description: The order to clone must be marked as public.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order to clone.
        required: true
        schema:
          type: string
      requestBody:
        description: The clone order details.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloneOrderEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloneOrderEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/complex:
    post:
      tags:
      - Order
      summary: Creates a new order with a custom pipeline configuration.
      requestBody:
        description: The complex order creation details.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateComplexOrderEndpoint_Input'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateComplexOrderEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order:
    post:
      tags:
      - Order
      summary: Creates a new order with the given configuration.
      description: "Once created, use the returned dataset ID to fill the dataset with datapoints,\n then submit the order for processing."
      requestBody:
        description: The order creation configuration.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderModel'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrderEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/unsupported:
    post:
      tags:
      - Order
      summary: Creates a notification for an unsupported order type.
      requestBody:
        description: The unsupported order details.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUnsupportedOrderEndpoint_Input'
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/{orderId}:
    delete:
      tags:
      - Order
      summary: Deletes an order and its associated resources.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order to delete.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
    get:
      tags:
      - Order
      summary: Retrieves the details of a specific order.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrderByIdEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
    patch:
      tags:
      - Order
      summary: Updates the name or preceding order of an order.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order to update.
        required: true
        schema:
          type: string
      requestBody:
        description: The properties to update.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrderEndpoint_Input'
        required: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/{orderId}/download-results:
    get:
      tags:
      - Order
      summary: Aggregates the results of an order and returns them as a file attachment.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/{orderId}/results:
    get:
      tags:
      - Order
      summary: Aggregates the results of an order and returns them as a JSON string.
      description: For file download, use the download-results endpoint instead.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: string
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /orders/public:
    get:
      tags:
      - Order
      summary: Retrieves all publicly available orders.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPublicOrdersEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/{orderId}/demo:
    patch:
      tags:
      - Order
      summary: Marks or unmarks an order as a demo.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order.
        required: true
        schema:
          type: string
      - name: isDemo
        in: query
        description: Whether to mark or unmark the order as a demo.
        schema:
          type: boolean
          default: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/{orderId}/pause:
    post:
      tags:
      - Order
      summary: Pauses an order, stopping all campaigns from processing.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order to pause.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/{orderId}/preview:
    post:
      tags:
      - Order
      summary: Starts preview mode for an order so labelers' experience can be inspected.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order to preview.
        required: true
        schema:
          type: string
      requestBody:
        description: Optional preview configuration.
        content:
          application/json:
            schema:
              type: object
              oneOf:
              - $ref: '#/components/schemas/PreviewOrderEndpoint_Input'
              nullable: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /orders/aggregated-overview:
    get:
      tags:
      - Order
      summary: Retrieves orders aggregated by customer with total amounts and most recent order information.
      parameters:
      - name: page
        in: query
        description: The 1-based page index.
        schema:
          type: integer
        x-parameter-group: page
      - name: page_size
        in: query
        description: The number of items per page.
        schema:
          type: integer
        x-parameter-group: page
      - name: sort
        in: query
        description: Sort fields. Prefix with - for descending order (e.g. -created_at).
        schema:
          type: array
          items:
            enum:
            - amount
            - -amount
            - last7_days
            - -last7_days
            - last_order_date
            - -last_order_date
            - customer_mail
            - -customer_mail
            type: string
        x-parameter-group: sort
      - name: customer_mail
        in: query
        description: Filter by customer_mail.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: last_order_date
        in: query
        description: Filter by last_order_date.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: last_order_name
        in: query
        description: Filter by last_order_name.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: logic
        in: query
        description: 'How to combine the field filters: "and" (default) requires every filter to match, "or" requires any of them to match.'
        schema:
          enum:
          - and
          - or
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryAggregatedOrdersEndpoint_PagedResultOfOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /orders:
    get:
      tags:
      - Order
      summary: Queries orders with filtering and pagination.
      parameters:
      - name: page
        in: query
        description: The 1-based page index.
        schema:
          type: integer
        x-parameter-group: page
      - name: page_size
        in: query
        description: The number of items per page.
        schema:
          type: integer
        x-parameter-group: page
      - name: sort
        in: query
        description: Sort fields. Prefix with - for descending order (e.g. -created_at).
        schema:
          type: array
          items:
            enum:
            - order_name
            - -order_name
            - order_date
            - -order_date
            - state
            - -state
            type: string
        x-parameter-group: sort
      - name: order_name
        in: query
        description: Filter by order_name.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: state
        in: query
        description: Filter by state.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: order_date
        in: query
        description: Filter by order_date.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: customer_mail
        in: query
        description: Filter by customer_mail.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: is_public
        in: query
        description: Filter by is_public.
        style: deepObject
        explode: true
        schema:
          type: object
          properties:
            eq:
              type: string
            neq:
              type: string
            gt:
              type: string
            gte:
              type: string
            lt:
              type: string
            lte:
              type: string
            contains:
              type: string
            starts_with:
              type: string
            ends_with:
              type: string
            in:
              type: array
              items:
                type: string
            not_contains:
              type: string
        x-parameter-group: filters
      - name: logic
        in: query
        description: 'How to combine the field filters: "and" (default) requires every filter to match, "or" requires any of them to match.'
        schema:
          enum:
          - and
          - or
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryOrdersEndpoint_PagedResultOfOutput'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/{orderId}/resume:
    post:
      tags:
      - Order
      summary: Resumes a paused order, restarting all campaigns.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order to resume.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/{orderId}/retry:
    post:
      tags:
      - Order
      summary: Retries processing of a failed order.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order to retry.
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/{orderId}/share:
    patch:
      tags:
      - Order
      summary: Marks or unmarks an order as public.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order.
        required: true
        schema:
          type: string
      - name: isPublic
        in: query
        description: Whether to mark or unmark the order as public.
        schema:
          type: boolean
          default: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/{orderId}/submit:
    post:
      tags:
      - Order
      summary: Submits an order for processing.
      description: Once submitted, the order will be locked and no further changes can be made.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order to submit.
        required: true
        schema:
          type: string
      requestBody:
        description: Optional submission configuration.
        content:
          application/json:
            schema:
              type: object
              oneOf:
              - $ref: '#/components/schemas/SubmitOrderEndpoint_Input'
              nullable: true
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
  /order/{orderId}/unlock:
    post:
      tags:
      - Order
      summary: Unlocks a cloned order so it can be modified.
      description: Unlocking clones the entire dataset and its datapoints.
      parameters:
      - name: orderId
        in: path
        description: The ID of the order to unlock.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnlockOrderEndpoint_Output'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '401':
          description: Unauthenticated
        '403':
          description: Forbidden
      security:
      - OpenIdConnect:
        - openid
        - profile
        - email
        - offline_access
components:
  schemas:
    UnlockOrderEndpoint_Output:
      required:
      - datasetIds
      type: object
      properties:
        datasetIds:
          allOf:
          - type: object
            additionalProperties:
              type: string
          description: The dataset IDs created by unlocking the order.
    CreateComplexOrderEndpoint_Output:
      required:
      - orderId
      - pipelineId
      type: object
      properties:
        datasetId:
          type: string
          description: The dataset ID of the created order.
          nullable: true
        orderId:
          type: string
          description: The ID of the created order.
        campaignId:
          type: string
          description: The campaign ID of the created order.
          nullable: true
        pipelineId:
          type: string
          description: The pipeline ID of the created order.
    IUserFilterModelResponseCountUserFilterModel:
      required:
      - responseCount
      - dimension
      - operator
      - _t
      properties:
        _t:
          enum:
          - ResponseCountFilter
          type: string
        responseCount:
          type: integer
          format: uint32
        dimension:
          type: string
        operator:
          $ref: '#/components/schemas/ComparisonOperator'
    RetrievalMode:
      enum:
      - Random
      - Shuffled
      - Sequential
    IRapidBlueprint:
      required:
      - _t
      type: object
      oneOf:
      - $ref: '#/components/schemas/IRapidBlueprintAttachCategoryRapidBlueprint'
      - $ref: '#/components/schemas/IRapidBlueprintBoundingBoxRapidBlueprint'
      - $ref: '#/components/schemas/IRapidBlueprintCompareRapidBlueprint'
      - $ref: '#/components/schemas/IRapidBlueprintFreeTextRapidBlueprint'
      - $ref: '#/components/schemas/IRapidBlueprintLineRapidBlueprint'
      - $ref: '#/components/schemas/IRapidBlueprintLocateRapidBlueprint'
      - $ref: '#/components/schemas/IRapidBlueprintNamedEntityRapidBlueprint'
      - $ref: '#/components/schemas/IRapidBlueprintPolygonRapidBlueprint'
      - $ref: '#/components/schemas/IRapidBlueprintScrubRapidBlueprint'
      - $ref: '#/components/schemas/IRapidBlueprintTranscriptionRapidBlueprint'
      discriminator:
        propertyName: _t
        mapping:
          ClassifyBlueprint: '#/components/schemas/IRapidBlueprintAttachCategoryRapidBlueprint'
          BoundingBoxBlueprint: '#/components/schemas/IRapidBlueprintBoundingBoxRapidBlueprint'
          CompareBlueprint: '#/components/schemas/IRapidBlueprintCompareRapidBlueprint'
          FreeTextBlueprint: '#/components/schemas/IRapidBlueprintFreeTextRapidBlueprint'
          LineBlueprint: '#/components/schemas/IRapidBlueprintLineRapidBlueprint'
          LocateBlueprint: '#/components/schemas/IRapidBlueprintLocateRapidBlueprint'
          NamedEntityBlueprint: '#/components/schemas/IRapidBlueprintNamedEntityRapidBlueprint'
          PolygonBlueprint: '#/components/schemas/IRapidBlueprintPolygonRapidBlueprint'
          ScrubBlueprint: '#/components/schemas/IRapidBlueprintScrubRapidBlueprint'
          TranscriptionBlueprint: '#/components/schemas/IRapidBlueprintTranscriptionRapidBlueprint'
    IUserFilterModelUserScoreUserFilterModel:
      required:
      - _t
      properties:
        _t:
          enum:
          - UserScoreFilter
          type: string
        lowerbound:
          type: number
          format: double
        upperbound:
          type: number
          format: double
        dimension:
          type: string
          nullable: true
    IRapidBlueprintAttachCategoryRapidBlueprint:
      required:
      - categories
      - title
      - _t
      properties:
        _t:
          enum:
          - ClassifyBlueprint
          type: string
        categories:
          type: array
          items:
            $ref: '#/components/schemas/AttachCategoryRapidBlueprint_Category'
        possibleCategories:
          type: array
          items:
            type: string
          nullable: true
        title:
          type: string
    IRankingConfigModelBradleyTerryRankingConfigModel:
      required:
      - startingScore
      - _t
      properties:
        _t:
          enum:
          - BradleyTerryRankingConfig
          type: string
        startingScore:
          type: integer
          format: int32
    QueryAggregatedOrdersEndpoint_Output:
      required:
      - amount
      - last7Days
      - lastOrderDate
      - lastOrderName
      - lastOrderId
      - customerMail
      type: object
      properties:
        amount:
          type: integer
          description: The total number of orders for this customer.
          format: int32
        last7Days:
          type: integer
          description: The number of orders placed in the last 7 days.
          format: int32
        lastOrderDate:
          type: string
          description: The date of the most recent order.
          format: date-time
        lastOrderName:
          type: string
          description: The name of the most recent order.
        lastOrderId:
          type: string
          description: The ID of the most recent order.
        customerMail:
          type: string
          description: The customer's email address.
    GetOrderByIdEndpoint_Output:
      required:
      - orderName
      - customerMail
      - orderDate
      - state
      - pipelineId
      - isLocked
      - isPublic
      type: object
      properties:
        orderName:
          type: string
          description: The name of the orde

# --- truncated at 32 KB (72 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/rapidata/refs/heads/main/openapi/rapidata-order-api-openapi.yml