@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api BrandLovers Marketplace API V1
@base https://api.brandlovers.com/marketplace/v1
@version 1.0.0
@auth ApiKey authorization in header
@common_fields {authorization: any}
@endpoints 36
@hint download_for_search
@toc products(7), product(6), orders(12), order(6), tickets(1), ticket(4)

@group products
@endpoint POST /products
@required {products: [any]}
@returns(200)
@errors {400, 401}

@endpoint GET /products
@optional {offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endgroup

@group product
@endpoint GET /product/{skuSellerId}
@required {skuSellerId: any}
@returns(200)
@errors {401, 403, 404}

@endpoint PUT /product/{skuSellerId}
@required {skuSellerId: any, body: any}
@returns(200)
@errors {400, 401, 403, 404}

@endpoint POST /product
@required {product: any}
@returns(200)
@errors {400, 401}

@endgroup

@group products
@endpoint GET /products/status
@optional {offset: any, limit: any}
@returns(200)
@errors {403}

@endpoint PUT /products/status
@required {body: [any]}
@returns(200)
@errors {400, 401}

@endpoint PUT /products/prices
@required {body: [any]}
@returns(200)
@errors {400, 401}

@endpoint PUT /products/stocks
@required {body: [any]}
@returns(200)
@errors {400, 401}

@endgroup

@group product
@endpoint PUT /product/{skuSellerId}/status
@required {skuSellerId: any, body: any}
@returns(200)
@errors {400, 401}

@endpoint PUT /product/{skuSellerId}/stock
@required {skuSellerId: any, body: any}
@returns(200)
@errors {400, 401}

@endpoint PUT /product/{skuSellerId}/prices
@required {skuSellerId: any, body: any}
@returns(200)
@errors {400, 401}

@endgroup

@group products
@endpoint GET /products/status/selling
@optional {offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endgroup

@group orders
@endpoint GET /orders
@optional {offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endpoint POST /orders/shipments/delivered
@required {ordersshipments: any}
@returns(200)
@errors {400, 401, 403}

@endpoint GET /orders/shipments/delivered
@optional {status: any, offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endpoint POST /orders/shipments/shipped
@required {ordersshipments: any}
@returns(200)
@errors {400, 401, 403}

@endpoint GET /orders/shipments/shipped
@optional {status: any, offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endpoint GET /orders/status/approved
@optional {offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endpoint GET /orders/status/canceled
@optional {offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endpoint GET /orders/status/delivered
@optional {offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endpoint GET /orders/status/new
@optional {offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endpoint GET /orders/status/partiallyDelivered
@optional {offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endpoint GET /orders/status/partiallySent
@optional {offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endpoint GET /orders/status/sent
@optional {offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endgroup

@group order
@endpoint GET /order/{orderId}
@required {orderId: any}
@returns(200)
@errors {400, 401, 403, 404}

@endpoint POST /order/{orderId}/shipment/cancel
@required {body: any, orderId: any}
@returns(200)
@errors {400, 401, 404}

@endpoint POST /order/{orderId}/shipment/delivered
@required {body: any, orderId: any}
@returns(200)
@errors {400, 401, 404}

@endpoint POST /order/{orderId}/shipment/exchange
@required {body: any, orderId: any}
@returns(200)
@errors {400, 401, 404}

@endpoint POST /order/{orderId}/shipment/return
@required {body: any, orderId: any}
@returns(200)
@errors {400, 401, 404}

@endpoint POST /order/{orderId}/shipment/sent
@required {body: any, orderId: any}
@returns(200)
@errors {400, 401, 404}

@endgroup

@group tickets
@endpoint GET /tickets
@optional {status: any, offset: any, limit: any}
@returns(200)
@errors {400}

@endgroup

@group ticket
@endpoint POST /ticket
@required {newTicket: any}
@returns(200)
@errors {400}

@endpoint GET /ticket/{ticketId}/messages
@required {ticketId: any}
@optional {offset: any, limit: any}
@returns(200)
@errors {400, 401, 403}

@endpoint POST /ticket/{ticketId}/message
@required {ticketId: any, message: any}
@returns(200)
@errors {400, 404}

@endpoint PUT /ticket/{ticketId}/status
@required {ticketId: any, body: any}
@returns(200)
@errors {400, 401, 403, 404}

@endgroup

@end
