{"openapi":"3.0.3","info":{"title":"User administration and API information","description":"Manage users on the Transport Exchange Group Freight Exchange platform and check the API version number.","version":"2.0"},"servers":[{"url":"https://app.staging.transportexchangegroup.com/api/v2","description":"Staging server"},{"url":"https://app.transportexchangegroup.com/api/v2","description":"Production server"}],"paths":{"/version":{"get":{"tags":["API version"],"summary":"Get API version","description":"This method returns the API version. It's useful to check your system is working.","operationId":"getVersionUsingGET","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDto"},"example":{"version":0,"protocolVersion":2}}}},"401":{"description":"Not authorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/groups":{"get":{"tags":["User administration"],"summary":"Get user groups","description":"This method returns the user groups.","operationId":"getGroupsUsingGET","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupDto"}},"example":[{"groupId":213214,"autoGenerated":false,"name":4234234234},{"groupId":213108,"autoGenerated":false,"name":"My Users"},{"groupId":213024,"autoGenerated":true,"name":"My Carriers"},{"groupId":213628,"autoGenerated":false,"name":"PERFORMANCE"},{"groupId":213164,"autoGenerated":false,"name":"My Group"}]}}},"401":{"description":"Not authorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/user/{userId}":{"get":{"tags":["User administration"],"summary":"Get user","description":"Returns a user by ID.","operationId":"getUser","parameters":[{"name":"userId","in":"path","required":true,"description":"ID of user","schema":{"type":"integer","format":"int64","example":"1"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"},"example":{"userId":1,"companyId":100,"firstName":"John","lastName":"Smyth","phone1":"+44 061 1236545","email":"john.smyth@example.com","timeZone":"Europe/London","isAdmin":true,"jobTitle":"Lorry Driver","cxId":"GB 100-001","companyName":"Truckers Inc","hasProfilePicture":true}}}},"401":{"description":"Not authorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}},"components":{"requestBodies":{"uploadDocumentUsingPOST":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"body":{"description":"body","type":"string","format":"binary"},"docInfoDto":{"description":"docInfoDto","$ref":"#/components/schemas/DocInfoDto"}}}}}}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"TEG recommends using this form of authentication for the API"}},"schemas":{"AccessorialDto":{"type":"object","properties":{"apiKey":{"type":"string","enum":["DETENTION","DRIVER_ASSIST","DRIVER_LOAD","ESCORT","FUEL_SURCHARGE","HAZMAT_CHARGE","LAYOVER_FEE","LUMPER","MISCELLANEOUS_CHARGE","ON_TIME","PERMITS","RE_CONSIGNMENT","RE_WORK","SCALE_TIX","STORAGE","STOP_OFF","TARPING","TEAM_SERVICE","TRUCK_ORDERED","CONGESTION_CHARGE","FERRY_CHARGE","TOLLS","ULEZ"]},"price":{"type":"number","format":"double"}}},"Address":{"type":"object","properties":{"area":{"type":"string"},"building":{"type":"string","maxLength":255},"coordinates":{"$ref":"#/components/schemas/LngLatDto"},"country":{"type":"string","description":"must be one of 3166 2 symbol ISO country codes"},"fullAddress":{"type":"string"},"locality":{"type":"string","maxLength":255},"postcode":{"type":"string","maxLength":10},"route":{"type":"string","maxLength":255},"shortDisplayAddress":{"type":"string"},"streetNumber":{"type":"string","maxLength":255},"town":{"type":"string","maxLength":255}},"required":["coordinates","country"]},"AttachmentInfoDto":{"type":"object","properties":{"attachmentExtId":{"type":"string"},"attachmentType":{"type":"string"},"contentType":{"type":"string"},"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"size":{"type":"integer","format":"int64"}}},"BookingStatusDto":{"type":"object","properties":{"arrivalTime":{"type":"string"},"attachmentsInfo":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentInfoDto"}},"bookingStatus":{"type":"string","enum":["ACCEPTED","DECLINED","EN_ROUTE_TO_PICKUP","ARRIVED_TO_PICKUP","LOADED","ARRIVED_TO_DELIVERY","DELIVERED"]},"loadedInfo":{"$ref":"#/components/schemas/LoadedInfoDto"},"location":{"$ref":"#/components/schemas/LocationDto"},"pod":{"$ref":"#/components/schemas/PODDto"},"statusTime":{"type":"string","example":"2020-10-08T15:11:21.000Z"}},"required":["bookingStatus"]},"ChargesDto":{"type":"object","properties":{"cancellation":{"type":"string"},"loadingTime":{"type":"string"},"other":{"type":"string"},"waitingTime":{"type":"string"}}},"CompanyBriefDto":{"type":"object","properties":{"companyId":{"type":"integer","format":"int64","readOnly":true,"description":"Company ID"},"cxCompanyId":{"type":"string","description":"Company ID with country code"},"name":{"type":"string","description":"Company name"}}},"CompanyLoadsDto":{"type":"object","properties":{"paging":{"type":"array","items":{"$ref":"#/components/schemas/PagingDto"}},"LoadDto":{"type":"object","properties":{"loadId":{"type":"integer","format":"int64"},"createdOn":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["AVAILABLE","UNAVAILABLE","UNKNOWN","MAYBE_AVAILABLE"]}}}}},"CompanyConnectedDriverDto":{"type":"object","properties":{"companyId":{"type":"integer","format":"int64","readOnly":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"vehicles":{"type":"array","items":{"$ref":"#/components/schemas/CompanyConnectedDriverVehicleDto"}}}},"CompanyConnectedDriverFinalDto":{"type":"object","properties":{"companyId":