| POST | /codelock/{CodeLockSystemsId}/reservations/ | Will delete all reservation that is in the past for each company having schedule delete setting turned on. | Will delete all reservation that is in the past for each company having schedule delete setting turned on. | 
|---|
import Foundation
import ServiceStack
// @ValidateRequest(Validator="IsAuthenticated")
public class DeleteOldReservations : Codable
{
    /**
    * The company id, if empty will use the company id for the user you are logged in with.
    */
    // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
    public var companyId:String?
    /**
    * The date to delete To. Only bookings that have ended by this date will be deleted.
    */
    // @ApiMember(DataType="datetime", Description="The date to delete To. Only bookings that have ended by this date will be deleted.")
    public var to:Date
    /**
    * The system type of the code lock
    */
    // @ApiMember(DataType="int", Description="The system type of the code lock", ParameterType="path")
    public var codeLockSystemsId:Int
    /**
    * If not logged in you can use token to update
    */
    // @ApiMember(Description="If not logged in you can use token to update")
    public var token:String
    required public init(){}
}
public class DeleteOldReservationsResponse : Codable
{
    public var companyId:String
    public var id:Int
    public var from:Date
    public var to:Date
    public var status:BookingStatusEnum
    public var statusId:Int
    public var responseStatus:ResponseStatus
    public var createdDate:Date
    public var updatedDate:Date
    required public init(){}
}
public enum BookingStatusEnum : Int, Codable
{
    case Booked = 1
    case Unbooked = 2
    case Reserved = 3
    case Canceled = 4
    case AwaitingPayment = 5
    case AwaitingPaymentNoTimeLimit = 6
    case Payed = 7
    case AwaitingPaymentRequestFromAdmin = 8
    case AwaitingPaymentFromProvider = 9
    case Invoiced = 10
}
Swift DeleteOldReservations DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /codelock/{CodeLockSystemsId}/reservations/ HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
Content-Type: application/json
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","CodeLockSystemsId":0,"Token":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Id":0,"Status":"Booked","StatusId":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}