{"swagger":"2.0","info":{"version":"1.0.0","title":"1receipt® Integration into POS Interface - Sandbox Env.","description":"1receipt® API documentation for POS providers."},"tags":[{"name":"Shopper"},{"name":"Receipt"}],"schemes":["https"],"host":"nodejs-api-stage.1receipt.io","basePath":"/api","paths":{"/checkShopperId":{"get":{"summary":"Check if a shopperId existed","description":"Return a shopperId if the shopper is existed otherwise return error status code","parameters":[{"in":"header","name":"Authorization","type":"string","format":"header.payload.sign","description":"id token generated by cognito"},{"in":"query","name":"id","type":"string","required":true,"description":"ID to check"},{"in":"query","name":"authType","type":"string","enum":["developer","retailer","manager"],"required":true},{"in":"query","name":"authSub","type":"string","required":false,"description":"Only required for developer and manager"},{"in":"query","name":"abn","type":"string","required":false,"description":"Only required for retailer"}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"id":{"type":"string","description":"The shopper ID."}}}},"400":{"description":"The Id parameter is empty"},"403":{"description":"Token verification failed"},"404":{"description":"Account with this id not found"},"500":{"description":"Server error"}},"tags":["Shopper"]}},"/receipt":{"post":{"summary":"Create a receipt","description":"Create a receipt","parameters":[{"in":"header","name":"Authorization","type":"string","format":"header.payload.sign","description":"id token generated by cognito"},{"in":"body","name":"ReceiptFormModel","schema":{"type":"object","required":["abn","accountId","purchaseDateTime","items","rawReceipt","totalAmount","authType"],"properties":{"id":{"type":"string"},"abn":{"type":"string"},"accountId":{"type":"string"},"purchaseDateTime":{"type":"string","format":"date"},"items":{"type":"string"},"rawReceipt":{"type":"string"},"totalAmount":{"type":"number"},"authType":{"type":"string","enum":["developer","retailer","manager"]},"authSub":{"type":"string"},"partnerName":{"type":"string"}}}}],"responses":{"200":{"description":"OK. Receipt created"},"400":{"description":"BadRequest, Model state is invalid"},"403":{"description":"Token verification failed"},"404":{"description":"NotFound, ABN is not vaild"},"500":{"description":"Server error"}},"tags":["Receipt"]}}}}