Schematic scheduledcheckout API

The scheduledcheckout API from Schematic — 2 operation(s) for scheduledcheckout.

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

OpenAPI Specification

schematic-scheduledcheckout-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Schematic accesstokens scheduledcheckout API
  version: '0.1'
  description: Schematic API
  x-rules-engine-schema-version: v97288f60
servers:
- url: https://api.schematichq.com
security:
- ApiKeyAuth: []
tags:
- name: scheduledcheckout
paths:
  /scheduled-checkout:
    get:
      operationId: listScheduledCheckouts
      summary: List scheduled checkouts
      tags:
      - scheduledcheckout
      parameters:
      - name: company_id
        in: query
        schema:
          type: string
      - name: status
        in: query
        schema:
          $ref: '#/components/schemas/ScheduledCheckoutStatus'
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ScheduledCheckoutResponseData'
                    title: ListScheduledCheckoutsResponseData
                    maxItems: 250
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      company_id:
                        type: string
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      status:
                        $ref: '#/components/schemas/ScheduledCheckoutStatus'
                    title: ListScheduledCheckoutsParams
                required:
                - data
                - params
                title: ListScheduledCheckoutsResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    post:
      operationId: createScheduledCheckout
      summary: Create scheduled checkout
      tags:
      - scheduledcheckout
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateScheduledCheckoutRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ScheduledCheckoutResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: CreateScheduledCheckoutParams
                required:
                - data
                - params
                title: CreateScheduledCheckoutResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /scheduled-checkout/{scheduled_checkout_id}:
    get:
      operationId: getScheduledCheckout
      summary: Get scheduled checkout
      tags:
      - scheduledcheckout
      parameters:
      - name: scheduled_checkout_id
        in: path
        description: scheduled_checkout_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ScheduledCheckoutResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: GetScheduledCheckoutParams
                required:
                - data
                - params
                title: GetScheduledCheckoutResponse
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    put:
      operationId: updateScheduledCheckout
      summary: Update scheduled checkout
      tags:
      - scheduledcheckout
      parameters:
      - name: scheduled_checkout_id
        in: path
        description: scheduled_checkout_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateScheduledCheckoutRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ScheduledCheckoutResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: UpdateScheduledCheckoutParams
                required:
                - data
                - params
                title: UpdateScheduledCheckoutResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  responses:
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ServerError:
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  schemas:
    ScheduledCheckoutResponseData:
      type: object
      properties:
        actor_type:
          type: string
        company_id:
          type: string
        completed_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        error_message:
          type: string
          nullable: true
        execute_after:
          type: string
          format: date-time
        from_plan_id:
          type: string
        id:
          type: string
        scheduled_interval:
          type: string
          nullable: true
        scheduled_price:
          type: integer
          format: int64
          nullable: true
        started_at:
          type: string
          format: date-time
          nullable: true
        status:
          $ref: '#/components/schemas/ScheduledCheckoutStatus'
        to_plan_id:
          type: string
        updated_at:
          type: string
          format: date-time
      required:
      - actor_type
      - company_id
      - created_at
      - execute_after
      - from_plan_id
      - id
      - status
      - to_plan_id
      - updated_at
      title: ScheduledCheckoutResponseData
    UpdateScheduledCheckoutRequest:
      type: object
      properties:
        execute_after:
          type: string
          format: date-time
          nullable: true
        status:
          allOf:
          - $ref: '#/components/schemas/ScheduledCheckoutStatus'
          nullable: true
      title: UpdateScheduledCheckoutRequest
    ScheduledCheckoutStatus:
      type: string
      enum:
      - cancelled
      - error
      - executing
      - pending
      - success
    ApiError:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
      - error
    CreateScheduledCheckoutRequest:
      type: object
      properties:
        company_id:
          type: string
        execute_after:
          type: string
          format: date-time
        from_plan_id:
          type: string
        to_plan_id:
          type: string
      required:
      - company_id
      - execute_after
      - from_plan_id
      - to_plan_id
      title: CreateScheduledCheckoutRequest
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Schematic-Api-Key