Rentle Products API

Product-related queries

OpenAPI Specification

rentle-products-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Twice Admin API Keys Products API
  description: API documentation for Twice Admin API
  version: '2023-02-01'
  contact: {}
  x-logo:
    url: https://firebasestorage.googleapis.com/v0/b/rentle-prod.appspot.com/o/logos%2Ftwice-logo-outline-black-padded.png?alt=media&token=c6731aba-03c9-4ce9-a9f0-a68478924fe0
servers:
- url: https://api.twicecommerce.com/admin
  description: Production API
tags:
- name: Products
  description: Product-related queries
paths:
  /products/{id}:
    get:
      description: Get a single product by id.
      operationId: products_get
      parameters:
      - name: id
        required: true
        in: path
        description: The id of the product to retrieve
        schema:
          type: string
      - name: x-rentle-version
        in: header
        description: API Version, e.g `2023-02-01`. See [versioning](/#tag/versioning) page for more details.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Product
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductDTO'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestExceptionDTO'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenExceptionDTO'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundExceptionDTO'
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictExceptionDTO'
        '429':
          description: Quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotaExceededExceptionDTO'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorExceptionDTO'
      summary: Get product
      tags:
      - Products
    delete:
      description: Deletes a single product by id.
      operationId: products_remove
      parameters:
      - name: id
        required: true
        in: path
        schema:
          type: string
      - name: x-rentle-version
        in: header
        description: API Version, e.g `2023-02-01`. See [versioning](/#tag/versioning) page for more details.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestExceptionDTO'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenExceptionDTO'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundExceptionDTO'
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictExceptionDTO'
        '429':
          description: Quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotaExceededExceptionDTO'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorExceptionDTO'
      summary: Delete product
      tags:
      - Products
  /products:
    get:
      description: Get all products that belong to a merchant. Filtering by store is supported.
      operationId: products_list
      parameters:
      - name: limit
        required: false
        in: query
        description: How many objects to retrieve.
        schema:
          minimum: 1
          maximum: 100
          type: integer
      - name: pageToken
        required: false
        in: query
        description: Token to retrieve the next page of results. This is returned in the paged response.
        schema:
          minLength: 1
          type: string
      - name: storeId
        required: false
        in: query
        description: Comma-separated id of stores to filter by.
        schema:
          example: JnoqPQEcef82SSe3JknH,v9P9INmo8fLiKkHfmgzO
          type: string
      - name: categories
        required: false
        in: query
        description: Comma-separated id of categories to filter by. If multiple values are provided, then the result includes products that belong to any of the provided categories.
        schema:
          type: string
      - name: x-rentle-version
        in: header
        description: API Version, e.g `2023-02-01`. See [versioning](/#tag/versioning) page for more details.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Paginated list of products
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedProductsDTO'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestExceptionDTO'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenExceptionDTO'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundExceptionDTO'
        '409':
          description: Conflict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictExceptionDTO'
        '429':
          description: Quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotaExceededExceptionDTO'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorExceptionDTO'
      summary: Get all products
      tags:
      - Products
components:
  schemas:
    ConflictExceptionDTO:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              description: HTTP status code of the response.
              type: number
            code:
              description: Internal text code that represents the type of error.
              type: string
            message:
              description: Human-friendly description of the error
              type: string
            details:
              description: Details about errors in the request body
              type: array
              items:
                type: object
                properties:
                  path:
                    description: Path to the key in the request body, splitted by parts.
                    type: array
                    items:
                      type: string
                  message:
                    description: Specific errors in the value of the field.
                    type: string
                required:
                - path
                - message
          required:
          - status
          - code
          - message
      required:
      - error
      title: Conflict
      example:
        error:
          status: 409
          code: CONFLICT
          message: Conflict error
    NotFoundExceptionDTO:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              description: HTTP status code of the response.
              type: number
            code:
              description: Internal text code that represents the type of error.
              type: string
            message:
              description: Human-friendly description of the error
              type: string
            details:
              description: Details about errors in the request body
              type: array
              items:
                type: object
                properties:
                  path:
                    description: Path to the key in the request body, splitted by parts.
                    type: array
                    items:
                      type: string
                  message:
                    description: Specific errors in the value of the field.
                    type: string
                required:
                - path
                - message
          required:
          - status
          - code
          - message
      required:
      - error
      title: Not Found
      example:
        error:
          status: 404
          code: NOT_FOUND
          message: Object not found
    QuotaExceededExceptionDTO:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              description: HTTP status code of the response.
              type: number
            code:
              description: Internal text code that represents the type of error.
              type: string
            message:
              description: Human-friendly description of the error
              type: string
            details:
              description: Details about errors in the request body
              type: array
              items:
                type: object
                properties:
                  path:
                    description: Path to the key in the request body, splitted by parts.
                    type: array
                    items:
                      type: string
                  message:
                    description: Specific errors in the value of the field.
                    type: string
                required:
                - path
                - message
          required:
          - status
          - code
          - message
      required:
      - error
      title: Quota Exceeded
      example:
        error:
          status: 429
          code: RATE_LIMIT_HIT
          message: Your API key has exceeded the rate limit. Please wait a moment before making new requests.
    ForbiddenExceptionDTO:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              description: HTTP status code of the response.
              type: number
            code:
              description: Internal text code that represents the type of error.
              type: string
            message:
              description: Human-friendly description of the error
              type: string
            details:
              description: Details about errors in the request body
              type: array
              items:
                type: object
                properties:
                  path:
                    description: Path to the key in the request body, splitted by parts.
                    type: array
                    items:
                      type: string
                  message:
                    description: Specific errors in the value of the field.
                    type: string
                required:
                - path
                - message
          required:
          - status
          - code
          - message
      required:
      - error
      title: Forbidden
      example:
        error:
          status: 403
          code: FORBIDDEN
          message: You are do not have permission to perform this action. The problem could be missing API scopes or an expired/invalid API token.
    BadRequestExceptionDTO:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              description: HTTP status code of the response.
              type: number
            code:
              description: Internal text code that represents the type of error.
              type: string
            message:
              description: Human-friendly description of the error
              type: string
            details:
              description: Details about errors in the request body
              type: array
              items:
                type: object
                properties:
                  path:
                    description: Path to the key in the request body, splitted by parts.
                    type: array
                    items:
                      type: string
                  message:
                    description: Specific errors in the value of the field.
                    type: string
                required:
                - path
                - message
          required:
          - status
          - code
          - message
      required:
      - error
      title: Bad Request
      example:
        error:
          status: 400
          code: INVALID_ARGUMENTS
          details:
          - path:
            - startDate
            message: Required
          - path:
            - duration
            message: Required
          message: Your request contained invalid arguments
    InternalServerErrorExceptionDTO:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              description: HTTP status code of the response.
              type: number
            code:
              description: Internal text code that represents the type of error.
              type: string
            message:
              description: Human-friendly description of the error
              type: string
            details:
              description: Details about errors in the request body
              type: array
              items:
                type: object
                properties:
                  path:
                    description: Path to the key in the request body, splitted by parts.
                    type: array
                    items:
                      type: string
                  message:
                    description: Specific errors in the value of the field.
                    type: string
                required:
                - path
                - message
          required:
          - status
          - code
          - message
      required:
      - error
      title: Internal Server Error
      example:
        error:
          status: 500
          code: INTERNAL_SERVER_ERROR
          message: An unexpected error occurred. Please try again later.
    PagedProductsDTO:
      type: object
      properties:
        data:
          description: List of returned resources
          type: array
          items:
            title: Product
            description: Product document
            example:
              id: rELTwTSkZ1gpCO1SU06F
              createdAt: '2026-07-19T01:04:26.264Z'
              categoryIds:
              - VWMpQf8qMUdzLICI8cro
              name:
                def: Product name
                en: Product name
              description:
                def: Product description
                en: Product description
              images:
              - image_url
              isPackage: false
              taxPercentage: 10
              recommendedProductIds:
              - wrgaBP5j5zVObPv4x2rm
              limitations:
                storeIds:
                - Gpqp1fYFKUNYIA5MfEDL
                channels:
                - online
                maintenanceTimeMinutes: 60
                onlineAvailabilityPercentage: 100
                startTimes:
                  type: interval
                  intervalMinutes: 60
                startTimesConfig:
                  type: dateAndTime
                  value:
                  - type: weekly
                    value:
                      weekDays:
                      - 1
                      - 2
                      - 3
                      - 4
                      - 5
                      - 6
                      - 7
                      startTimes:
                        type: interval
                        value:
                          intervalMinutes: 60
                  maxOrdersPerStartTime: null
                bookingBuffer:
                  daysBefore: 1
                  latestTime: 18
                visibleInListing: true
              order: 1
              rentals:
                enabled: true
                basePrice: 2000
                pricing:
                - timePeriod: days
                  timeValue: 1
                  price: 2000
                deposit: 10000
              sales:
                basePrice: 19900
                enabled: true
              variantProperties:
              - id: VgXM1pk0Prj2H1K0E0DU
                name:
                  def: Size
                  en: Size
              variants:
              - id: UcdSRxFLJaA3taZQNTzP
                properties:
                - name:
                    def: Variant name
                    en: Variant name
                  value:
                    def: Variant value
                    en: Variant value
                  propertyId: VgXM1pk0Prj2H1K0E0DU
                sales:
                  enabled: true
                rentals:
                  enabled: true
                inventory:
                - - skuId: SKU-1
                    units: 1
                    type: single
              - id: vXi9fyNNQwLtRraxapfC
                properties:
                - name:
                    def: Variant name
                    en: Variant name
                  value:
                    def: Variant value
                    en: Variant value
                  propertyId: VgXM1pk0Prj2H1K0E0DU
                sales:
                  enabled: true
                rentals:
                  enabled: true
                inventory:
                - - skuId: SKU-2
                    units: 1
                    type: single
            type: object
            properties:
              id:
                description: Unique identifier of the object.
                type: string
              createdAt:
                title: ISO 8601 date-time
                description: Created date.
                type: string
              categoryIds:
                description: List of category IDs the product belongs to.
                type: array
                items:
                  type: string
              name:
                title: Localized field
                description: Name of the product.
                allOf:
                - additionalProperties:
                    type: string
                    description: The property name is the locale code, and the value is the translated text in that locale.
                  type: object
                - type: object
                  properties:
                    def:
                      description: The value in default locale.
                      type: string
                  required:
                  - def
              description:
                description: Product description.
                title: Localized field
                allOf:
                - additionalProperties:
                    type: string
                    description: The property name is the locale code, and the value is the translated text in that locale.
                  type: object
                - type: object
                  properties:
                    def:
                      description: The value in default locale.
                      type: string
                  required:
                  - def
              images:
                description: List of product image URLs.
                type: array
                items:
                  type: string
                  format: uri
              isPackage:
                description: Whether the product is a package or not.
                type: boolean
              taxPercentage:
                description: The tax percentage of the product, in percentages.
                type: integer
                minimum: 0
                maximum: 100
              recommendedProductIds:
                description: List of product IDs that are recommended to be bought together with this product.
                type: array
                items:
                  type: string
              limitations:
                description: Limitation details of the product.
                type: object
                properties:
                  storeIds:
                    description: Array of store IDs where the product is visible in. If null, product is visible in all stores.
                    type: array
                    items:
                      type: string
                  channels:
                    description: Array of channels where the product is visible in. If null, product is visible in all channels.
                    type: array
                    items:
                      type: string
                      enum:
                      - admin
                      - check_in
                      - online
                  maintenanceTimeMinutes:
                    description: The time in minutes that the product is unavailable for a new booking after the booking had ended.
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  onlineAvailabilityPercentage:
                    description: The percentage of the total product quantity that is available for online booking.
                    type: integer
                    minimum: 0
                    maximum: 100
                  startTimes:
                    description: Start times settings of the product. Deprecated, use 'startTimesConfig' instead.
                    deprecated: true
                    anyOf:
                    - title: Interval start times (Deprecated, use `startTimesConfig` instead)
                      type: object
                      properties:
                        orderLimit:
                          description: The maximum number of orders that can be placed including this product at the same time.
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        type:
                          description: Interval start times means that product has new start times based on the given intervalMinutes value.
                          type: string
                          enum:
                          - interval
                        intervalMinutes:
                          description: The time in minutes between each start time.
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      required:
                      - type
                    - title: Fixed start times (Deprecated, use `startTimesConfig` instead)
                      type: object
                      properties:
                        orderLimit:
                          description: The maximum number of orders that can be placed including this product at the same time.
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        type:
                          description: Fixed start times means that product has only a fixed set of start times defined.
                          type: string
                          enum:
                          - fixed
                        fixedTimes:
                          description: List of the fixed start times.
                          type: array
                          items:
                            anyOf:
                            - title: Single date
                              type: object
                              properties:
                                day:
                                  description: Custom day means a specific date defined in `customDate`.
                                  type: string
                                  enum:
                                  - custom
                                customDate:
                                  title: ISO 8601 date-time
                                  description: The custom date in ISO format.
                                  type: string
                                time:
                                  title: HH:MM time
                                  description: Time of day in 24 hour HH:MM format.
                                  type: string
                              required:
                              - day
                              - customDate
                              - time
                            - title: Repeating day
                              type: object
                              properties:
                                day:
                                  description: Which day or days the time is valid.
                                  type: string
                                  enum:
                                  - all_days
                                  - weekdays
                                  - weekends
                                  - monday
                                  - tuesday
                                  - wednesday
                                  - thursday
                                  - friday
                                  - saturday
                                  - sunday
                                time:
                                  title: HH:MM time
                                  description: Time of day in 24 hour HH:MM format.
                                  type: string
                              required:
                              - day
                              - time
                        allowTimesOutsideOpeningHours:
                          description: Whether to allow fixed start times that are outside store opening hours.
                          type: boolean
                      required:
                      - type
                      - fixedTimes
                      - allowTimesOutsideOpeningHours
                  startTimesConfig:
                    description: Start times settings of the product.
                    type: object
                    properties:
                      value:
                        description: An array of start times configurations
                        type: array
                        items:
                          description: A start times configuration object for either a week's days or a set of dates
                          anyOf:
                          - description: Weekly recurring start times
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                - weekly
                              value:
                                description: Weekly recurring start times
                                type: object
                                properties:
                                  weekDays:
                                    description: An array of ISO Weekday numbers (1-7) that the start times apply to
                                    type: array
                                    items:
                                      type: number
                                      enum:
                                      - 1
                                      - 2
                                      - 3
                                      - 4
                                      - 5
                                      - 6
                                      - 7
                                  startTimes:
                                    description: The start times for those weekdays
                                    anyOf:
                                    - description: Interval start times
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                          - interval
                                        value:
                                          description: Interval start times definition
                                          type: object
                                          properties:
                                            intervalMinutes:
                                              description: The time in minutes between each start time
                                              type: integer
                                              exclusiveMinimum: true
                                              maximum: 9007199254740991
                                              minimum: 0
                                          required:
                                          - intervalMinutes
                                      required:
                                      - type
                                      - value
                                    - description: Fixed start times
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                          - fixed
                                        value:
                                          description: Fixed start times definition
                                          type: object
                                          properties:
                                            times:
                                              description: An array of times in HH:mm format (24 hour format)
                                              type: array
                                              items:
                                                description: A time in HH:mm format
                                                type: string
                                            ignoreOpeningHours:
                                              description: Whether to allow start times outside of opening hours
                                              type: boolean
                                          required:
                                          - times
                                          - ignoreOpeningHours
                                      required:
                                      - type
                                      - value
                                    nullable: true
                                required:
                                - weekDays
                                - startTimes
                            required:
                            - type
                            - value
                          - description: Exception start times (specific dates)
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                - exceptional
                              value:
                                description: Exception start times
                                type: object
                                properties:
                                  dates:
                                    description: An array of dates in ('YYY

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