{"swagger":"2.0","info":{"description":"1to1Progress API documentation","version":"1.0.0","title":"1to1Progress API","contact":{"email":"alex@example.org"}},"tags":["developers"],"paths":{"/api/v1/person/ping":{"get":{"tags":["developers"],"summary":"utility call","description":"The ping entry point can be used to test easily the authentication process and allows the web client to ensure that the sending of its credentials is valid"}},"/api/v1/person/:id/fetch":{"get":{"tags":["developers"],"summary":"get person data based on their identifier","parameters":[{"name":"id","required":true,"type":"integer","description":"ID of the person.","example":12345}],"responses":{"200":{"description":"sucessful operation","content":{"application/json":{"schema":{"$ref":"#/definitions/Person"}}}}}}},"/api/v1/person/store":{"post":{"tags":["developers"],"summary":"creates person account","operationId":"personCreate","description":"Allows the creation of a user account on the platform","consumes":[{"application/x-www-form-urlencoded":null}],"produces":["application/json"],"parameters":[{"in":"body","name":"personData","description":"data of the person to be created","schema":{"$ref":"#/definitions/createPersonRequest"}}],"responses":{"200":{"description":"person record was created"},"401":{"description":"bad request or authentication errors"},"422":{"description":"validation error encountered"},"500":{"description":"internal server error"}}}},"/api/v1/learners/:id/fetch":{"get":{"tags":["developers"],"summary":"get learner data based on their identifier"}},"/api/v1/learners/lookup":{"get":{"tags":["developers"],"summary":"get multiple learners using their identifier"}},"/api/v1/trainings/:id/fetch":{"get":{"tags":["developers"]}},"/api/v1/trainings/:id/lessons/fetch-all":{"get":{"tags":["developers"]}},"/api/v1/trainings/add-to-person":{"post":{"tags":["developers"]}},"/api/v1/lessons/:id/fetch":{"get":{"tags":["developers"]}},"/api/v1/trainings/:id/lesson/availability":{"post":{"tags":["developers"]}}},"definitions":{"createPersonRequest":{"type":"object","required":["civility","first_name","last_name","email"],"properties":{"civility":{"type":"integer","description":"1 for male, 2 for female, 3 for agender","example":1},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"email":{"type":"string","example":"john.doe@example.org"},"phone":{"type":"string","example":33512345678},"secondary_phone":{"type":"string","example":33512345678},"timezone":{"type":"string","example":"Europe/Paris"},"country_id":{"type":"integer","example":"FR"},"business_unit_id":{"type":"integer","description":"ID of the business unit attached to your company on our platform. if none provided, the first one is automatically selected."}}},"updatePersonRequest":{"type":"object","required":["person_id","civility","first_name","last_name","email","phone"],"properties":{"person_id":{"type":"integer","example":123456},"civility":{"type":"integer","description":"1 for male, 2 for female, 3 for agender","example":1},"first_name":{"type":"string","example":"John"},"last_name":{"type":"string","example":"Doe"},"email":{"type":"string","example":"john.doe@example.org"},"phone":{"type":"string","example":33512345678},"secondary_phone":{"type":"string","example":33512345678}}},"Person":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","default":"person"},"id":{"type":"integer","example":12345},"attributes":{"type":"object","properties":{"civility":{"type":"integer","example":1},"firstname":{"type":"string","example":"John"},"lastname":{"type":"string","example":"Doe"},"email":{"type":"string","example":"john.doe@example.net"}}},"links":{"type":"object","properties":{"self":{"type":"string","example":"https://app.1to1progress.com/api/v1/person/12345/fetch"}}},"relationships":{"type":"object"}}}}},"Learner":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","default":"learner"},"id":{"type":"integer","example":12345},"attributes":{"type":"object","properties":{"civility":{"type":"integer","example":1},"firstname":{"type":"string","example":"John"},"lastname":{"type":"string","example":"Doe"},"email":{"type":"string","example":"john.doe@example.net"},"isActive":{"type":"boolean"}}}}},"relationships":{"type":"object","properties":{"structure":{"$ref":"#/definitions/identifierStructure"},"businessUnit":{"$ref":"#/definitions/identifierBusinessUnit"},"training":{"$ref":"#/definitions/identifierTraining"}}},"links":{"type":"object","properties":{"self":{"type":"string","example":"https://app.1to1progress.com/api/v1/learners/1234/fetch"}}}}},"Contract":{"type":"object"},"Training":{"type":"object","properties":{"data":{"type":"object"},"relationships":{"type":"object"},"included":{"type":"object"},"links":{"type":"object"}}},"identifierStructure":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","value":"structure"},"id":{"type":"integer","example":12345}}}}},"identifierBusinessUnit":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","value":"business-unit"},"id":{"type":"integer","example":12345}}}}},"identifierTraining":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","value":"training"},"id":{"type":"integer","example":12345}}},"links":{"type":"object","properties":{"self":{"type":"string","example":"https://app.1to1progress.com/api/v1/trainings/12345/fetch"}}}}},"relatedStructure":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","value":"structure"},"id":{"type":"integer","example":12345},"attributes":{"type":"object","properties":{"name":{"type":"string","example":"Example Corporation"}}}}}}},"relatedBusinessUnit":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","value":"business-unit"},"id":{"type":"integer","example":12345},"attributes":{"type":"object","properties":{"name":{"type":"string","example":"Example IT Dept."}}}}}}},"Model":{"type":"object","properties":{"id":{"type":"integer","format":"int64"}}}},"host":"virtserver.swaggerhub.com","basePath":"/Educastream/1to1ProgressAPI/1.0.0","schemes":["https"]}