{"openapi":"3.0.3","info":{"title":"Account Facility and Technology API","description":"API that allows Salesforce to fetch facility and technology details for a given account and acting-as role.\n","version":"1.0.0"},"servers":[{"url":"https://api.example.com/v1","description":"Production server"},{"url":"https://sandbox-api.example.com/v1","description":"Sandbox server"}],"paths":{"/facility-technology":{"post":{"summary":"Get facility and technology details for an account","description":"Returns the list of facilities and associated technologies for the given accountId and actingAs role.\n","operationId":"getFacilityAndTechnology","tags":["FacilityTechnology"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacilityTechnologyRequest"},"example":{"accountId":"1","actingAs":"BT"}}}},"responses":{"200":{"description":"Successful response with facility and technology details.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FacilityTechnologyResponse"}},"example":[{"accountId":"1","actingAs":"BT","facilitiyandTech":[{"facilityCode":"AMR","haz":"N","technologyDetail":[{"techCode":"040","techName":"Abscd","haz":"N"},{"techCode":"050","techName":"Abscd","haz":"N"}]}]},{"accountId":"1","actingAs":"BT","facilitiyandTech":[{"facilityCode":"ALC","haz":"N","technologyDetail":[{"techCode":"040","techName":"Abscd","haz":"N"},{"techCode":"050","techName":"Abscd","haz":"N"}]}]}]}}},"400":{"description":"Invalid request - missing or malformed parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - authentication credentials missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No facility/technology data found for the given account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}}},"components":{"schemas":{"FacilityTechnologyRequest":{"type":"object","required":["accountId","actingAs"],"properties":{"accountId":{"type":"string","description":"Unique identifier of the account.","example":"1"},"actingAs":{"type":"string","description":"Role the account is acting as.","example":"BT"}}},"FacilityTechnologyResponse":{"type":"object","properties":{"accountId":{"type":"string","example":"1"},"actingAs":{"type":"string","example":"BT"},"facilitiyandTech":{"type":"array","items":{"$ref":"#/components/schemas/FacilityAndTech"}}}},"FacilityAndTech":{"type":"object","properties":{"facilityCode":{"type":"string","example":"AMR"},"haz":{"type":"string","description":"Hazard flag for the facility (Y/N).","example":"N"},"technologyDetail":{"type":"array","items":{"$ref":"#/components/schemas/TechnologyDetail"}}}},"TechnologyDetail":{"type":"object","properties":{"techCode":{"type":"string","example":"040"},"techName":{"type":"string","example":"Abscd"},"haz":{"type":"string","description":"Hazard flag for the technology (Y/N).","example":"N"}}},"ErrorResponse":{"type":"object","properties":{"errorCode":{"type":"string","example":"BAD_REQUEST"},"message":{"type":"string","example":"accountId is required."},"timestamp":{"type":"string","format":"date-time","example":"2026-07-06T10:15:00Z"}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}}}