{"openapi":"3.1.0","info":{"title":"Swagger for S2S-API Workorder","description":"S2S-API Workorder","contact":{"email":"compte-fonction.edi-europe-ic@fr.michelin.com"}},"servers":[{"url":"/"}],"security":[{"OAUTH2":[]}],"paths":{"/api/v1/workOrders":{"post":{"tags":["work-order-controller"],"description":"Creating a new work order authorisation request","operationId":"postWorkOrder","parameters":[{"name":"queryParameters","in":"query","description":"The partnerId may be used to identify the API consumer with a unique identifier (a Service Center code, a Service Provider Code, a Customer code). It may help the API to contextualize the request.","required":true,"schema":{"type":"object","additionalProperties":{"type":"string"}},"example":"SP01234"},{"name":"API-Version","in":"header","description":"An API-Version custom header MAY be added to a request. If added, it SHALL only contain the MAJOR version. API-Version header SHALL be aligned with the URI version.","schema":{"type":"string"},"example":1}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonNode"}}},"required":true},"responses":{"201":{"description":"Work order created in a synchronous process","headers":{"API-Version":{"description":"Providing the current version of the implemented API in SemVer.","style":"simple","schema":{"type":"string"}},"Location":{"description":"Location of a specific resource.","style":"simple","schema":{"type":"string"}}}},"202":{"description":"Accepted","headers":{"API-Version":{"description":"Providing the current version of the implemented API in SemVer.","style":"simple","schema":{"type":"string"}},"Location":{"description":"Location of a specific resource.","style":"simple","schema":{"type":"string"}}}},"400":{"description":"Example for a work order with wrong format in the interventionLocation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorised request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Invalid identifier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/configuration/encrypt":{"post":{"tags":["configuration-controller"],"operationId":"encrypt","requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/api/v1/TireProduct":{"post":{"tags":["tire-product-controller"],"operationId":"createTireProduct","parameters":[{"name":"queryParameters","in":"query","required":true,"schema":{"type":"object","additionalProperties":{"type":"string"}}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonNode"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/api/v1/Stock":{"post":{"tags":["stock-controller"],"description":"Request to extract the list of tires visible for one or more stock types","operationId":"postStockRequest","parameters":[{"name":"queryParameters","in":"query","description":"The partnerId may be used to identify the API consumer with a unique identifier (a Service Center code, a Service Provider Code, a Customer code). It may help the API to contextualize the request.","required":true,"schema":{"type":"object","additionalProperties":{"type":"string"}},"example":"SP01234"},{"name":"API-Version","in":"header","description":"An API-Version custom header MAY be added to a request. If added, it SHALL only contain the MAJOR version. API-Version header SHALL be aligned with the URI version.","schema":{"type":"string"},"example":1}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonNode"}}},"required":true},"responses":{"200":{"description":"Returned tyre stock","headers":{"API-Version":{"description":"Providing the current version of the implemented API in SemVer.","style":"simple","schema":{"type":"string"}},"Location":{"description":"Location of a specific resource.","style":"simple","schema":{"type":"string"}}}},"400":{"description":"Example for a work order with wrong format in the interventionLocation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorised request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Invalid identifier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/workOrders/{ident}/approve":{"patch":{"tags":["approve-work-order-controller"],"description":"Mark a work order request as completed","operationId":"patchWorkOrderAsCompleted","parameters":[{"name":"ident","in":"path","description":"The partnerId may be used to identify the API consumer with a unique identifier (a Service Center code, a Service Provider Code, a Customer code). It may help the API to contextualize the request.","required":true,"schema":{"type":"string"},"example":"SP01234"},{"name":"queryParameters","in":"query","required":true,"schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"API-Version","in":"header","description":"An API-Version custom header MAY be added to a request. If added, it SHALL only contain the MAJOR version. API-Version header SHALL be aligned with the URI version.","schema":{"type":"string"},"example":1}],"responses":{"200":{"description":"Work order was marked completed","headers":{"API-Version":{"description":"Providing the current version of the implemented API in SemVer.","style":"simple","schema":{"type":"string"}},"Location":{"description":"Location of a specific resource.","style":"simple","schema":{"type":"string"}}}},"400":{"description":"See error code and details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorised request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Invalid identifier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v2.0.0/contracts":{"get":{"tags":["contract-v-2-controller"],"description":"Get a paginated list of contracts assigned to a given license plate. This is the second version, it uses Flowlink as a backend","operationId":"getContracts","parameters":[{"name":"licensePlate","in":"query","description":"Vehicle license plate","required":false,"schema":{"type":"string"},"example":"TEST"},{"name":"registrationCountry","in":"query","description":"Vehicle registration country","required":false,"schema":{"type":"string"},"example":"FR"},{"name":"effectiveDate","in":"query","description":"Effective date of the contract","required":false,"schema":{"type":"string","format":"date"},"example":"2025-03-20"},{"name":"partnerId","in":"query","description":"Partner identifier","required":false,"schema":{"type":"string"},"example":"SP_PartnerId"},{"name":"sort","in":"query","description":"Sorting fields","required":false,"schema":{"type":"string"},"example":"contractor.name,vehicle.licensePlate:DESC"},{"name":"cursor","in":"query","description":"Pagination cursor","required":false,"schema":{"type":"integer","format":"int32"},"example":10},{"name":"pageSize","in":"query","description":"Page size","required":false,"schema":{"type":"integer","format":"int32"},"example":10}],"responses":{"200":{"description":"OK","headers":{"API-Version":{"description":"Providing the current version of the implemented API in SemVer.","style":"simple","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelVehicleDetails"}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorised request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/vehicles/{ident}":{"get":{"tags":["vehicle-controller"],"description":"Get a list of contracts assigned to a given license plate.","operationId":"getVehicle","parameters":[{"name":"ident","in":"path","description":"The identifier of the vehicle","required":true,"schema":{"type":"string"},"example":"524bacb2-eca4-11ed-a05b-0242ac120003"},{"name":"queryParameters","in":"query","description":"The partnerId may be used to identify the API consumer with a unique identifier (a Service Center code, a Service Provider Code, a Customer code). It may help the API to contextualize the request.","required":true,"schema":{"type":"object","additionalProperties":{"type":"string"}},"example":"SP01234"},{"name":"API-Version","in":"header","description":"An API-Version custom header MAY be added to a request. If added, it SHALL only contain the MAJOR version. API-Version header SHALL be aligned with the URI version.","schema":{"type":"string"},"example":1}],"responses":{"200":{"description":"OK","headers":{"API-Version":{"description":"Providing the current version of the implemented API in SemVer.","style":"simple","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelVehicle"}}}}},"400":{"description":"Invalid id supplied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorised request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Invalid identifier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Not allowed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/timeout/{loop}":{"get":{"tags":["time-out-controller"],"operationId":"test","parameters":[{"name":"loop","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/api/v1/policies":{"get":{"tags":["policies-controller"],"operationId":"getPolicies","parameters":[{"name":"queryParameters","in":"query","required":true,"schema":{"type":"object","additionalProperties":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelBlackAndWhiteList"}}}}}}}},"/api/v1/contracts":{"get":{"tags":["contract-controller"],"description":"Get a list of contracts assigned to a given license plate.","operationId":"getContacts","parameters":[{"name":"queryParameters","in":"query","required":true,"schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"API-Version","in":"header","description":"An API-Version custom header MAY be added to a request. If added, it SHALL only contain the MAJOR version. API-Version header SHALL be aligned with the URI version.","schema":{"type":"string"},"example":1}],"responses":{"200":{"description":"OK","headers":{"API-Version":{"description":"Providing the current version of the implemented API in SemVer.","style":"simple","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelVehicleDetails"}}}}},"400":{"description":"Invalid id supplied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorised request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Invalid identifier","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Not allowed request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"JsonNode":{},"ApiError":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ApiErrorDetail"}}}},"ApiErrorDetail":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"detail":{"type":"string"},"source":{"$ref":"#/components/schemas/ApiErrorSource"}}},"ApiErrorSource":{"type":"object","properties":{"parameter":{"type":"string"},"pointer":{"type":"string"}}},"EDIWheelContractor":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"]},"EDIWheelVehicle":{"type":"object","properties":{"id":{"type":"string","minLength":1},"licensePlate":{"type":"string"},"fleetNumber":{"type":"string"},"vin":{"type":"string"},"registrationCountry":{"type":"string"},"brand":{"type":"string"},"model":{"type":"string"},"year":{"type":"integer","format":"int32","maximum":3000,"minimum":1800},"type":{"type":"string"},"remarks":{"type":"string"},"odometerValue":{"type":"string"},"parties":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelParty"}},"axles":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelAxle"}},"positions":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelVehiclePosition"}}},"required":["id"]},"EDIWheelVehicleDetails":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"contractor":{"$ref":"#/components/schemas/EDIWheelContractor"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"vehicles":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelVehicle"}}},"required":["contractor","id","name"]},"EDIWheelAxle":{"type":"object","properties":{"type":{"type":"string"},"axleNumber":{"type":"integer","format":"int64"},"tireCount":{"type":"integer","format":"int64"}},"required":["axleNumber","tireCount"]},"EDIWheelDefect":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"observation":{"type":"string"},"recommendedAction":{"type":"string"},"isClosed":{"type":"boolean"},"defectDetectionDate":{"type":"string"}}},"EDIWheelEquipment":{"type":"object","properties":{"sensorId":{"type":"string","minLength":1}},"required":["sensorId"]},"EDIWheelMeasurement":{"type":"object","properties":{"typeCode":{"type":"string"},"measurementValue":{"$ref":"#/components/schemas/EDIWheelMeasurementValue"},"grooveNumber":{"type":"string"},"lastMeasurementDate":{"type":"string"}}},"EDIWheelMeasurementValue":{"type":"object","properties":{"content":{"type":"string"},"unitCode":{"type":"string"}}},"EDIWheelParty":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"roleCode":{"type":"string"},"telephoneUniversalCommunication":{"type":"string"}},"required":["id"]},"EDIWheelReference":{"type":"object","properties":{"typeCode":{"type":"string"},"value":{"type":"string"}}},"EDIWheelVehiclePosition":{"type":"object","properties":{"axleNumber":{"type":"integer","format":"int64"},"tirePositionNumber":{"type":"integer","format":"int64"},"tireID":{"type":"string"},"tireRFID":{"type":"string"},"tireSerialNumber":{"type":"string"},"productReference":{"$ref":"#/components/schemas/EDIWheelReference"},"isRegrooved":{"type":"boolean"},"sparewheelPositionNumber":{"type":"integer","format":"int64"},"measurements":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelMeasurement"}},"defects":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelDefect"}},"equipments":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelEquipment"}}}},"EDIWheelBlackAndWhiteList":{"type":"object","properties":{"useBlacklist":{"type":"boolean"},"useWhiteList":{"type":"boolean"},"blackList":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelReferenceEntry"}},"whiteList":{"type":"array","items":{"$ref":"#/components/schemas/EDIWheelReferenceEntry"}}}},"EDIWheelReferenceEntry":{"type":"object","properties":{"references":{"$ref":"#/components/schemas/EDIWheelReference"}}}},"securitySchemes":{"OAUTH2":{"type":"oauth2","name":"OAUTH2","flows":{"authorizationCode":{"authorizationUrl":"https://login-indus-fed.michelin.com:443/am/oauth2/authorize","tokenUrl":"https://login-indus-fed.michelin.com:443/am/oauth2/access_token","scopes":{"profile":"profile","openid":"openid","groups":"groups"}}}}}}}