{"openapi":"3.0.3","info":{"title":"6profiles-template","version":"1.0.0","description":"API documentation for bookhospital","contact":{"name":"Name of API Owner or responsible","url":"http://6profiles.com/support","email":"contact@6profiless.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"termsOfService":"https://example.com/terms/"},"servers":[{"description":"production","url":"http://6profiles:8080/api"}],"tags":[{"name":"Offers","description":"description offers"},{"name":"Monitoring","description":"Operations related to monitoring"}],"security":[{"oAuth2":["write","read"]}],"paths":{"/offers":{"get":{"summary":"Get a list of offers","description":"Get a list of offers from Offer store","operationId":"getAllOffers","security":[{"oAuth2":["read"]}],"tags":["Offers"],"parameters":[{"$ref":"#/components/parameters/pageParam"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/totalParam"},{"$ref":"#/components/parameters/orderByParam"},{"$ref":"#/components/parameters/selectParam"},{"$ref":"#/components/parameters/excludeParam"},{"$ref":"#/components/parameters/expandParam"},{"$ref":"#/components/parameters/filterParam"},{"$ref":"#/components/parameters/queryParam"}],"responses":{"206":{"$ref":"#/components/responses/offerListResponse"},"400":{"$ref":"#/components/responses/badRequestResponse"},"401":{"$ref":"#/components/responses/unauthorizedResponse"},"403":{"$ref":"#/components/responses/forbiddenResponse"},"405":{"$ref":"#/components/responses/notAllowedResponse"},"415":{"$ref":"#/components/responses/unsupportedMediaTypeResponse"},"429":{"$ref":"#/components/responses/tooManyRequestsResponse"},"503":{"$ref":"#/components/responses/serviceUnavailableResponse"},"default":{"$ref":"#/components/responses/unexpectedErrorResponse"}}},"post":{"summary":"Create a offer","description":"Create a Offer in Offer store","operationId":"createOffer","security":[{"oAuth2":["write"]}],"tags":["Offers"],"requestBody":{"$ref":"#/components/requestBodies/offerCreateRequestBody"},"responses":{"201":{"$ref":"#/components/responses/offerCreateAndUpdateResponse"},"400":{"$ref":"#/components/responses/badRequestResponse"},"401":{"$ref":"#/components/responses/unauthorizedResponse"},"403":{"$ref":"#/components/responses/forbiddenResponse"},"415":{"$ref":"#/components/responses/unsupportedMediaTypeResponse"},"429":{"$ref":"#/components/responses/tooManyRequestsResponse"},"503":{"$ref":"#/components/responses/serviceUnavailableResponse"},"default":{"$ref":"#/components/responses/unexpectedErrorResponse"}}}},"/offers/{offer_uuid}":{"get":{"summary":"Get a offer","description":"Get a Offer from Offer store","operationId":"getOfferByUUID","security":[{"oAuth2":["read"]}],"tags":["Offers"],"parameters":[{"$ref":"#/components/parameters/offerUUID"},{"$ref":"#/components/parameters/selectParam"},{"$ref":"#/components/parameters/excludeParam"},{"$ref":"#/components/parameters/expandParam"}],"responses":{"200":{"$ref":"#/components/responses/offerResponse"},"400":{"$ref":"#/components/responses/badRequestResponse"},"401":{"$ref":"#/components/responses/unauthorizedResponse"},"403":{"$ref":"#/components/responses/forbiddenResponse"},"404":{"$ref":"#/components/responses/notFoundResponse"},"415":{"$ref":"#/components/responses/unsupportedMediaTypeResponse"},"429":{"$ref":"#/components/responses/tooManyRequestsResponse"},"503":{"$ref":"#/components/responses/serviceUnavailableResponse"},"default":{"$ref":"#/components/responses/unexpectedErrorResponse"}}},"patch":{"summary":"Update partial offer","description":"Update a partial offer","operationId":"patchOffer","security":[{"oAuth2":["write"]}],"tags":["Offers"],"parameters":[{"$ref":"#/components/parameters/offerUUID"}],"requestBody":{"$ref":"#/components/requestBodies/offerPartialUpdateRequestBody"},"responses":{"200":{"$ref":"#/components/responses/offerCreateAndUpdateResponse"},"400":{"$ref":"#/components/responses/badRequestResponse"},"401":{"$ref":"#/components/responses/unauthorizedResponse"},"403":{"$ref":"#/components/responses/forbiddenResponse"},"404":{"$ref":"#/components/responses/notFoundResponse"},"415":{"$ref":"#/components/responses/unsupportedMediaTypeResponse"},"429":{"$ref":"#/components/responses/tooManyRequestsResponse"},"503":{"$ref":"#/components/responses/serviceUnavailableResponse"},"default":{"$ref":"#/components/responses/unexpectedErrorResponse"}}},"delete":{"summary":"Delete offer","description":"Delte a offer","operationId":"deleteOfferByUUID","security":[{"oAuth2":["write"]}],"tags":["Offers"],"parameters":[{"$ref":"#/components/parameters/offerUUID"}],"responses":{"204":{"$ref":"#/components/responses/noContentResponse"},"400":{"$ref":"#/components/responses/badRequestResponse"},"401":{"$ref":"#/components/responses/unauthorizedResponse"},"403":{"$ref":"#/components/responses/forbiddenResponse"},"404":{"$ref":"#/components/responses/notFoundResponse"},"415":{"$ref":"#/components/responses/unsupportedMediaTypeResponse"},"429":{"$ref":"#/components/responses/tooManyRequestsResponse"},"503":{"$ref":"#/components/responses/serviceUnavailableResponse"},"default":{"$ref":"#/components/responses/unexpectedErrorResponse"}}}},"/status":{"get":{"summary":"API monitoring endpoint.","description":"This is a response proposal for the **/status** endpoint specified on API defpageion standard.\nThe endpoint should check API involved systems (such as databases or external backends) as well as API responses to given requests. \nThere are two arrays to be fulfilled: the _systems_ array and the _requests_ array. \nEach of them will contain the systems checks and the API calls checks.\n","operationId":"healthCheck","security":[{"oAuth2":["read"]}],"tags":["Monitoring"],"responses":{"200":{"$ref":"#/components/responses/statusSuccessResponse"},"401":{"$ref":"#/components/responses/unauthorizedResponse"},"403":{"$ref":"#/components/responses/forbiddenResponse"},"415":{"$ref":"#/components/responses/unsupportedMediaTypeResponse"},"429":{"$ref":"#/components/responses/tooManyRequestsResponse"},"503":{"$ref":"#/components/responses/serviceUnavailableResponse"},"default":{"$ref":"#/components/responses/unexpectedErrorResponse"}}}}},"components":{"securitySchemes":{"oAuth2":{"description":"OAuth 2.0 authentication.","type":"oauth2","flows":{"password":{"tokenUrl":"https://empresa/api-oAuth2/v1/token","scopes":{"read":"Grant read-only access to all your data","write":"Grant write-only access to all your data"}},"clientCredentials":{"tokenUrl":"https://empresa/api-oAuth2/v1/token","scopes":{"read":"Grant read-only access to all your data","write":"Grant write-only access to all your data"}}}}},"parameters":{"offerUUID":{"in":"path","name":"offer_uuid","required":true,"description":"The uuid of a offer","schema":{"$ref":"#/components/schemas/uuid"},"examples":{"uuidExample":{"value":"62977d46-7a50-41c9-8d84-38272ac2a8df"}}},"pageParam":{"in":"query","name":"page","description":"Page we want.\n* Minimum value: 1\n* Maximum value: Total of records\n","schema":{"type":"integer","format":"int32","default":1,"minimum":1},"example":1},"pageSize":{"in":"query","name":"$pageSize","description":"Maximum number of records per page.\n* Minimum value: 1\n* Maximum value: 250\n","schema":{"type":"integer","format":"int32","default":10},"example":10},"totalParam":{"in":"query","name":"$total","description":"Indicates whether the _total_ and _total_pages_ attributes should be calculated and returned in the _metadata.paging_ object of the standard response.\n","schema":{"type":"boolean","default":false},"example":true},"selectParam":{"in":"query","name":"$select","schema":{"type":"string","minLength":1,"maxLength":150},"description":"Allows you to select the attributes of the resource that you want to obtain in the query.\nIt is recommended for use when you only want to obtain a few attributes from a complex resource.\nIt can be specified as a comma-sepparated list of attributes.\n","example":"id,long_description,type"},"excludeParam":{"in":"query","name":"$exclude","schema":{"type":"string","minLength":1,"maxLength":150},"description":"Allows you to exclude certain attributes of the resource.\nIt is recommended for use when you want to exclude some attributes from a complex resource.\nIt can be specified as a comma-sepparated list of attributes.\n","example":"id,type"},"expandParam":{"in":"query","name":"$expand","schema":{"type":"string","minLength":1,"maxLength":150},"description":"Indicates a list of sub-attributes that you want to expand.\nIt can be specified as a comma-sepparated list of attributes.\n","example":"subcategories,type_name"},"orderByParam":{"in":"query","name":"$orderby","schema":{"type":"string","minLength":1,"maxLength":150},"description":"It allows to indicate the ordering criteria of a query.\nIt can be specified as a comma-sepparated list of attributes.\n","example":"date desc,name asc"},"filterParam":{"in":"query","name":"$filter","schema":{"type":"string","minLength":1,"maxLength":150},"description":"Indicates the filter criteria for a complex query.","example":"surname.Equals(\"Doe\")||name==(\"Rick\")"},"queryParam":{"in":"query","name":"query_parameter","description":"Any parameter that can be passed using the _query string_.\nTypes can be numeric (integer, float, double), string, boolean, etc. \n","schema":{"type":"string"},"required":false,"example":"name=pepe"}},"schemas":{"standardError":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Code of the error","example":100},"message":{"type":"string","description":"Message of the error","example":"Error message"}},"required":["code","message"]},"standardPaging":{"type":"object","description":"Pagination information object","properties":{"page":{"type":"integer","format":"int32","description":"Number of records to page.","example":1},"pageSize":{"type":"integer","format":"int32","description":"Number of records per page","example":10},"total":{"type":"integer","format":"int32","description":"Total number of records","example":35},"numPage":{"type":"integer","format":"int32","description":"Page number","example":1},"totalPages":{"type":"integer","format":"int32","description":"Total pages number","example":7}},"required":["page","pageSize","numPage"]},"standardResponse":{"properties":{"data":{"anyOf":[{"type":"object","nullable":true},{"type":"array","nullable":true}]}}},"standardErrorResponse":{"allOf":[{"$ref":"#/components/schemas/standardResponse"},{"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/standardError"}}}}],"required":["errors"]},"standardPagedResponse":{"allOf":[{"$ref":"#/components/schemas/standardResponse"},{"properties":{"paging":{"allOf":[{"$ref":"#/components/schemas/standardPaging"}]}}}],"required":["paging","data"]},"uuid":{"type":"string","format":"uuid","minLength":36,"maxLength":36,"pattern":"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}","example":"62977d46-7a50-41c9-8d84-38272ac2a8df"},"OfferPartialUpdateDto":{"type":"object","properties":{"employeeType":{"type":"string","enum":["Employee","Contractor","Administrator","Additional Account","Service_account"],"description":"Tipo de empleado. Puede ser uno de los valores indicados.","example":"Employee"}},"required":["employeeType"]},"OfferDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"62977d46-7a50-41c9-8d84-38272ac2a8df"},"title":{"type":"string","example":"example"},"salary":{"type":"number","format":"float","example":2000.0},"address":{"type":"string","example":"example"},"hospital":{"type":"string","example":"example"},"createdAt":{"type":"string","example":"2001-10-12T00:00:00","format":"date-time"},"isFavorite":{"type":"boolean","example":true}}},"system":{"type":"object","properties":{"systemName":{"type":"string","description":"System name","example":"database"},"status":{"type":"boolean","description":"System status","example":true}}},"status":{"type":"object","properties":{"status":{"description":"API global status","type":"boolean","example":true},"systems":{"type":"array","items":{"$ref":"#/components/schemas/system"}}}}},"requestBodies":{"offerCreateRequestBody":{"description":"Offer creation","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferDto"},"examples":{"exampleOfferCreateRequestBody":{"$ref":"#/components/examples/exampleOfferCreateRequestBody"}}}}},"offerPartialUpdateRequestBody":{"description":"Offer update","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferPartialUpdateDto"},"examples":{"exampleOfferPartialUpdateRequestBody":{"$ref":"#/components/examples/exampleOfferPartialUpdateRequestBody"}}}}}},"responses":{"badRequestResponse":{"description":"Bad request","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/standardErrorResponse"},"examples":{"badRequestResponseExample":{"$ref":"#/components/examples/badRequestResponseExample"}}}}},"unauthorizedResponse":{"description":"Unauthorized","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/standardErrorResponse"},"examples":{"unauthorizedResponseExample":{"$ref":"#/components/examples/unauthorizedResponseExample"}}}}},"forbiddenResponse":{"description":"Forbidden","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/standardErrorResponse"},"examples":{"forbiddenResponseExample":{"$ref":"#/components/examples/forbiddenResponseExample"}}}}},"notFoundResponse":{"description":"Not found","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/standardErrorResponse"},"examples":{"notFoundResponseExample":{"$ref":"#/components/examples/notFoundResponseExample"}}}}},"notAllowedResponse":{"description":"NotAllowed","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/standardErrorResponse"},"examples":{"notAllowedResponseExample":{"$ref":"#/components/examples/notAllowedResponseExample"}}}}},"unsupportedMediaTypeResponse":{"description":"UnsupportedMediaType","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/standardErrorResponse"},"examples":{"unsupportedMediaTypeExample":{"$ref":"#/components/examples/unsupportedMediaTypeExample"}}}}},"tooManyRequestsResponse":{"description":"Too many requests","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/standardErrorResponse"},"examples":{"tooManyRequestsResponseExample":{"$ref":"#/components/examples/tooManyRequestsResponseExample"}}}}},"serviceUnavailableResponse":{"description":"Service unavailable","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/standardErrorResponse"},"examples":{"unexpectedErrorResponseExample":{"$ref":"#/components/examples/serviceUnavailableResponseExample"}}}}},"unexpectedErrorResponse":{"description":"Unexpected error","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/standardErrorResponse"},"examples":{"unexpectedErrorResponseExample":{"$ref":"#/components/examples/unexpectedErrorResponseExample"}}}}},"offerListResponse":{"description":"OK","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/standardPagedResponse"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OfferDto"}}}}]},"examples":{"exampleGetAllOffers":{"$ref":"#/components/examples/exampleGetAllOffers"}}}}},"offerResponse":{"description":"OK","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/standardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/OfferDto"}}}]},"examples":{"exampleGetOffer":{"$ref":"#/components/examples/exampleGetOffer"}}}}},"offerCreateAndUpdateResponse":{"description":"OK","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/standardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/OfferDto"}}}]},"examples":{"exampleCreateAndUpdateOffer":{"$ref":"#/components/examples/exampleCreateAndUpdateOffer"}}}}},"noContentResponse":{"description":"No content response","headers":{"X-Trace-ID":{"description":"Trace id header\n","schema":{"$ref":"#/components/schemas/uuid"}}}},"statusSuccessResponse":{"description":"Status success response","headers":{"X-Trace-ID":{"description":"Trace id header","schema":{"$ref":"#/components/schemas/uuid"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/standardResponse"},{"properties":{"data":{"$ref":"#/components/schemas/status"}}}]},"examples":{"exampleGetStatus":{"$ref":"#/components/examples/exampleGetStatus"}}}}}},"examples":{"exampleGetAllOffers":{"value":{"data":[{"id":"62977d46-7a50-41c9-8d84-38272ac2a8df","title":"This is an example title","salary":2000.0,"address":"street 2","hospital":"Main hospital","createdAt":"2024-12-31T00:00:00","isFavorite":true},{"id":"52977d46-7a50-41c9-8d84-38272ac2a8df","title":"This is an example title 2","salary":1500.0,"address":"Street Example 2","hospital":"Hospital 2","createdAt":"2025-01-13T12:00:00"}],"paging":{"page":1,"pageSize":10,"total":35,"numPage":1,"totalPages":2}}},"exampleGetOffer":{"value":{"data":{"dn":"example","fullName":"example","organizationalUnit":"example"}}},"exampleCreateAndUpdateOffer":{"value":{"data":{"uuid":"62977d46-7a50-41c9-8d84-38272ac2a8df"}}},"exampleOfferPartialUpdateRequestBody":{"value":{"employeeType":"Employee"}},"exampleOfferCreateRequestBody":{"value":{"dn":"example","fullName":"Name complete","employeeType":"Employee"}},"exampleGetStatus":{"value":{"data":{"status":true,"systems":[{"systemName":"database","status":true}]}}},"badRequestResponseExample":{"value":{"errors":[{"code":400,"message":"Bad Request"}]}},"unauthorizedResponseExample":{"value":{"errors":[{"code":401,"message":"Unauthorized"}]}},"forbiddenResponseExample":{"value":{"errors":[{"code":403,"message":"Forbidden"}]}},"notFoundResponseExample":{"value":{"errors":[{"code":404,"message":"Not found"}]}},"notAllowedResponseExample":{"value":{"errors":[{"code":405,"message":"NotAllowed"}]}},"unsupportedMediaTypeExample":{"value":{"errors":[{"code":415,"message":"UnsupportedMediaType"}]}},"tooManyRequestsResponseExample":{"value":{"errors":[{"code":429,"message":"Too many requests"}]}},"unexpectedErrorResponseExample":{"value":{"errors":[{"code":500,"message":"Unexpected Error"}]}},"serviceUnavailableResponseExample":{"value":{"errors":[{"code":503,"message":"Service unavailable"}]}}}}}