{
  "x402Version": 2,
  "id": 38142,
  "slug": "38142",
  "resource": "https://api.botx402.io/api/v1/agent/inventory-reorder/run",
  "description": "Reorder plan from your SKU sales, stock and lead times: what to order now, how many, what is overstocked, where cash is stuck. PDF + JSON.",
  "type": "http",
  "serviceName": "botx402",
  "resourceType": "AI Inference",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x007bc3987566F3aca40adC3F36c56207E1E0c2fc",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 900
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "properties": {
          "access_token": {
            "type": "string"
          },
          "payer_wallet": {
            "type": "string"
          },
          "payment_method": {
            "type": "string"
          },
          "receipt_id": {
            "type": "string"
          },
          "status_url": {
            "description": "GET with X-Access-Token until status is completed",
            "type": "string"
          }
        },
        "required": [
          "receipt_id",
          "status_url",
          "payer_wallet",
          "payment_method",
          "access_token"
        ],
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "inputs": {
              "as_of": "2026-09-30",
              "currency": "USD",
              "defaults": {
                "lead_time_days": 14,
                "safety_days": 7,
                "target_cover_days": 30
              },
              "skus": [
                {
                  "moq": 50,
                  "on_hand": 40,
                  "on_order": 0,
                  "sku": "MUG-BLUE",
                  "title": "Blue enamel mug",
                  "unit_cost": 6.5,
                  "unit_price": 18,
                  "units_sold": 180
                },
                {
                  "on_hand": 0,
                  "order_multiple": 12,
                  "sku": "MUG-RED",
                  "title": "Red enamel mug",
                  "unit_cost": 6.5,
                  "unit_price": 18,
                  "units_sold": 95
                },
                {
                  "on_hand": 300,
                  "on_order": 100,
                  "sku": "TOTE-NAT",
                  "title": "Natural canvas tote",
                  "unit_cost": 9,
                  "unit_price": 24,
                  "units_sold": 12
                },
                {
                  "on_hand": 75,
                  "sku": "POSTER-A3",
                  "title": "A3 poster",
                  "unit_cost": 2,
                  "unit_price": 15,
                  "units_sold": 0
                },
                {
                  "days_out_of_stock": 20,
                  "lead_time_days": 30,
                  "on_hand": 25,
                  "on_order": 40,
                  "sku": "CANDLE-SM",
                  "title": "Small candle",
                  "unit_cost": 4,
                  "unit_price": 12,
                  "units_sold": 60
                }
              ],
              "window_days": 90
            }
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "access_token": "<per-run token>",
            "payer_wallet": "0x857b06519e91e3a54538791bdbb0e22373e36b66",
            "payment_method": "x402",
            "receipt_id": "IR-202610-EXAMPLE1",
            "status_url": "https://api.botx402.io/api/v1/agent/runs/IR-202610-EXAMPLE1"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "properties": {
                  "connection_id": {
                    "description": "Long-lived OAuth handle from POST /api/v1/agent/connections/{provider}",
                    "type": "string"
                  },
                  "email": {
                    "description": "Optional. When set, fulfillment emails the result PDF link.",
                    "format": "email",
                    "type": "string"
                  },
                  "inputs": {
                    "additionalProperties": false,
                    "properties": {
                      "as_of": {
                        "description": "Last day covered by the sales figures (YYYY-MM-DD). Echoed in the report.",
                        "format": "date",
                        "type": "string"
                      },
                      "currency": {
                        "description": "ISO currency code for prices and costs. Display only. Defaults to USD.",
                        "pattern": "^[A-Z]{3}$",
                        "type": "string"
                      },
                      "defaults": {
                        "additionalProperties": false,
                        "description": "Fallbacks for SKUs that do not set their own. lead_time_days is required here unless every SKU sets it.",
                        "properties": {
                          "lead_time_days": {
                            "maximum": 365,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "safety_days": {
                            "maximum": 365,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "target_cover_days": {
                            "description": "Days of stock an order should cover on top of lead time and safety days. Defaults to 30.",
                            "maximum": 365,
                            "minimum": 1,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "skus": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "days_out_of_stock": {
                              "description": "Days in the window the SKU had no stock. Missing means 0. Cannot exceed window_days.",
                              "maximum": 365,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "lead_time_days": {
                              "maximum": 365,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "moq": {
                              "description": "Minimum order quantity. An order below it is raised to it.",
                              "maximum": 1000000000,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "on_hand": {
                              "maximum": 1000000000,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "on_order": {
                              "description": "Units on open purchase orders. Assumed to arrive after lead_time_days.",
                              "maximum": 1000000000,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "order_multiple": {
                              "description": "Case pack. Order quantities are rounded up to a multiple of it.",
                              "maximum": 1000000000,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "safety_days": {
                              "maximum": 365,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "sku": {
                              "maxLength": 64,
                              "minLength": 1,
                              "type": "string"
                            },
                            "target_cover_days": {
                              "maximum": 365,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "title": {
                              "maxLength": 200,
                              "type": "string"
                            },
                            "unit_cost": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "unit_price": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "units_sold": {
                              "description": "Net units sold in the window (after returns).",
                              "maximum": 1000000000,
                              "minimum": 0,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "sku",
                            "units_sold",
                            "on_hand",
                            "unit_price",
                            "unit_cost"
                          ],
                          "type": "object"
                        },
                        "maxItems": 800,
                        "minItems": 1,
                        "type": "array"
                      },
                      "window_days": {
                        "description": "Days of sales history the units_sold figures cover. Defaults to 90 when omitted.",
                        "maximum": 365,
                        "minimum": 28,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "as_of",
                      "skus"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "inputs"
                ],
                "type": "object"
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST",
                  "PUT",
                  "PATCH"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "properties": {
                  "access_token": {
                    "type": "string"
                  },
                  "payer_wallet": {
                    "type": "string"
                  },
                  "payment_method": {
                    "type": "string"
                  },
                  "receipt_id": {
                    "type": "string"
                  },
                  "status_url": {
                    "description": "GET with X-Access-Token until status is completed",
                    "type": "string"
                  }
                },
                "required": [
                  "receipt_id",
                  "status_url",
                  "payer_wallet",
                  "payment_method",
                  "access_token"
                ],
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "inventory",
    "reorder",
    "ecommerce",
    "retail",
    "stock",
    "bazaar"
  ],
  "sourceHost": "api.botx402.io",
  "lastUpdated": "2026-10-01T13:25:34.886Z",
  "quality": {
    "calls30d": 1,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-10-01T13:25:34.677Z"
  },
  "metadata": {
    "serviceName": "botx402",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "body": {
              "inputs": {
                "as_of": "2026-09-30",
                "currency": "USD",
                "defaults": {
                  "lead_time_days": 14,
                  "safety_days": 7,
                  "target_cover_days": 30
                },
                "skus": [
                  {
                    "moq": 50,
                    "on_hand": 40,
                    "on_order": 0,
                    "sku": "MUG-BLUE",
                    "title": "Blue enamel mug",
                    "unit_cost": 6.5,
                    "unit_price": 18,
                    "units_sold": 180
                  },
                  {
                    "on_hand": 0,
                    "order_multiple": 12,
                    "sku": "MUG-RED",
                    "title": "Red enamel mug",
                    "unit_cost": 6.5,
                    "unit_price": 18,
                    "units_sold": 95
                  },
                  {
                    "on_hand": 300,
                    "on_order": 100,
                    "sku": "TOTE-NAT",
                    "title": "Natural canvas tote",
                    "unit_cost": 9,
                    "unit_price": 24,
                    "units_sold": 12
                  },
                  {
                    "on_hand": 75,
                    "sku": "POSTER-A3",
                    "title": "A3 poster",
                    "unit_cost": 2,
                    "unit_price": 15,
                    "units_sold": 0
                  },
                  {
                    "days_out_of_stock": 20,
                    "lead_time_days": 30,
                    "on_hand": 25,
                    "on_order": 40,
                    "sku": "CANDLE-SM",
                    "title": "Small candle",
                    "unit_cost": 4,
                    "unit_price": 12,
                    "units_sold": 60
                  }
                ],
                "window_days": 90
              }
            },
            "bodyType": "json",
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "access_token": "<per-run token>",
              "payer_wallet": "0x857b06519e91e3a54538791bdbb0e22373e36b66",
              "payment_method": "x402",
              "receipt_id": "IR-202610-EXAMPLE1",
              "status_url": "https://api.botx402.io/api/v1/agent/runs/IR-202610-EXAMPLE1"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "properties": {
                    "connection_id": {
                      "description": "Long-lived OAuth handle from POST /api/v1/agent/connections/{provider}",
                      "type": "string"
                    },
                    "email": {
                      "description": "Optional. When set, fulfillment emails the result PDF link.",
                      "format": "email",
                      "type": "string"
                    },
                    "inputs": {
                      "additionalProperties": false,
                      "properties": {
                        "as_of": {
                          "description": "Last day covered by the sales figures (YYYY-MM-DD). Echoed in the report.",
                          "format": "date",
                          "type": "string"
                        },
                        "currency": {
                          "description": "ISO currency code for prices and costs. Display only. Defaults to USD.",
                          "pattern": "^[A-Z]{3}$",
                          "type": "string"
                        },
                        "defaults": {
                          "additionalProperties": false,
                          "description": "Fallbacks for SKUs that do not set their own. lead_time_days is required here unless every SKU sets it.",
                          "properties": {
                            "lead_time_days": {
                              "maximum": 365,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "safety_days": {
                              "maximum": 365,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "target_cover_days": {
                              "description": "Days of stock an order should cover on top of lead time and safety days. Defaults to 30.",
                              "maximum": 365,
                              "minimum": 1,
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        },
                        "skus": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "days_out_of_stock": {
                                "description": "Days in the window the SKU had no stock. Missing means 0. Cannot exceed window_days.",
                                "maximum": 365,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "lead_time_days": {
                                "maximum": 365,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "moq": {
                                "description": "Minimum order quantity. An order below it is raised to it.",
                                "maximum": 1000000000,
                                "minimum": 1,
                                "type": "integer"
                              },
                              "on_hand": {
                                "maximum": 1000000000,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "on_order": {
                                "description": "Units on open purchase orders. Assumed to arrive after lead_time_days.",
                                "maximum": 1000000000,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "order_multiple": {
                                "description": "Case pack. Order quantities are rounded up to a multiple of it.",
                                "maximum": 1000000000,
                                "minimum": 1,
                                "type": "integer"
                              },
                              "safety_days": {
                                "maximum": 365,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "sku": {
                                "maxLength": 64,
                                "minLength": 1,
                                "type": "string"
                              },
                              "target_cover_days": {
                                "maximum": 365,
                                "minimum": 1,
                                "type": "integer"
                              },
                              "title": {
                                "maxLength": 200,
                                "type": "string"
                              },
                              "unit_cost": {
                                "minimum": 0,
                                "type": "number"
                              },
                              "unit_price": {
                                "minimum": 0,
                                "type": "number"
                              },
                              "units_sold": {
                                "description": "Net units sold in the window (after returns).",
                                "maximum": 1000000000,
                                "minimum": 0,
                                "type": "integer"
                              }
                            },
                            "required": [
                              "sku",
                              "units_sold",
                              "on_hand",
                              "unit_price",
                              "unit_cost"
                            ],
                            "type": "object"
                          },
                          "maxItems": 800,
                          "minItems": 1,
                          "type": "array"
                        },
                        "window_days": {
                          "description": "Days of sales history the units_sold figures cover. Defaults to 90 when omitted.",
                          "maximum": 365,
                          "minimum": 28,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "as_of",
                        "skus"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "inputs"
                  ],
                  "type": "object"
                },
                "bodyType": {
                  "enum": [
                    "json",
                    "form-data",
                    "text"
                  ],
                  "type": "string"
                },
                "method": {
                  "enum": [
                    "POST",
                    "PUT",
                    "PATCH"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method",
                "bodyType",
                "body"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "properties": {
                    "access_token": {
                      "type": "string"
                    },
                    "payer_wallet": {
                      "type": "string"
                    },
                    "payment_method": {
                      "type": "string"
                    },
                    "receipt_id": {
                      "type": "string"
                    },
                    "status_url": {
                      "description": "GET with X-Access-Token until status is completed",
                      "type": "string"
                    }
                  },
                  "required": [
                    "receipt_id",
                    "status_url",
                    "payer_wallet",
                    "payment_method",
                    "access_token"
                  ],
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.botx402.io",
    "manifest_name": "api.botx402.io",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {
      "access_token": "string",
      "payer_wallet": "string",
      "payment_method": "string",
      "receipt_id": "string",
      "status_url": "string"
    },
    "type": "string"
  }
}