@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api ChannelShipper & Royal Mail Public API
@version 1.0.0
@auth ApiKey Authorization in header
@endpoints 14
@toc version(1), orders(8), manifests(3), returns(2)

@group version
@endpoint GET /version
@returns(200)
@errors {500}

@endgroup

@group orders
@endpoint GET /orders/{orderIdentifiers}
@required {orderIdentifiers: any}
@returns(200)
@errors {400, 401, 404, 500}

@endpoint DELETE /orders/{orderIdentifiers}
@required {orderIdentifiers: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint PUT /orders/status
@required {request: map}
@returns(200)
@errors {400, 401, 404, 500}

@endpoint GET /orders/{orderIdentifiers}/full
@required {orderIdentifiers: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /orders
@optional {pageSize: any, startDateTime: any, endDateTime: any, continuationToken: any}
@returns(200)
@errors {400, 401, 404, 500}

@endpoint POST /orders
@required {request: map}
@returns(200)
@errors {400, 401, 500}

@endpoint GET /orders/full
@optional {pageSize: any, startDateTime: any, endDateTime: any, continuationToken: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endpoint GET /orders/{orderIdentifiers}/label
@required {orderIdentifiers: any, documentType: any}
@optional {includeReturnsLabel: any, includeCN: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endgroup

@group manifests
@endpoint POST /manifests
@optional {request: map}
@returns(201)
@returns(202)
@errors {400, 401, 403, 404, 500}

@endpoint POST /manifests/retry/{manifestIdentifier}
@required {manifestIdentifier: any}
@returns(201)
@returns(202)
@errors {400, 401, 403, 404, 500}

@endpoint GET /manifests/{manifestIdentifier}
@required {manifestIdentifier: any}
@returns(200)
@errors {400, 401, 403, 404, 500}

@endgroup

@group returns
@endpoint GET /returns/services
@returns(200)
@errors {401, 500}

@endpoint POST /returns
@required {body: map}
@returns(200)
@errors {400, 401, 500}

@endgroup

@end
