GPT Commerce - PUBLIC

GPT Commerce - PUBLIC · GPT アクション

AINIRO Magic Cloudlet

Allows you to interact with your Magic cloudlet

  • GET /magic/modules/gpt-commerce/public/products-countget_public_products-count

    Counts items from your products table in your gpt-commerce database

  • GET /magic/modules/gpt-commerce/public/productsget_public_products

    Read endpoint with paging, sorting, filtering selecting records from your products table in your gpt-commerce database returning product_id, name, price filtering on product_id, name, price with authentication and authorisation for root,admin roles

  • POST /magic/modules/gpt-commerce/public/purchasepost_public_purchase

    Creates a new Stripe payment link for the specified price_reference, and returns the link to the caller with authentication for the admin role

元の API スキーマ
{
  "openapi": "3.1.0",
  "info": {
    "title": "AINIRO Magic Cloudlet",
    "description": "Allows you to interact with your Magic cloudlet",
    "version": "v16.11.26"
  },
  "servers": [
    {
      "url": "https://sales2-team.us.ainiro.io"
    }
  ],
  "paths": {
    "/magic/modules/gpt-commerce/public/products-count": {
      "get": {
        "operationId": "get_public_products-count",
        "description": "Counts items from your products table in your gpt-commerce database",
        "parameters": [
          {
            "name": "products.name.like",
            "description": "products table name column wildcard filtering with SQL like '%' comparison",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "products.name.eq",
            "description": "products table name column equality exact match filtering",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/magic/modules/gpt-commerce/public/products": {
      "get": {
        "operationId": "get_public_products",
        "description": "Read endpoint with paging, sorting, filtering selecting records from your products table in your gpt-commerce database returning product_id, name, price filtering on product_id, name, price with authentication and authorisation for root,admin roles",
        "parameters": [
          {
            "name": "limit",
            "description": "Number of records to return",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "description": "Offset into the dataset of where to start retrieving records",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "order",
            "description": "What column to order by",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "description": "What direction to order, can be 'asc' or 'desc' implying ascending and descending",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "products.product_id.eq",
            "description": "products table product_id column equality exact match filtering",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "products.name.like",
            "description": "products table name column wildcard filtering with SQL like '%' comparison",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "products.name.eq",
            "description": "products table name column equality exact match filtering",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/magic/modules/gpt-commerce/public/purchase": {
      "post": {
        "operationId": "post_public_purchase",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "description": "Creates a new Stripe payment link for the specified price_reference, and returns the link to the caller with authentication for the admin role",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "price_reference": {
                    "type": "string"
                  },
                  "success_url": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}