{"openapi":"3.0.0","servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/kamilgrymuza/A2RAPI/0.0.16"}],"info":{"version":"0.0.16","title":"A2RAPI","description":"The API powering the All2Rent website and mobile applications."},"tags":[{"name":"Users & authentication","description":"Operations on user accounts and authentication"},{"name":"Offers","description":"Endpoints related to offers and offer categories"},{"name":"Payments","description":"Endpoints related to payments"},{"name":"Address","description":"Endpoints related to addresses"},{"name":"Messages","description":"Endpoints related to messages"},{"name":"Reviews","description":"Endpoints related to reviews"},{"name":"Other","description":"Other endpoints"}],"paths":{"/users":{"post":{"summary":"Register a new user account","tags":["Users & authentication"],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UserAccount"},{"required":["email","password"]}]}}}},"responses":{"201":{"description":"Registration succeeded","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/UserAccount"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"}}}},"/users/login":{"post":{"summary":"Authenticate a user with email and password","tags":["Users & authentication"],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UserEmail"},{"$ref":"#/components/schemas/UserPassword"},{"required":["email","password"]}]}}}},"responses":{"200":{"description":"The user has been succefully authenticated","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/UserAccount"}}}}},"headers":{"Set-Cookie":{"schema":{"type":"string","example":"sessionid=abcde12345; Path=/; HttpsOnly"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"}}},"delete":{"summary":"Log out the user auth and invalidate the session","tags":["Users & authentication"],"responses":{"204":{"description":"The user has been succefully logged out"}}}},"/users/current":{"get":{"security":[{"djangoSessionCookie":[]}],"summary":"Returns the user account data for the currently logged-in user or a 401 HTTP code","description":"This endpoint can be used to check if the user is authenticated, (and if yes, get their account data) or whether they should be redirected to the login screen.\n","tags":["Users & authentication"],"responses":{"200":{"description":"Profile of the current user","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/UserAccount"}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/users/{id}":{"get":{"summary":"Get information about user","description":"Get information about user with reviews","tags":["Users & authentication"],"parameters":[{"name":"id","in":"path","required":true,"description":"The user uuid requested by user.","schema":{"type":"string"}}],"responses":{"200":{"description":"Profile of the user","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/UserPublicInformation"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}},"patch":{"summary":"Update account information","tags":["Users & authentication"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The ID of the user account to modify","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/UserAccount"}]}}}},"responses":{"200":{"description":"User information has been updated","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/UserAccount"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}}},"/users/{id}/reviews":{"get":{"summary":"Retrieve reviews of the given users","tags":["Users & authentication","Reviews"],"parameters":[{"$ref":"#/components/parameters/offsetParam"},{"$ref":"#/components/parameters/limitParam"},{"name":"id","in":"path","required":true,"description":"The ID of the user who was reviewed","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"booking-id","schema":{"type":"string","format":"uuid"},"required":false,"description":"ID of the booking to filter reviews by"},{"in":"query","name":"author-id","schema":{"type":"string","format":"uuid"},"required":false,"description":"ID of the user who submitted the review"},{"in":"query","name":"author-role","schema":{"type":"string","enum":["client","owner"]},"required":false,"description":"The role of the user who submitted the review. Can be used to filter only client or owner reviews for a given user.\n"},{"in":"query","name":"ordering","schema":{"type":"string","default":"-mostRecentOpinionDate","enum":["mostRecentRating","-mostRecentRating","mostRecentOpinionDate","-mostRecentOpinionDate"]},"required":false,"description":"ID of the booking to filter reviews by"}],"responses":{"200":{"description":"List of user reviews","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserReview"}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}}},"/passwords/reset-requests":{"post":{"summary":"Create a new password reset request","description":"This endpoint results in an email being sent to the email provided if it's registered in the database with a unique password reset link.\n","tags":["Users & authentication"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"type":"string","example":"user@example.com"}},"required":["email"]}}}},"responses":{"201":{"description":"The request has been processed"},"400":{"$ref":"#/components/responses/BadRequestResponse"}}},"put":{"summary":"Set a new password using a password reset token","description":"The email sent by /users/password-reset contains a one-time token that has to be extracted and sent in the body of the request along with the new password.\n","tags":["Users & authentication"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"token":{"type":"string","example":"fooBar123"},"password":{"type":"string","example":"pa$$w0rD"}},"required":["token","password"]}}}},"responses":{"204":{"description":"The password has been set"},"400":{"$ref":"#/components/responses/BadRequestResponse"}}}},"/passwords/change":{"post":{"summary":"Change user's password","security":[{"djangoSessionCookie":[]}],"tags":["Users & authentication"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"oldPassword":{"type":"string","format":"password","example":"fooBar123"},"newPassword":{"type":"string","format":"password","example":"fooBar123"}},"required":["oldPassword","newPassword"]}}}},"responses":{"200":{"description":"The request has been processed"},"400":{"$ref":"#/components/responses/BadRequestResponse"}}}},"/verifications/email":{"post":{"summary":"Request a new email verification message to be sent","description":"This operation will send an email to the address associated with the account of the currently logged-in user\n","security":[{"djangoSessionCookie":[]}],"tags":["Users & authentication"],"responses":{"201":{"description":"The request has been processed"},"400":{"$ref":"#/components/responses/BadRequestResponse"}}},"put":{"summary":"Verify the email associated with the account of the currently logged-in user","description":"The verification email message contains a link with a one-time token that has to be extracted and sent in the body of the request. On success this endpoint returns the updated user account data.\n","security":[{"djangoSessionCookie":[]}],"tags":["Users & authentication"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"token":{"type":"string","example":"fooBar123"}},"required":["token"]}}}},"responses":{"200":{"description":"The email has been verified","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/UserAccount"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"}}}},"/verifications/phone":{"post":{"summary":"Request a new verification SMS to be sent to the user","description":"This operation will send an text message to the phone number associated with the account of the currently logged-in user or return an error if there is no phone number on file. The text message will contain a code that can be used to verify the phone number.\n","security":[{"djangoSessionCookie":[]}],"tags":["Users & authentication"],"responses":{"201":{"description":"The request has been processed"},"400":{"$ref":"#/components/responses/BadRequestResponse"}}},"put":{"summary":"Verify the phone number associated with the account of the currently logged-in user","description":"The verification text message contains a one-time code that has to be extracted and sent in the body of the request. On success this endpoint returns the updated user account data.\n","security":[{"djangoSessionCookie":[]}],"tags":["Users & authentication"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"verificationCode":{"type":"string","example":"fooBar123"}},"required":["verificationCode"]}}}},"responses":{"200":{"description":"The phone number has been verified","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/UserAccount"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"}}}},"/offer-categories":{"get":{"tags":["Offers"],"summary":"Retrieve the category tree","description":"Categories are created manually via the admin panel. It is not possible to create them via the API, therefore the only endpoints presented here are for reading category data.\n","responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"$ref":"#/components/schemas/OfferCategory"}}}]}}}}}}},"/offers/{id}/reviews":{"get":{"summary":"Retrieve reviews for an offer with the given ID","tags":["Offers","Reviews"],"parameters":[{"$ref":"#/components/parameters/offsetParam"},{"$ref":"#/components/parameters/limitParam"},{"in":"path","name":"id","required":true,"description":"The ID of the Offer that was reviewed.","schema":{"type":"string","format":"uuid"}},{"in":"query","name":"booking-id","schema":{"type":"string","format":"uuid"},"required":false,"description":"ID of the booking to filter reviews by"},{"in":"query","name":"author-id","schema":{"type":"string","format":"uuid"},"required":false,"description":"ID of the user who submitted the review"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OfferReview"}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/favorites":{"post":{"summary":"Add an offer to favorites","tags":["Offers"],"security":[{"djangoSessionCookie":[]}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"offerID":{"type":"string","format":"uuid"}}}}}},"responses":{"201":{"description":"The offer has been added to favorites"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}},"get":{"summary":"Retrieve favorite offers of the currently logged-in user","tags":["Offers"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"$ref":"#/components/parameters/offsetParam"},{"$ref":"#/components/parameters/limitParam"}],"responses":{"200":{"description":"A list of favorite offers","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/favorites/{id}":{"delete":{"summary":"Delete an offer from favorites","tags":["Offers"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The ID of the Offer to be removed from favorites.","schema":{"type":"string"}}],"responses":{"204":{"description":"The resource was deleted successfully."},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/offers":{"post":{"summary":"Add a new offer","tags":["Offers"],"security":[{"djangoSessionCookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Offer"}}}}}},"responses":{"201":{"description":"The Item Offer has been created and the data is returned in the response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Offer"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}},"get":{"summary":"Retrieve offers","tags":["Offers"],"parameters":[{"$ref":"#/components/parameters/offsetParam"},{"$ref":"#/components/parameters/limitParam"},{"in":"query","name":"offer-type","schema":{"$ref":"#/components/schemas/OfferType"},"required":true,"description":"The type of offers to return"},{"in":"query","name":"category-ids","schema":{"type":"string"},"required":false,"description":"Coma-separated list of Category IDs for which to return the offers"},{"in":"query","name":"owner-ids","schema":{"type":"string"},"required":false,"description":"Coma-separated list of IDs of users who created the offer"},{"in":"query","name":"from","schema":{"type":"string","format":"date-time"},"required":false,"description":"If provided the retrieved offers must be available at this date or earlier"},{"in":"query","name":"to","schema":{"type":"string","format":"date-time"},"required":false,"description":"If provided the retrieved offers must be available at this date or later"},{"in":"query","name":"highlighted","schema":{"type":"string","format":"date-time"},"required":false,"description":"If set to 1 will return only highlighted offers"},{"in":"query","name":"any-from-category-fields","schema":{"type":"string"},"required":false,"description":"Additional fields to filter by, defined by the category the offer belongs to. If one of this fields is set, category-ids has to be set as well\n"},{"in":"query","name":"ordering","schema":{"type":"string"},"required":false,"description":"The name of the attribute to order the offers by. Reverse ordering is possible by prefixing the field name with '-'."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"$ref":"#/components/schemas/OfferList"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"}}}},"/offers/{id}":{"get":{"summary":"Retrieve a particular offer identified by the given ID","tags":["Offers"],"parameters":[{"name":"id","in":"path","required":true,"description":"The ID of the Item Offer to return","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Offer"},{"type":"object","properties":{"owner":{"$ref":"#/components/schemas/UserPublicInformation"}}}]}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}},"patch":{"summary":"Update an offer with a given ID","tags":["Offers"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The ID of an offer to update","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Offer"}}}},"responses":{"200":{"description":"Updated the offer"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}},"delete":{"summary":"Delete the offer with given ID.","tags":["Offers"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The ID of an offer to delete.","schema":{"type":"string"}}],"responses":{"204":{"description":"The resource was deleted successfully."},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}}},"/offers/{id}/publish":{"patch":{"summary":"Publish an offer","description":"Publish offer with given ID.","tags":["Offers"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The ID of an offer to publish","schema":{"type":"string"}}],"responses":{"200":{"description":"Offer published."},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}}},"/offers/{id}/message":{"post":{"summary":"Add a new message","description":"Add a new message","tags":["Messages","Offers"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The offer uuid requested by user.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"responses":{"201":{"description":"The request has succeeded and a new address has been created as a result.  The offer data is returned in the response body.\n","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Conversation"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}}},"/my-offers":{"get":{"summary":"Return an offers","description":"Return an offers with given parameter.","tags":["Offers"],"parameters":[{"$ref":"#/components/parameters/offsetParam"},{"$ref":"#/components/parameters/limitParam"},{"in":"query","name":"offer-type","schema":{"$ref":"#/components/schemas/OfferType"},"required":true,"description":"Type of offer to search"},{"in":"query","name":"category-id","schema":{"type":"string"},"required":false,"description":"Category ID to search"},{"in":"query","name":"highlighted","schema":{"type":"string","format":"date-time"},"required":false,"description":"Filter to this date-time"},{"in":"query","name":"any-from-category-fields","schema":{"type":"string"},"required":false,"description":"Additional fields to query by declared in given category. If one of this fields is set, category have to be set\n"},{"in":"query","name":"ordering","schema":{"type":"string"},"required":false,"description":"One ore more - separated by coma - fields to set sort by. Sort fields are declared in category. Reverse orderings by prefixing the field name with '-'.\n"}],"responses":{"200":{"description":"The request has succeeded.  The offer data is returned in the response body.\n","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"$ref":"#/components/schemas/OfferList"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/bookings":{"get":{"summary":"Return bookings of given user","description":"Return bookings of given user","tags":["Offers"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"$ref":"#/components/parameters/offsetParam"},{"$ref":"#/components/parameters/limitParam"},{"in":"query","name":"user-id","schema":{"type":"string"},"required":false,"description":"User ID to search"},{"in":"query","name":"offer-id","schema":{"type":"string"},"required":false,"description":"Item offer ID to search"},{"in":"query","name":"status","schema":{"type":"string"},"required":false,"description":"Status of offer to search"}],"responses":{"200":{"description":"The request has succeeded.  The offer data is returned in the response body.\n","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"$ref":"#/components/schemas/BookingsList"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}},"post":{"summary":"Add a new offer booking","description":"Add a new booking to given offer","tags":["Offers"],"security":[{"djangoSessionCookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Booking"}]}}}},"responses":{"201":{"description":"The request has succeeded and a new booking has been created as a result.  The booking data is returned in the response body.\n","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Booking"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/bookings/{id}":{"get":{"summary":"Return booking","description":"Return a booking with bookingID equals to id.","tags":["Offers"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The booking uuid requested by user.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request has succeeded.  The booking data is returned in the response body.\n","content":{"application/json":{"schema":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Booking"}]}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}},"patch":{"summary":"Update booking","description":"Update the booking with ID partially. If booing status is set to canceled, CancelReason and cancelDescription is required\n","tags":["Offers"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The booking uuid requested by user.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Booking"}}}}}},"responses":{"200":{"description":"Updated the booking offer partially."},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}}},"/bookings/{id}/cancel":{"post":{"summary":"Cancel booking","description":"Cancel booking","tags":["Offers"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The booking ID requested by user.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cancel-reason":{"type":"string","example":"carbroken"},"cancel-description":{"type":"string","example":"My car just broke down, I can't rent this car"}}}}}},"responses":{"201":{"description":"The request has succeeded and booking has been canceled as a result.  The booking data is returned in the response body.\n","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Booking"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}}},"/images":{"post":{"summary":"Upload new image to server","description":"Upload new image to server and return uuid of this image.","tags":["Other"],"security":[{"djangoSessionCookie":[]}],"requestBody":{"required":true,"content":{"image/*":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"The request has succeeded and an image was succefully uploaded.","content":{"application/json":{"schema":{"properties":{"data":{"type":"string","format":"uuid","description":"uuid of a new uploaded image."}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/images/{id}":{"delete":{"summary":"Delete the image","tags":["Other"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The image uuid requested by user.","schema":{"type":"string"}}],"responses":{"204":{"description":"The resource was deleted successfully."},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}}},"/addresses":{"get":{"summary":"Return addresses of current user","description":"Return addresses of current user","tags":["Address"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"$ref":"#/components/parameters/offsetParam"},{"$ref":"#/components/parameters/limitParam"}],"responses":{"200":{"description":"The request has succeeded.  The offer data is returned in the response body.\n","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"$ref":"#/components/schemas/AddressList"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}},"post":{"summary":"Add a new address","description":"Add a new address","tags":["Address"],"security":[{"djangoSessionCookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}}},"responses":{"201":{"description":"The request has succeeded and a new address has been created as a result.  The offer data is returned in the response body.\n","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/Address"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/addresses/{id}":{"get":{"summary":"Return address","description":"Return a address with addressID equals to id.","tags":["Address"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The address uuid requested by user.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request has succeeded.  The address data is returned in the response body.\n","content":{"application/json":{"schema":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Address"}]}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}},"delete":{"summary":"Delete the address","tags":["Address"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The address uuid requested by user.","schema":{"type":"string"}}],"responses":{"204":{"description":"The resource was deleted successfully."},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}}},"/coversations":{"get":{"summary":"Return coversations of current user","description":"Return coversations of current user","tags":["Messages"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"$ref":"#/components/parameters/offsetParam"},{"$ref":"#/components/parameters/limitParam"},{"in":"query","name":"offer-id","schema":{"type":"string"},"required":false,"description":"Item offer to search"},{"in":"query","name":"nonread","schema":{"type":"boolean"},"required":false,"description":"Search only non-read conversations"},{"in":"query","name":"archived","schema":{"type":"boolean","default":false},"required":false,"description":"Search only archived conversations"},{"in":"query","name":"direction","schema":{"type":"string","format":"enum - send - recieved"},"required":false,"description":"Filter direction of conversation. Send = user is sender, ask about smb offer Recieved = user is reciever, smb ask about user offer\n"},{"in":"query","name":"ordering","schema":{"type":"string"},"required":false,"description":"One ore more - separated by coma - fields to set sort by. Sort fields are date. Reverse orderings by prefixing the field name with '-'.\n"}],"responses":{"200":{"description":"The request has succeeded.  The offer data is returned in the response body.\n","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"$ref":"#/components/schemas/ConversationsList"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/conversation/{id}":{"get":{"summary":"Return conversation","description":"Return a conversation with conversationID equals to id.","tags":["Messages"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The conversation uuid requested by user.","schema":{"type":"string"}}],"responses":{"200":{"description":"The request has succeeded.  The conversation data is returned in the response body.\n","content":{"application/json":{"schema":{"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Conversation"}]}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/conversation/{id}/read":{"patch":{"summary":"Set conversation as read","description":"Set conversation as read.","tags":["Messages"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The conversation uuid requested by user.","schema":{"type":"string"}}],"responses":{"200":{"description":"Conversation set as read."},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/user-reviews":{"get":{"summary":"Retrieve user reviews submitted by the currently logged-in user","tags":["Users & authentication","Reviews"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"$ref":"#/components/parameters/offsetParam"},{"$ref":"#/components/parameters/limitParam"},{"in":"query","name":"booking-id","schema":{"type":"string","format":"uuid"},"required":false,"description":"ID of the booking to filter reviews by"},{"in":"query","name":"author-role","schema":{"type":"string","enum":["client","owner"]},"required":false,"description":"The role of the person who submitted the review"},{"in":"query","name":"status","schema":{"type":"string","enum":["new","hidden","deleted","published"]},"required":false,"description":"The role of the person who submitted the review"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserReview"}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/user-reviews/{id}":{"get":{"summary":"Retrieve the review with a given ID along with all the opinions and metadata","tags":["Reviews"],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid","description":"The ID of the review to retrieve"},"required":true}],"responses":{"200":{"description":"New review has been added","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/UserReview"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/user-reviews/{id}/opinions":{"get":{"summary":"Retrieve all the opinions for the User Review with the given ID","tags":["Reviews"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid","description":"The ID of the review to retrieve opinions for"},"required":true},{"$ref":"#/components/parameters/offsetParam"},{"$ref":"#/components/parameters/limitParam"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReviewOpinion"}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"}}},"post":{"summary":"Submit a new opinion as part of the review with the given ID","tags":["Reviews"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"The ID of the review to add an opinion to","required":true}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"The person who is submitting a review can post an opinion and a rating. The other person will be able to post a reply message.","properties":{"rating":{"type":"string","format":"decimal","description":"Numerical rating for this review","minimum":1,"maximum":5},"body":{"type":"string","description":"The public message that will be displayed as part of this review","example":"Great car!"},"images":{"allOf":[{"$ref":"#/components/schemas/ImageList"},{"description":"An array of Image UUIDs. The first one is the main photo."}]}},"required":["rating","body"]},{"type":"object","description":"The person who is the receipient of a review can only reply to it by sharing their opinion.","properties":{"body":{"type":"string","description":"The public message that will be displayed as part of this review","example":"Great car!"},"images":{"allOf":[{"$ref":"#/components/schemas/ImageList"},{"description":"An array of Image UUIDs. The first one is the main photo."}]}},"required":["body"]}],"example":{"rating":5,"body":"Great car!"}}}}},"responses":{"201":{"description":"New review has been added","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/ReviewOpinion"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/user-reviews/{reviewID}/opinions/{opinionID}":{"patch":{"summary":"Update an opinion with the given opinionID","tags":["Reviews"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"reviewID","in":"path","required":true,"description":"The ID of the review the opinion belongs to.","schema":{"type":"string","format":"uuid"}},{"name":"opinionID","in":"path","required":true,"description":"The ID of the opinion to update","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"body":{"type":"string","example":"We apologize for the car being dirty. One of our newly-hired employees clearly didn't do a very good job."},"images":{"allOf":[{"$ref":"#/components/schemas/ImageList"},{"description":"An array of Image UUIDs. The first one is the main photo."}]}},"required":["body","images"],"description":"This is only applicable to receiver of the review"},{"properties":{"rating":{"type":"string","format":"decimal","description":"Numerical rating for this review","minimum":1,"maximum":5},"body":{"type":"string","description":"The public message that will be displayed as part of this review","example":"Great car!"},"images":{"allOf":[{"$ref":"#/components/schemas/ImageList"},{"description":"An array of Image UUIDs. The first one is the main photo."}]}},"required":["rating","body","images"],"description":"This is only applicable to the original author of the review"}],"example":{"body":"Really nice car","rating":4}}}}},"responses":{"200":{"description":"The review has been updated","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/UserReview"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}}},"/offer-reviews":{"get":{"summary":"Retrieve offer reviews submitted by the currently logged-in user","tags":["Offers","Reviews"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"$ref":"#/components/parameters/offsetParam"},{"$ref":"#/components/parameters/limitParam"},{"in":"query","name":"booking-id","schema":{"type":"string","format":"uuid"},"required":false,"description":"ID of the booking to filter reviews by"},{"in":"query","name":"status","schema":{"type":"string","enum":["new","hidden","deleted","published"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OfferReview"}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/offer-reviews/{id}":{"get":{"summary":"Retrieve the review with a given ID along with all the opinions and metadata","tags":["Reviews"],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid","description":"The ID of the review to retrieve"},"required":true}],"responses":{"200":{"description":"New review has been added","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/OfferReview"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/offer-reviews/{id}/opinions":{"get":{"summary":"Retrieve all the opinions for the Item Review with the given ID","tags":["Reviews"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid","description":"The ID of the review to retrieve opinions for"},"required":true},{"$ref":"#/components/parameters/offsetParam"},{"$ref":"#/components/parameters/limitParam"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationAttributes"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReviewOpinion"}}}}]}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"}}},"post":{"summary":"Submit a new opinion as part of the review with the given ID","tags":["Reviews"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"The ID of the review to add an opinion to","required":true}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"The person who is submitting a review can post an opinion and a rating. The other person will be able to post a reply message.","properties":{"rating":{"type":"string","format":"decimal","description":"Numerical rating for this review","minimum":1,"maximum":5},"body":{"type":"string","description":"The public message that will be displayed as part of this review","example":"Great car!"},"images":{"allOf":[{"$ref":"#/components/schemas/ImageList"},{"description":"An array of Image UUIDs. The first one is the main photo."}]}},"required":["rating","body"]},{"type":"object","description":"The person who is the receipient of a review can only reply to it by sharing their opinion.","properties":{"body":{"type":"string","description":"The public message that will be displayed as part of this review","example":"Great car!"},"images":{"allOf":[{"$ref":"#/components/schemas/ImageList"},{"description":"An array of Image UUIDs. The first one is the main photo."}]}},"required":["body"]}],"example":{"rating":5,"body":"Great car!"}}}}},"responses":{"201":{"description":"New review has been added","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/ReviewOpinion"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}},"/offer-reviews/{reviewID}/opinions/{opinionID}":{"patch":{"summary":"Update an opinion with the given opinionID","tags":["Reviews"],"security":[{"djangoSessionCookie":[]}],"parameters":[{"name":"reviewID","in":"path","required":true,"description":"The ID of the review the opinion belongs to.","schema":{"type":"string","format":"uuid"}},{"name":"opinionID","in":"path","required":true,"description":"The ID of the opinion to update","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"properties":{"body":{"type":"string","example":"We apologize for the car being dirty. One of our newly-hired employees clearly didn't do a very good job."},"images":{"allOf":[{"$ref":"#/components/schemas/ImageList"},{"description":"An array of Image UUIDs. The first one is the main photo."}]}},"required":["body","images"],"description":"This is only applicable to receiver of the review"},{"properties":{"rating":{"type":"string","format":"decimal","description":"Numerical rating for this review","minimum":1,"maximum":5},"body":{"type":"string","description":"The public message that will be displayed as part of this review","example":"Great car!"},"images":{"allOf":[{"$ref":"#/components/schemas/ImageList"},{"description":"An array of Image UUIDs. The first one is the main photo."}]}},"required":["rating","body","images"],"description":"This is only applicable to the original author of the review"}],"example":{"body":"Really nice car","rating":4}}}}},"responses":{"200":{"description":"The review has been updated","content":{"application/json":{"schema":{"properties":{"data":{"$ref":"#/components/schemas/OfferReview"}}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"}}}}},"components":{"parameters":{"offsetParam":{"in":"query","name":"offset","required":false,"schema":{"type":"integer","minimum":0,"default":0},"description":"The number of items to skip before starting to collect the result set."},"limitParam":{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"description":"The numbers of items to return."}},"schemas":{"PaginationAttributes":{"type":"object","properties":{"count":{"type":"integer","readOnly":true,"example":113,"description":"The total number of objects in the collection"},"prev":{"type":"string","format":"url","readOnly":true,"nullable":true,"description":"The link to the previous page of results"},"next":{"type":"string","format":"url","readOnly":true,"nullable":true,"description":"The link to the next page of results"}}},"UserEmail":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"john@doe.com"}}},"UserPassword":{"type":"object","properties":{"password":{"type":"string","format":"password","example":"fooBar123"}}},"UserPublicInformation":{"type":"object","properties":{"id":{"type":"string","readOnly":true,"format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"firstName":{"type":"string","example":"John"},"thumbURL":{"type":"string","format":"url","nullable":true,"readOnly":true},"registeredAt":{"type":"string","format":"date-time","readOnly":true},"avarageRating":{"type":"string","format":"decimal","readOnly":true,"example":4.5,"nullable":true},"ratingCount":{"type":"integer","readOnly":true,"default":0,"example":73}}},"UserAccount":{"type":"object","allOf":[{"$ref":"#/components/schemas/UserPublicInformation"},{"properties":{"lastName":{"type":"string","example":"Doe","nullable":true},"phoneNumber":{"type":"string","format":"phone","nullable":true,"example":null},"isEmailVerified":{"type":"boolean","readOnly":true,"example":true},"isPhoneVerified":{"type":"boolean","readOnly":true,"example":false},"thumbImageID":{"type":"string","format":"uuid","nullable":true}}}]},"FilteringParameterDefinition":{"type":"object","properties":{"name":{"type":"string","format":"slug","example":"color"},"displayLabel":{"type":"string","example":"Color"},"dataType":{"type":"string","enum":["integer","decimal","date","string","boolean"],"example":"string"},"minimum":{"type":"string","example":null},"maximum":{"type":"string","example":null},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"object","example":"red"},"displayLabel":{"type":"string","example":"Red"},"extraAttributes":{"type":"object","example":{"colorCodeRGB":"FF0000"}}}}}}},"SortingParameterDefinition":{"type":"object","properties":{"name":{"type":"string","format":"slug","example":"price"},"displayLabel":{"type":"string","example":"Price"},"dataType":{"type":"string","enum":["integer","decimal","date"],"example":"decimal"},"minimum":{"type":"string","example":null},"maximum":{"type":"string","example":null}}},"OfferParameterDefinition":{"allOf":[{"$ref":"#/components/schemas/FilteringParameterDefinition"},{"type":"object","properties":{"required":{"type":"boolean","example":true}}}]},"BookingParameterDefinition":{"allOf":[{"$ref":"#/components/schemas/FilteringParameterDefinition"},{"type":"object","properties":{"description":{"type":"string","example":"Please enter the color of the car"},"required":{"type":"boolean","example":true}}}]},"OfferCategory":{"type":"object","properties":{"id":{"type":"string","readOnly":true,"format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"name":{"type":"string","readOnly":true,"example":"Cars"},"description":{"type":"string","readOnly":true,"example":"Lorem upsum dolor sit amet"},"minBookingTimeUnit":{"$ref":"#/components/schemas/BookingTimeUnit"},"defaultBookingTimeUnit":{"$ref":"#/components/schemas/BookingTimeUnit"},"depositPercentage":{"type":"string","format":"decimal","minimum":0,"maximum":100,"default":5.0,"description":"The deposit required for booking."},"sortingParameters":{"type":"array","items":{"$ref":"#/components/schemas/SortingParameterDefinition"}},"filteringParameters":{"type":"array","items":{"$ref":"#/components/schemas/FilteringParameterDefinition"}},"offerParameters":{"type":"array","items":{"$ref":"#/components/schemas/OfferParameterDefinition"}},"bookingParameters":{"type":"array","items":{"$ref":"#/components/schemas/BookingParameterDefinition"}},"children":{"type":"array","readOnly":true,"description":"Subcategories of this category","items":{"$ref":"#/components/schemas/OfferCategory/properties"}}}},"OfferType":{"type":"string","description":"The flag denoting whether an offer is of type lend or rent","enum":["rent","lend"]},"BookingTimeUnit":{"type":"string","readOnly":true,"example":"hour","enum":["minute","hour","day","week","month","year"]},"BookingTimeUnitCount":{"type":"integer","example":3,"minimum":1},"Offer":{"type":"object","properties":{"name":{"type":"string","example":"Ford Mustang V6 Convertible. Great for summer road trips!!!"},"description":{"type":"string","example":"A great muscle car in a like-new condition that will turn your roadtrip into a memorable experience\n"},"offerType":{"$ref":"#/components/schemas/OfferType"},"status":{"type":"string","format":"enum - new - hidden - canceled - published","description":"Logged-out users and users who are not the owners of the offer will see only the published offers.\n"},"title":{"type":"string","example":"69 Mustang. Big DISCOUNT!!"},"slug":{"type":"string","example":"69-mustang-big-discount"},"itemValue":{"description":"The value the owner is willing to sell the item for. If it's null it means the item is not for sale or the owner hasn't provided the value.\n","type":"number","minimum":0,"nullable":true,"example":24500},"itemValueCurrency":{"type":"string","description":"The currency in which the itemValue is expressed.","nullable":true,"enum":["USD","PLN"],"example":"USD"},"images":{"allOf":[{"$ref":"#/components/schemas/ImageList"},{"description":"An array of Image UUIDs. The first one is the main photo."}]},"owner":{"allOf":[{"$ref":"#/components/schemas/UserPublicInformation"},{"readOnly":true}]},"categoryID":{"type":"string","format":"uuid"},"avarageRating":{"type":"string","format":"decimal","readOnly":true,"example":4.5,"nullable":true},"ratingCount":{"type":"integer","readOnly":true,"default":0,"example":73},"tags":{"type":"array","items":{"type":"string","enum":["ECO","KIDS"]},"example":["ECO","KIDS"]},"tagsApproved":{"type":"boolean","default":false,"readOnly":true,"example":true},"availabilityPattern":{"type":"string","format":"enum - all - weekdays - weekends"},"availability":{"type":"array","description":"List of available time ranges ordered by start date. When an offer is booked this list is modified accordingly.","items":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}}},"pricePerMinute":{"type":"string","format":"decimal","nullable":true,"description":"Price per minute. If null, rent for minutes is not available"},"pricePerHour":{"type":"string","format":"decimal","nullable":true,"description":"Price per Hour. If null, rent for Hour is not available"},"pricePerDay":{"type":"string","format":"decimal","nullable":true,"description":"Price per Day. If null, rent for Day is not available"},"pricePerWeek":{"type":"string","format":"decimal","nullable":true,"description":"Price per Week. If null, rent for Week is not available"},"pricePerMonth":{"type":"string","format":"decimal","nullable":true,"description":"Price per Month. If null, rent for Month is not available"},"pricePerYear":{"type":"string","format":"decimal","nullable":true,"description":"Price per Year. If null, rent for Year is not available"},"priceDeliveryBase":{"type":"string","format":"decimal","nullable":true,"description":"Base delivery cost. If set to null delivery is not available and the item has to be picked up in person."},"priceDeliveryPerMile":{"type":"string","format":"decimal","nullable":true,"description":"Additional cost of delivery dependent on the distance from the owner to the client."},"freeTimeUnit":{"allOf":[{"$ref":"#/components/schemas/BookingTimeUnit"},{"nullable":true},{"description":"If set the owner offers a free trial for this offer of up to freeTimeUnit * freeTimeUnitCount (e.g. 3 hours)"}]},"freeTimeUnitCount":{"allOf":[{"$ref":"#/components/schemas/BookingTimeUnitCount"},{"nullable":true}]},"minBookingTimeUnit":{"allOf":[{"$ref":"#/components/schemas/BookingTimeUnit"},{"description":"Minimum time unit this offer can be booked for"},{"example":"hour"}]},"minBookingTimeUnitCount":{"allOf":[{"$ref":"#/components/schemas/BookingTimeUnitCount"},{"description":"Minimum number of minBookingTimeUnits this offer can be booked for"}]},"extraDiscountPercent":{"type":"string","format":"decimal","minimum":0,"maximum":100,"nullable":true,"description":"Extra percentage discount applied on top of other price reductions."},"addressID":{"type":"string","format":"uuid"},"highlighted":{"type":"boolean"},"insurance":{"type":"boolean","description":"If set to true the owner requires insurance to be bought before renting is possible"}},"required":["offerType","from","to","minbookingTimeUnitCount","minBookingTimeUnit","address"]},"OfferList":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}},"Booking":{"type":"object","properties":{"offerID":{"type":"string","format":"uuid"},"status":{"type":"string","readOnly":true,"format":"enum - new - active - done - canceled"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"price":{"type":"string","format":"decimal","readOnly":true},"priceInsurance":{"type":"string","format":"decimal","readOnly":true},"priceDeliveryAsPackage":{"type":"string","format":"decimal","readOnly":true},"priceDeliveryPerMile":{"type":"string","format":"decimal","readOnly":true},"cancelReason":{"type":"string","readOnly":true,"example":"carbroken"},"cancelDescription":{"type":"string","readOnly":true,"example":"My car just broke down, I can't rent this car"},"prolongStatus":{"type":"string","format":"enum - none - ask - agreed - reject"},"prolongTo":{"type":"string","format":"date-time"},"insurance":{"type":"boolean"},"clientOfferReviewID":{"type":"string","format":"uuid","description":"Pre-generated ID of the Offer review that can be used to post a rating via the /offer-reviews/ID endpoint"},"clientOfferReviewProvided":{"type":"boolean","default":false,"description":"Denotes whether the Client has reviewed the Offer as a result of this booking or not."},"clientOwnerReviewID":{"type":"string","format":"uuid","description":"Pre-generated ID of the Client's review of the Owner that can be used to post a rating via the /user-reviews/ID endpoint"},"clientOwnerReviewProvided":{"type":"boolean","default":false,"description":"Denotes whether the Client has reviewed the Owner as a result of this booking or not."},"ownerClientReviewID":{"type":"string","format":"uuid","nullable":true,"description":"Pre-generated ID of the Owners's review of the Client can be used to post a rating via the /user-reviews/ID endpoint"},"ownerClientReviewProvided":{"type":"string","format":"uuid","description":"Denotes whether the Owner has reviewed the Client as a result of this booking or not."}}},"BookingsList":{"type":"array","items":{"$ref":"#/components/schemas/Booking"}},"Review":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true,"example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"bookingID":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"authorID":{"type":"string","format":"uuid","readOnly":true,"example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"authorRole":{"type":"string","enum":["client","owner"],"readOnly":true},"mostRecentRating":{"type":"integer","minimum":1,"maximum":5,"example":2,"nullable":true},"mostRecentOpinionBody":{"type":"string","example":"Great car, owner very helpful"},"mostRecentOpinionImages":{"type":"array","items":{"$ref":"#/components/schemas/Image"}},"mostRecentOpinionDate":{"type":"string","format":"date-time"}}},"UserReview":{"allOf":[{"$ref":"#/components/schemas/Review"},{"type":"object","properties":{"reviewedUserID":{"type":"string","format":"uuid","readOnly":true,"example":"d290f1ee-6c54-4b01-90e6-d701748f0851"}}}]},"OfferReview":{"allOf":[{"$ref":"#/components/schemas/Review"},{"type":"object","properties":{"reviewedOfferID":{"type":"string","format":"uuid","readOnly":true,"example":"d290f1ee-6c54-4b01-90e6-d701748f0851"}}}]},"ReviewOpinion":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true,"example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"createdAt":{"type":"string","format":"date-time","readOnly":true},"lastUpdatedAt":{"type":"string","format":"date-time","readOnly":true},"authorRole":{"type":"string","enum":["client","owner"],"readOnly":true,"example":"client"},"status":{"type":"string","enum":["new","hidden","deleted","published"],"example":"published","readOnly":true},"rating":{"type":"integer","minimum":1,"maximum":5,"example":5,"nullable":true},"body":{"type":"string","example":"Great car!"},"images":{"allOf":[{"$ref":"#/components/schemas/ImageList"},{"description":"An array of Image UUIDs. The first one is the main photo."}]},"updateHistory":{"type":"array","description":"Contains the history of all the updates to this opinion","items":{"type":"object","properties":{"rating":{"type":"integer","minimum":1,"maximum":5,"example":2,"nullable":true},"body":{"type":"string","example":"Great car, owner very helpful"},"images":{"allOf":[{"$ref":"#/components/schemas/ImageList"},{"description":"An array of Image UUIDs. The first one is the main photo."}]},"createdAt":{"type":"string","format":"date-time","readOnly":true}}}}}},"Image":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true,"example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"url":{"type":"string","format":"url","readOnly":true},"thumbID":{"type":"string","format":"uuid","readOnly":true,"example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"thumbUrl":{"type":"string","format":"url","readOnly":true},"title":{"type":"string"}}},"ImageList":{"type":"array","items":{"$ref":"#/components/schemas/Image"}},"Error":{"type":"object","properties":{"status_code":{"type":"integer","example":400},"errors":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object"}]},"example":{"non_field_errors":["There was an error"]}}}},"Address":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"type":{"type":"string","format":"enum - own"},"country":{"type":"string","description":"2 letters ISO 3166-1 alpha-2 country code\n","example":"US"},"postcode":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"latitude":{"type":"string","readOnly":true},"longitude":{"type":"string","readOnly":true}},"required":["country","postcode","street","city"]},"AddressList":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"Conversation":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"offerID":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"clientID":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"ownerID":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"readByClient":{"format":"date-time","readOnly":true},"readByOwner":{"format":"date-time","readOnly":true},"archivedByClient":{"type":"boolean"},"archivedByOwner":{"type":"boolean"},"blockedByClient":{"type":"boolean"},"blockedByOwner":{"type":"boolean"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}},"required":["offerID","clientID","ownerID"]},"ConversationsList":{"type":"array","items":{"$ref":"#/components/schemas/Conversation"}},"Message":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"date":{"type":"string","format":"date-time","readOnly":true},"conversationID":{"type":"string","format":"uuid","readOnly":true,"example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"senderID":{"type":"string","format":"uuid","readOnly":true,"example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"messageBody":{"type":"string","example":"Can I rent this item for the 4h of July weekend?"}},"required":["conversation","senderID"]}},"responses":{"UnauthorizedResponse":{"description":"The user is not logged in or not authorized to perform this operation"},"NotFoundResponse":{"description":"The matching object was not found"},"BadRequestResponse":{"description":"The request was malformed and the server rejected item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"securitySchemes":{"djangoSessionCookie":{"type":"apiKey","in":"cookie","name":"sessionid"}}}}