{"swagger":"2.0","info":{"version":"v3","title":"3x3 Dashboard API"},"tags":[{"name":"CEP","description":"Consumer Engagement Platform 3x3 insights API"}],"paths":{"/authenticate":{"post":{"summary":"Summary","consumes":["application/x-www-form-urlencoded"],"parameters":[{"in":"body","name":"model","description":"The login credentials","schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"}}}}],"responses":{"200":{"description":"Returns authentication token"},"405":{"description":"Wrong credentials"},"500":{"description":"Error"}}}},"/Api/Cep/RetailersByPhone":{"get":{"tags":["CEP"],"summary":"Returns retailers which have the specified phone number","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"phone","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"A list of objects containing the retailer name and 3x3 id","schema":{"type":"object","properties":{"Name":{"type":"string","description":"The store name"},"CompanyId":{"type":"string","description":"The store X3 Id"}}}},"405":{"description":"Invalid input"},"500":{"description":"Error"}}}},"/Api/Cep/RetailerDetails":{"get":{"tags":["CEP"],"summary":"Returns details for the retailer matching the specified 3x3 id","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"companyId","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"Details for the matching retailer","schema":{"type":"object","properties":{"Address":{"type":"string"},"City":{"type":"string"},"State":{"type":"string"},"PostalCode":{"type":"string"},"Timezone":{"type":"string"},"UtcOffset":{"type":"integer"},"DaylightSavingsFlag":{"type":"boolean"}}}},"405":{"description":"Invalid input"},"500":{"description":"Error"}}}},"/Api/Cep/Retailers":{"get":{"tags":["CEP"],"summary":"Returns retailers which contains specified searchTerm","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"SarchTerm","in":"query","required":false,"type":"string"},{"name":"Page","in":"query","required":false,"type":"integer"},{"name":"Pageize","in":"query","required":false,"type":"integer"}],"responses":{"200":{"description":"Object with matching retailers and total count of pages"},"500":{"description":"Error"}}}},"/Api/Cep/User":{"post":{"tags":["CEP"],"summary":"When a user checks in with their phone number","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"model","required":true,"schema":{"$ref":"#/definitions/CepUserInputModel"}}],"responses":{"200":{"description":"is exsiting user","schema":{"type":"object","properties":{"UserId":{"type":"string","description":"The existing user id"}}}},"201":{"description":"is new user","schema":{"type":"object","properties":{"UserId":{"type":"string","description":"The newly created user id"}}}},"405":{"description":"Invalid input"},"500":{"description":"Error"}}}},"/Api/Cep/User/{phone}/settings":{"post":{"tags":["CEP"],"summary":"Set the user taste profile settings","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"model","required":true,"schema":{"$ref":"#/definitions/UserTasteProfileInputModel"}},{"in":"path","name":"phone","required":true,"type":"string"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"}}},"get":{"tags":["CEP"],"summary":"Get the user taste profile settings","parameters":[{"in":"query","name":"x3RetailerId","required":true,"type":"string"},{"in":"path","name":"phone","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/UserTasteProfileInputModel"}},"400":{"description":"Invalid request"}}}},"/Api/Cep/ConfirmUserPhoneNumber":{"post":{"tags":["CEP"],"summary":"Twilio will send received sms to this endpoint","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"model","required":true,"schema":{"$ref":"#/definitions/TwilioReceivedSmsInputModel"}}],"responses":{"200":{"description":"Returns specific xml used by twilio"},"500":{"description":"Error"}}}},"/Api/Cep/ConfirmationMessage":{"post":{"tags":["CEP"],"summary":"Sets confirmation message for the retailer.","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"model","required":true,"schema":{"$ref":"#/definitions/ConfirmationMessageInputModel"}}],"responses":{"200":{"description":"Confirmation message is set successfully"},"500":{"description":"Error"}}}},"/Api/Cep/TasteProfileMessage":{"post":{"tags":["CEP"],"summary":"Sets taste profile message for the retailer.","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"model","required":true,"schema":{"$ref":"#/definitions/UpdateRetailerMessageInputModel"}}],"responses":{"200":{"description":"Confirmation message is set successfully"},"500":{"description":"Error"}}}},"/Api/Cep/Sms":{"post":{"tags":["CEP"],"summary":"Send message to all verified users of the retailer if you have |link| in the text will be replaced with RedirectUrl value.","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"model","required":true,"schema":{"$ref":"#/definitions/MessageRetailerAudienceInputModel"}}],"responses":{"200":{"description":"Phone numbers to which the messages were sent successfully","schema":{"type":"array","items":{"type":"string"}}},"500":{"description":"Error."}}}},"/Api/Cep/Count":{"post":{"tags":["CEP"],"summary":"Retrieve the count of matching verified phone numbers, according to the specified filter","produces":["application/json"],"parameters":[{"in":"body","name":"model","required":true,"schema":{"$ref":"#/definitions/InputCountModel"}}],"responses":{"200":{"description":"The count of total subscribers, sms subscribers and email subscriers for given store","schema":{"type":"integer"}},"400":{"description":"Error."}}}},"/Api/Cep/BulkSms":{"post":{"tags":["CEP"],"summary":"Send message to a list of phone numbers","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"model","required":true,"schema":{"$ref":"#/definitions/BulkSmsInputModel"}}],"responses":{"200":{"description":"Messages sent successfully","schema":{"type":"array","items":{"type":"string"}}},"500":{"description":"Error."}}}},"/Api/Cep/SortProducts":{"post":{"tags":["CEP"],"summary":"Sorts a list of products according to a users' prefferences","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"model","required":true,"schema":{"$ref":"#/definitions/SortProductsInputModel"}}],"responses":{"200":{"description":"Products sorted successfuly","schema":{"type":"array","items":{"type":"string"}}},"500":{"description":"Error."}}}},"/Api/Cep/AssociateUserWithStore":{"post":{"tags":["CEP"],"summary":"Associates a user with store","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"model","required":true,"schema":{"$ref":"#/definitions/AssociateUserWithStoreInputModel"}}],"responses":{"200":{"description":"User associated with a store successfuly"},"500":{"description":"Error."}}}},"/Api/Cep/SmsCounter":{"get":{"tags":["CEP"],"summary":"Returns count of verified numbers of the retailer","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"model","required":true,"schema":{"$ref":"#/definitions/SmsCounterInputModel"}}],"responses":{"200":{"description":"Messages sent successfully"},"500":{"description":"Error."}}}}},"definitions":{"CepUserInputModel":{"type":"object","properties":{"PhoneNumber":{"type":"string","description":"Phone Number","format":"+15555555555"},"DeviceId":{"type":"string","description":"Id of device user is logging in from"}}},"UserTasteProfileInputModel":{"type":"object","properties":{"Email":{"type":"string"},"StoreX3Id":{"type":"string"},"UserId":{"type":"string"},"PhoneNumber":{"type":"string"},"TasteProfile":{"type":"array","items":{"type":"string"}}}},"TwilioReceivedSmsInputModel":{"type":"object","properties":{"ToCountry":{"type":"string"},"ToState":{"type":"string"},"SmsMessageSid":{"type":"string"},"NumMedia":{"type":"integer"},"ToCity":{"type":"string"},"FromZip":{"type":"string"},"SmsSid":{"type":"string"},"FromState":{"type":"string"},"SmsStatus":{"type":"string"},"FromCity":{"type":"string"},"Body":{"type":"string"},"FromCountry":{"type":"string"},"To":{"type":"string"},"ToZip":{"type":"string"},"NumSegments":{"type":"string"},"MessageSid":{"type":"string"},"AccountSid":{"type":"string"},"From":{"type":"string"},"ApiVersion":{"type":"string"}}},"ConfirmationMessageInputModel":{"type":"object","properties":{"X3RetailerId":{"type":"integer"},"Text":{"type":"string"}}},"UpdateRetailerMessageInputModel":{"type":"object","properties":{"X3RetailerId":{"type":"integer"},"Text":{"type":"string"}}},"MessageRetailerAudienceInputModel":{"type":"object","properties":{"X3Id":{"type":"string"},"Text":{"type":"string"},"RedirectUrl":{"type":"string"},"Filter":{"type":"string","description":"The filter to ma"}},"required":["X3Id","Text"]},"InputCountModel":{"type":"object","properties":{"X3Id":{"type":"string","description":"X3Id of the store"},"Filter":{"type":"string","description":"The filter to match certain group"}},"required":["X3Id","Filter"]},"BulkSmsInputModel":{"type":"object","properties":{"X3Id":{"type":"string"},"RedirectUrl":{"type":"string"},"Text":{"type":"string"},"PhoneNumbers":{"type":"array","items":{"type":"string"}}}},"SortProductsInputModel":{"type":"object","properties":{"X3UserId":{"type":"string"},"X3ProductIds":{"type":"array","items":{"type":"string"}},"X3RetailerId":{"type":"string"}}},"AssociateUserWithStoreInputModel":{"type":"object","properties":{"X3Id":{"type":"string"},"PhoneNumber":{"type":"string"}}},"SmsCounterInputModel":{"type":"object","properties":{"RetailerId":{"type":"integer"}}}}}