@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api ecwid
@base https://api.cloud-elements.com/elements/api-v2
@version api-v2
@auth ApiKey Authorization in header
@common_fields {Authorization: any}
@endpoints 42
@hint download_for_search
@toc bulk(8), customers(6), objects(3), orders(7), ping(1), products(5), {objectName}(12)

@group bulk
@endpoint POST /bulk/download
@required {body: map}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /bulk/jobs
@optional {where: any, nextPage: any, pageSize: any, fields: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint POST /bulk/query
@optional {Elements-Async-Callback-Url: any, q: any, lastRunDate: any, from: any, to: any, metaData: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint PUT /bulk/{id}/cancel
@required {id: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /bulk/{id}/errors
@required {id: any}
@optional {pageSize: any, nextPage: any, fields: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /bulk/{id}/status
@required {id: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /bulk/{id}/{objectName}
@required {id: any, objectName: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint POST /bulk/{objectName}
@required {objectName: any}
@optional {Elements-Async-Callback-Url: any, metaData: any, file: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endgroup

@group customers
@endpoint POST /customers
@required {customer: map}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /customers
@optional {where: any, pageSize: any, nextPage: any, fields: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint PATCH /customers/{id}
@required {id: any, customer: map}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /customers/{id}
@required {id: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint DELETE /customers/{id}
@required {id: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /customers/{id}/orders
@required {id: any}
@optional {pageSize: any, nextPage: any, fields: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endgroup

@group objects
@endpoint GET /objects
@optional {Elements-Version: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /objects/{objectName}/docs
@required {objectName: any}
@optional {discovery: any, resolveReferences: any, basic: any, version: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /objects/{objectName}/metadata
@required {objectName: any}
@optional {Elements-Version: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endgroup

@group orders
@endpoint POST /orders
@required {order: map}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /orders
@optional {where: any, pageSize: any, nextPage: any, fields: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint PATCH /orders/{id}
@required {id: any, order: map}
@optional {action: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /orders/{id}
@required {id: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint DELETE /orders/{id}
@required {id: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /orders/{orderId}/payments
@required {orderId: any}
@optional {pageSize: any, nextPage: any, fields: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /orders/{orderId}/refunds
@required {orderId: any}
@optional {pageSize: any, nextPage: any, fields: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endgroup

@group ping
@endpoint GET /ping
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endgroup

@group products
@endpoint POST /products
@required {product: map}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /products
@optional {where: any, pageSize: any, nextPage: any, fields: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint PATCH /products/{id}
@required {id: any, product: map}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /products/{id}
@required {id: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint DELETE /products/{id}
@required {id: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endgroup

@group {objectName}
@endpoint GET /{objectName}
@required {objectName: any}
@optional {where: any, pageSize: any, nextPage: any, fields: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint POST /{objectName}
@required {objectName: any, Body: map}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint DELETE /{objectName}/{objectId}
@required {objectName: any, objectId: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /{objectName}/{objectId}
@required {objectName: any, objectId: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint PATCH /{objectName}/{objectId}
@required {objectName: any, objectId: any, Body: map}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint PUT /{objectName}/{objectId}
@required {objectName: any, objectId: any, Body: map}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /{objectName}/{objectId}/{childObjectName}
@required {objectName: any, objectId: any, childObjectName: any}
@optional {where: any, pageSize: any, nextPage: any, fields: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint POST /{objectName}/{objectId}/{childObjectName}
@required {objectName: any, objectId: any, childObjectName: any, Body: map}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint DELETE /{objectName}/{objectId}/{childObjectName}/{childObjectId}
@required {objectName: any, childObjectName: any, objectId: any, childObjectId: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint GET /{objectName}/{objectId}/{childObjectName}/{childObjectId}
@required {objectName: any, childObjectName: any, objectId: any, childObjectId: any}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint PATCH /{objectName}/{objectId}/{childObjectName}/{childObjectId}
@required {objectName: any, childObjectName: any, objectId: any, childObjectId: any, Body: map}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endpoint PUT /{objectName}/{objectId}/{childObjectName}/{childObjectId}
@required {objectName: any, childObjectName: any, objectId: any, childObjectId: any, Body: map}
@returns(200)
@errors {400, 401, 403, 404, 405, 406, 409, 415, 500, 502}

@endgroup

@end
