{"swagger":"2.0","info":{"version":"1","title":"204837-BAT-API"},"schemes":["https"],"basePath":"/v1","securityDefinitions":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"paths":{"/batches/{userId}":{"get":{"summary":"Gets batches by User Id","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string"}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/BatchesOutput"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"User not found","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"summary":"CORS enabled","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}},"/bulk/profiles/checkout":{"post":{"summary":"Initiates checkout for a list of profiles","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"ProfileCheckoutInput","required":true,"schema":{"$ref":"#/definitions/ProfileCheckoutInput"}}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/BatchId"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"400":{"description":"Validation Error","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"summary":"CORS enabled","consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}},"/bulk/profiles/checkout/{batchId}":{"get":{"summary":"Gets brief status of the checkout by batch id","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string","description":"Id of the batch"}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/BriefBatchStatus"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Batch Id not found","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"summary":"CORS enabled","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}},"/bulk/profiles/checkout/{batchId}/detailed":{"get":{"summary":"Gets detailed status of the checkout by batch id","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string","description":"Id of the batch"}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/DetailedBatchStatus"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Batch Id not found","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"summary":"CORS enabled","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}},"/bulk/profiles/checkout/{batchId}/history":{"get":{"summary":"Gets history of the checkout by batch id","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string","description":"Id of the batch"}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/HistoryOutput"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Batch Id not found","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}},"/bulk/profiles/deactivate":{"post":{"summary":"Initiates deactivation for batch","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"in":"formData","name":"user","description":"User Id","required":true,"type":"string"},{"in":"formData","name":"batchName","description":"Batch Name","required":false,"type":"string"},{"in":"formData","name":"data","type":"file","required":true,"description":"Deactivate input data"}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/BatchId"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"400":{"description":"Validation Error","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"summary":"CORS enabled","consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}},"/bulk/profiles/deactivate/{batchId}":{"get":{"summary":"Get brief status of the deactivate by batch id","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string","description":"Id of the batch"}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/BriefBatchStatus"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Batch Id not found","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"summary":"CORS enabled","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}},"/bulk/profiles/deactivate/{batchId}/detailed":{"get":{"summary":"Get detailed status of the checkout by batch id","consumes":["application/json"],"produces":["multipart/form-data"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string","description":"Id of the batch"}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"File with detailed status","schema":{"type":"file"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Batch Id not found","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"summary":"CORS enabled","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}},"/bulk/profiles/deactivate/{batchId}/history":{"get":{"summary":"Gets history of the checkout by batch id","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string","description":"Id of the batch"}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/HistoryOutput"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Batch Id not found","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"summary":"CORS enabled","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}},"/bulk/profiles/undo-checkout":{"post":{"summary":"Undo checkout for a list of profiles","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"ProfileUndoCheckoutInput","required":true,"schema":{"$ref":"#/definitions/ProfileUndoCheckoutInput"}}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/BatchId"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"400":{"description":"Validation Error","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"summary":"CORS enabled","consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}},"/bulk/profiles/undo-checkout/{batchId}":{"get":{"summary":"Get brief status of the undo-checkout by batch id","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string","description":"Id of the batch"}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/BriefBatchStatus"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Batch Id not found","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"summary":"CORS enabled","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}},"/bulk/profiles/undo-checkout/{batchId}/detailed":{"get":{"summary":"Get detailed status of the undo-checkout by batch id","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string","description":"Id of the batch"}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/DetailedBatchStatus"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Batch Id not found","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"summary":"CORS enabled","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}},"/bulk/profiles/undo-checkout/{batchId}/history":{"get":{"summary":"Gets history of the undo-checkout by batch id","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string","description":"Id of the batch"}],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/HistoryOutput"},"headers":{"Access-Control-Allow-Origin":{"type":"string"}}},"401":{"description":"Unauthorized error","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Batch Id not found","schema":{"$ref":"#/definitions/Error"}},"408":{"description":"Request timed out","schema":{"$ref":"#/definitions/Error"}},"415":{"description":"Unsupported media type","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/Error"}}}},"options":{"summary":"CORS enabled","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"batchId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"200 response","schema":{"$ref":"#/definitions/Empty"},"headers":{"Access-Control-Allow-Origin":{"type":"string"},"Access-Control-Allow-Methods":{"type":"string"},"Access-Control-Allow-Headers":{"type":"string"}}}}}}},"definitions":{"BatchesOutput":{"type":"array","title":"Batch List","items":{"type":"object","title":"Batch Info","required":["batchId","batchName","creationDate","batchType","href"],"properties":{"batchId":{"type":"string","title":"Batch Id","pattern":"^(.*)$"},"batchName":{"type":"string","title":"Batch Name","pattern":"^(.*)$"},"batchType":{"type":"string","enum":["CHECKOUT","DEACTIVATE","UNDO_CHECKOUT","TBD"],"title":"The batch type","pattern":"^(.*)$"},"creationDate":{"type":"string","title":"Batch creation date","pattern":"^(.*)$"},"href":{"type":"string","title":"Url for details of the specific batch","pattern":"^(.*)$"}}}},"HistoryOutput":{"type":"object","required":["action","date"],"properties":{"action":{"type":"string","title":"Action","pattern":"^(.*)$"},"date":{"type":"string","title":"Date of the Action","pattern":"^(.*)$"}},"title":"History Output"},"Empty":{"type":"object","title":"Empty Schema"},"BriefBatchStatus":{"type":"object","title":"Brief Batch Process Status","required":["summary","user","status"],"properties":{"summary":{"type":"object","title":"Batch processing summary","required":["total","failed","inProgress","succeeded"],"properties":{"total":{"type":"integer","title":"Profiles count in the batch"},"inProgress":{"type":"integer","title":"Number of the profile in IN_PROGRESS status"},"succeeded":{"type":"integer","title":"Number of the profile in SUCCESS status"},"failed":{"type":"integer","title":"Number of the profile in FAILED status"}}},"status":{"type":"string","enum":["IN_PROGRESS","COMPLETED","FAILED"],"title":"Batch processing status","pattern":"^(.*)$"},"user":{"type":"string","title":"User of the specific Batch"}}},"DetailedBatchStatus":{"type":"object","title":"Detailed Batch Process Status","required":["count","processed","status","details"],"properties":{"summary":{"type":"object","title":"Batch processing summary","required":["total","failed","inProgress","succeeded"],"properties":{"total":{"type":"integer","title":"Profiles count in the batch"},"inProgress":{"type":"integer","title":"Number of the profile in IN_PROGRESS status"},"succeeded":{"type":"integer","title":"Number of the profile in SUCCESS status"},"failed":{"type":"integer","title":"Number of the profile in FAILED status"}}},"status":{"type":"string","enum":["IN_PROGRESS","COMPLETED","FAILED"],"title":"Batch processing status","pattern":"^(.*)$"},"user":{"type":"string","title":"User of the specific Batch"},"details":{"type":"array","title":"Batch processing details List","items":{"type":"object","title":"Batch processing details","required":["uid","status"],"properties":{"uid":{"type":"string","title":"Profile UID","pattern":"^(.*)$"},"status":{"type":"string","title":"Profile processing status","pattern":"^(.*)$","enum":["VALIDATED","VALIDATION_FAILED","CHECKOUT_COMPLETED","DEACTIVATED","TBD"]},"reason":{"type":"string","title":"Processing fail reason","pattern":"^(.*)$"}}}}}},"ProfileCheckoutInput":{"type":"object","required":["uids","user"],"properties":{"uids":{"type":"array","title":"Profile UIDs","items":{"type":"string","title":"Profile UID","pattern":"^(.*)$"}},"user":{"type":"string","title":"User","pattern":"^(.*)$"},"batchName":{"type":"string","title":"Batch Name","pattern":"^(.*)$"}},"title":"Profile checkout operation input"},"ProfileUndoCheckoutInput":{"type":"object","required":["uids","user"],"properties":{"uids":{"type":"array","title":"Profile UIDs","items":{"type":"string","title":"Profile UID","pattern":"^(.*)$"}},"user":{"type":"string","title":"User","pattern":"^(.*)$"},"batchName":{"type":"string","title":"Batch Name","pattern":"^(.*)$"}},"title":"Profile undo-checkout operation input"},"BatchId":{"type":"object","required":["batchId"],"properties":{"batchId":{"type":"string","title":"Batch Id","pattern":"^(.*)$"}},"title":"Batch Id Output"},"Error":{"type":"object","properties":{"message":{"type":"string","title":"Error message"}},"title":"Error Output"}}}