@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api brainbi
@auth ApiKey Authorization in header
@endpoints 33
@hint download_for_search
@toc api(33)

@endpoint GET /api/rule
@optional {: str}

@endpoint GET /api/rule/1

@endpoint POST /api/rule
@optional {product_id: str, name: str, scrape_url: str, type: str, scrape_selector: str}

@endpoint GET /api/rule/ruleData/1
@optional {: str}

@endpoint GET /api/rule/ruleData/1/latest
@optional {: str}

@endpoint GET /api/products
@optional {: str}

@endpoint GET /api/products/1

@endpoint GET /api/products/23767/rules

@endpoint POST /api/products
@required {status: str, store_remote_id: str, store_remote_variant_id: str, name: str, vendor: str, price: str, cost_price: str, shipping: str, url: str, ean_upc: str, category_id: str, category_name: str}

@endpoint GET /api/analyze/pricing
@required {status: str, store_remote_id: str, store_remote_variant_id: str, name: str, vendor: str, price: str, cost_price: str, shipping: str, url: str, ean_upc: str, category_id: str, category_name: str}
@optional {url: str}

@endpoint GET /api/analyze/pricing
@required {status: str, store_remote_id: str, store_remote_variant_id: str, name: str, vendor: str, price: str, cost_price: str, shipping: str, url: str, ean_upc: str, category_id: str, category_name: str}
@optional {url: str}

@endpoint PUT /api/products
@required {status: str, store_remote_id: str, store_remote_variant_id: str, name: str, vendor: str, price: str, cost_price: str, shipping: str, url: str, ean_upc: str, category_id: str, category_name: str}

@endpoint DELETE /api/products/1137
@optional {: str}

@endpoint GET /api/customers
@optional {: str}

@endpoint GET /api/customers/1

@endpoint POST /api/customers
@required {store_remote_id: str, status: str, currency: str, country: str, sub_total: str, shipping: str, total: str, created_at: str}

@endpoint PUT /api/customers/1137
@required {store_remote_id: str, status: str, currency: str, country: str, sub_total: str, shipping: str, total: str, created_at: str}

@endpoint DELETE /api/customers/1137

@endpoint GET /api/orders
@optional {: str}

@endpoint GET /api/orders/12

@endpoint POST /api/orders
@required {store_remote_id: str, status: str, currency: str, country: str, sub_total: str, shipping: str, total: str, created_at: str}

@endpoint PUT /api/orders/1137
@required {store_remote_id: str, status: str, currency: str, country: str, sub_total: str, shipping: str, total: str, created_at: str}

@endpoint DELETE /api/orders/1137
@optional {: str}

@endpoint GET /api/orderlines

@endpoint GET /api/orderlines/123

@endpoint POST /api/orderlines
@required {store_remote_id: str, status: str, currency: str, country: str, sub_total: str, shipping: str, total: str, created_at: str}

@endpoint PUT /api/orderlines/1137
@required {store_remote_id: str, status: str, currency: str, country: str, sub_total: str, shipping: str, total: str, created_at: str}

@endpoint DELETE /api/orderlines/1137

@endpoint GET /api/seo/ranking/latest
@optional {: str}

@endpoint POST /api/login
@optional {email: str, password: str}

@endpoint POST /api/register
@optional {first_name: str, last_name: str, company_name: str, shop_url: str, email: str, store_name: str, store_url: str, password: str, fromuser: str}

@endpoint POST /api/register_woocommerce
@optional {first_name: str, last_name: str, company_name: str, shop_url: str, email: str, store_name: str, store_url: str, password: str, fromuser: str, api_url: str, consumer_key: str, consumer_secret: str}

@endpoint POST /api/logout
@optional {email: str}

@end
