{"files":{"SKILL.md":"---\nname: brainbi\ndescription: \"brainbi API skill. Use when working with brainbi for api. Covers 33 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# brainbi\n\n## Auth\nApiKey Authorization in header\n\n## Base URL\nNot specified.\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /api/rule -- this resource lists all pricing rules that are currently saved in you account\n3. POST /api/rule -- create first rule\n\n## Endpoints\n33 endpoints across 1 group. See references/api-spec.lap for full details.\n\n### Api\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /api/rule | This resource lists all pricing rules that are currently saved in you account |\n| GET | /api/rule/1 | This resource returns a specific rule {id} |\n| POST | /api/rule | To update a product, please use the listed attributes listed underneath |\n| GET | /api/rule/ruleData/1 | This resource lists all data that wa saved for pricing rules |\n| GET | /api/rule/ruleData/1/latest | This resource lists only the latest data point that wa saved for a pricing rule |\n| GET | /api/products | This resource lists all products that are currently saved in you account |\n| GET | /api/products/1 | This resource returns a specific product {id} |\n| GET | /api/products/23767/rules | This resource returns all available rules for a product {id} |\n| POST | /api/products | To update a product, please use the listed attributes listed underneath |\n| GET | /api/analyze/pricing | To update a product, please use the listed attributes listed underneath |\n| GET | /api/analyze/pricing | To update a product, please use the listed attributes listed underneath |\n| PUT | /api/products | To update a product, please use the listed attributes listed underneath |\n| DELETE | /api/products/1137 | Products |\n| GET | /api/customers | This resource lists all cusomters that are currently saved in your account |\n| GET | /api/customers/1 | This resource returns a specific customer {id} |\n| POST | /api/customers | To update a customer, please use the listed attributes listed underneath |\n| PUT | /api/customers/1137 | Customers |\n| DELETE | /api/customers/1137 | Customers |\n| GET | /api/orders | This resource lists all orders that are currently saved in your account |\n| GET | /api/orders/12 | This resource returns a specific order {id} |\n| POST | /api/orders | To update a order, please use the listed attributes listed underneath |\n| PUT | /api/orders/1137 | Orders |\n| DELETE | /api/orders/1137 | Orders |\n| GET | /api/orderlines | This resource lists all order lines that are currently saved in your account |\n| GET | /api/orderlines/123 | This resource returns a specific order line {id} |\n| POST | /api/orderlines | To update a order line, please use the listed attributes listed underneath |\n| PUT | /api/orderlines/1137 | OrderLines |\n| DELETE | /api/orderlines/1137 | OrderLines |\n| GET | /api/seo/ranking/latest | This resource lists all pricing rules that are currently saved in you account |\n| POST | /api/login | Use this endpoint to make the initial call with your email and password (same as on brainbi |\n| POST | /api/register | Use this endpoint to make the initial call with your email and password (same as on brainbi |\n| POST | /api/register_woocommerce | Use this endpoint to make the initial call with your email and password (same as on brainbi |\n| POST | /api/logout | Once you are done, call this endpoint to lock your account! |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"List all rule?\" -> GET /api/rule\n- \"List all 1?\" -> GET /api/rule/1\n- \"Create a rule?\" -> POST /api/rule\n- \"List all latest?\" -> GET /api/rule/ruleData/1/latest\n- \"List all products?\" -> GET /api/products\n- \"List all rules?\" -> GET /api/products/23767/rules\n- \"Create a product?\" -> POST /api/products\n- \"List all pricing?\" -> GET /api/analyze/pricing\n- \"List all customers?\" -> GET /api/customers\n- \"Create a customer?\" -> POST /api/customers\n- \"List all orders?\" -> GET /api/orders\n- \"List all 12?\" -> GET /api/orders/12\n- \"Create a order?\" -> POST /api/orders\n- \"List all orderlines?\" -> GET /api/orderlines\n- \"List all 123?\" -> GET /api/orderlines/123\n- \"Create a orderline?\" -> POST /api/orderlines\n- \"Create a login?\" -> POST /api/login\n- \"Create a register?\" -> POST /api/register\n- \"Create a register_woocommerce?\" -> POST /api/register_woocommerce\n- \"Create a logout?\" -> POST /api/logout\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api brainbi\n@auth ApiKey Authorization in header\n@endpoints 33\n@hint download_for_search\n@toc api(33)\n\n@endpoint GET /api/rule\n@desc This resource lists all pricing rules that are currently saved in you account\n@optional {: str: any}\n\n@endpoint GET /api/rule/1\n@desc This resource returns a specific rule {id}\n\n@endpoint POST /api/rule\n@desc To update a product, please use the listed attributes listed underneath\n@optional {product_id: str # The ID of the product you want this monitor to be linked to. Can be left empty if no link to a product is needed.  This needs to be the ID of brainbi and not your internal id (store_remote_id) (optional), name: str # A recognisable name., scrape_url: str # The URL of the product, type: str # Set to \"AI\" if this is ruke should be handled by our AI. Otherwise leave blank and provide the DOM-element with the scrape_selector. (optional), scrape_selector: str # The DOM-Selector for the price (you need to set this if you leave type blank).}\n\n@endpoint GET /api/rule/ruleData/1\n@desc This resource lists all data that wa saved for pricing rules\n@optional {: str: any}\n\n@endpoint GET /api/rule/ruleData/1/latest\n@desc This resource lists only the latest data point that wa saved for a pricing rule\n@optional {: str: any}\n\n@endpoint GET /api/products\n@desc This resource lists all products that are currently saved in you account\n@optional {: str: any}\n\n@endpoint GET /api/products/1\n@desc This resource returns a specific product {id}\n\n@endpoint GET /api/products/23767/rules\n@desc This resource returns all available rules for a product {id}\n\n@endpoint POST /api/products\n@desc To update a product, please use the listed attributes listed underneath\n@required {status: str # The status of your product as text., store_remote_id: str # Your internal ID of this product. Mostly the ID from your shop or ERP system., store_remote_variant_id: str # Your ID if there are more than one variant of the product., name: str, vendor: str, price: str # Your selling price., cost_price: str # The cost that you pay., shipping: str # Shipping cost, url: str, ean_upc: str, category_id: str, category_name: str}\n\n@endpoint GET /api/analyze/pricing\n@desc To update a product, please use the listed attributes listed underneath\n@required {status: str # The status of your product as text., store_remote_id: str # Your internal ID of this product. Mostly the ID from your shop or ERP system., store_remote_variant_id: str # Your ID if there are more than one variant of the product., name: str, vendor: str, price: str # Your selling price., cost_price: str # The cost that you pay., shipping: str # Shipping cost, url: str, ean_upc: str, category_id: str, category_name: str}\n@optional {url: str}\n\n@endpoint GET /api/analyze/pricing\n@desc To update a product, please use the listed attributes listed underneath\n@required {status: str # The status of your product as text., store_remote_id: str # Your internal ID of this product. Mostly the ID from your shop or ERP system., store_remote_variant_id: str # Your ID if there are more than one variant of the product., name: str, vendor: str, price: str # Your selling price., cost_price: str # The cost that you pay., shipping: str # Shipping cost, url: str, ean_upc: str, category_id: str, category_name: str}\n@optional {url: str}\n\n@endpoint PUT /api/products\n@desc To update a product, please use the listed attributes listed underneath\n@required {status: str # The status of your product as text., store_remote_id: str # Your internal ID of this product. Mostly the ID from your shop or ERP system., store_remote_variant_id: str # Your ID if there are more than one variant of the product., name: str, vendor: str, price: str # Your selling price., cost_price: str # The cost that you pay., shipping: str # Shipping cost, url: str, ean_upc: str, category_id: str, category_name: str}\n\n@endpoint DELETE /api/products/1137\n@desc Products\n@optional {: str: any}\n\n@endpoint GET /api/customers\n@desc This resource lists all cusomters that are currently saved in your account\n@optional {: str: any}\n\n@endpoint GET /api/customers/1\n@desc This resource returns a specific customer {id}\n\n@endpoint POST /api/customers\n@desc To update a customer, please use the listed attributes listed underneath\n@required {store_remote_id: str # This is your internal id of this order. You need to provide this, so you can later match your orders wit our analytics., status: str, currency: str, country: str, sub_total: str, shipping: str, total: str, created_at: str}\n\n@endpoint PUT /api/customers/1137\n@desc Customers\n@required {store_remote_id: str # This is your internal id of this order. You need to provide this, so you can later match your orders wit our analytics., status: str, currency: str, country: str, sub_total: str, shipping: str, total: str, created_at: str}\n\n@endpoint DELETE /api/customers/1137\n@desc Customers\n\n@endpoint GET /api/orders\n@desc This resource lists all orders that are currently saved in your account\n@optional {: str: any}\n\n@endpoint GET /api/orders/12\n@desc This resource returns a specific order {id}\n\n@endpoint POST /api/orders\n@desc To update a order, please use the listed attributes listed underneath\n@required {store_remote_id: str # This is your internal id of this order. You need to provide this, so you can later match your orders wit our analytics., status: str, currency: str, country: str, sub_total: str, shipping: str, total: str, created_at: str}\n\n@endpoint PUT /api/orders/1137\n@desc Orders\n@required {store_remote_id: str # This is your internal id of this order. You need to provide this, so you can later match your orders wit our analytics., status: str, currency: str, country: str, sub_total: str, shipping: str, total: str, created_at: str}\n\n@endpoint DELETE /api/orders/1137\n@desc Orders\n@optional {: str: any}\n\n@endpoint GET /api/orderlines\n@desc This resource lists all order lines that are currently saved in your account\n\n@endpoint GET /api/orderlines/123\n@desc This resource returns a specific order line {id}\n\n@endpoint POST /api/orderlines\n@desc To update a order line, please use the listed attributes listed underneath\n@required {store_remote_id: str # This is your internal id of this order. You need to provide this, so you can later match your orders wit our analytics., status: str, currency: str, country: str, sub_total: str, shipping: str, total: str, created_at: str}\n\n@endpoint PUT /api/orderlines/1137\n@desc OrderLines\n@required {store_remote_id: str # This is your internal id of this order. You need to provide this, so you can later match your orders wit our analytics., status: str, currency: str, country: str, sub_total: str, shipping: str, total: str, created_at: str}\n\n@endpoint DELETE /api/orderlines/1137\n@desc OrderLines\n\n@endpoint GET /api/seo/ranking/latest\n@desc This resource lists all pricing rules that are currently saved in you account\n@optional {: str: any}\n\n@endpoint POST /api/login\n@desc Use this endpoint to make the initial call with your email and password (same as on brainbi\n@optional {email: str # The same email you use for our platform., password: str # The password email you use for our platform.}\n\n@endpoint POST /api/register\n@desc Use this endpoint to make the initial call with your email and password (same as on brainbi\n@optional {first_name: str # required, last_name: str # required, company_name: str # required, shop_url: str # required, email: str # required, store_name: str # required, store_url: str # required, password: str # required, fromuser: str # required (always 1)}\n\n@endpoint POST /api/register_woocommerce\n@desc Use this endpoint to make the initial call with your email and password (same as on brainbi\n@optional {first_name: str # required, last_name: str # required, company_name: str # required, shop_url: str # required, email: str # required, store_name: str # required, store_url: str # required, password: str # required, fromuser: str # required (always 1), api_url: str # required, consumer_key: str # required, consumer_secret: str # required}\n\n@endpoint POST /api/logout\n@desc Once you are done, call this endpoint to lock your account!\n@optional {email: str # The same email you use for our platform.}\n\n@end\n"}}