API Reference > imodeljs-backend > iModels > ConcurrencyControl > ConcurrencyControl.CodesManager > reserve reserve Method Reserve Codes. This function may only be able to reserve some of the requested Codes. In that case, this function will return a rejection of type RequestError. The error object will identify the codes that are unavailable. Example: try { await briefcaseDb.concurrencyControl.codes.reserve(authorizedRequestContext); authorizedRequestContext.enter(); } catch (err) { if (err instanceof IModelHubError) { // Do something about unavailable Codes ... or ... briefcaseDb.abandonChanges(); return; } } reserve(requestContext: AuthorizedClientRequestContext, codes?: CodeProps[]): Promise<void> throws IModelHubError Parameter Type Description requestContext AuthorizedClientRequestContext The client request context codes CodeProps[] The Codes to reserve. If not specified, then all pending code-reservation requests will be processed. Returns - Promise<void> Defined in core/backend/src/ConcurrencyControl.ts Line 1218 Last Updated: 11 June, 2024