{"openapi":"3.0.0","info":{"title":"Abandoned Cart","description":"","version":"v1","contact":{"email":"ruben.prieto@orange.com"}},"servers":[{"url":"https://tienda-admin.digital.orange.es.staging.orsac.net","description":"Staging server (only accessible via VPN)"},{"url":"https://tienda-admin.digital.orange.es","description":"Main (production) server"}],"paths":{"/ws/cart/v1/abandoned":{"post":{"summary":"Notify a new abandoned cart","description":"Notifies a new abandoned cart; a reminder will be sent to the user through email/SMS","requestBody":{"description":"Contains required data to be able to notify user regarding their abandoned cart","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbandonedCart"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiResponseOK"}}}},"400":{"description":"Bad request (Invalid payload)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiResponseError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiResponseError"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiResponseError"}}}},"5XX":{"description":"Unexpected error."}}}}},"components":{"schemas":{"AbandonedCart":{"type":"object","properties":{"phone":{"$ref":"#/components/schemas/phone"},"email":{"$ref":"#/components/schemas/email"},"url":{"$ref":"#/components/schemas/url"},"userType":{"$ref":"#/components/schemas/userType"},"segment":{"$ref":"#/components/schemas/segment"},"timestamp":{"$ref":"#/components/schemas/timestamp"},"form":{"$ref":"#/components/schemas/form"},"contents":{"$ref":"#/components/schemas/contents"}},"required":["phone","url","userType","segment","timestamp","form","contents"]},"phone":{"type":"string","description":"user mobile phone"},"email":{"type":"string","nullable":true,"description":"user email address"},"url":{"type":"string","format":"uri","pattern":"^https://(tiendaonline|tienda\\.digital)\\.orange\\.es/.+","example":"https://tiendaonline.orange.es/xxxyyyzzz","description":"URL/deeplink for cart"},"userType":{"type":"string","description":"user type","enum":["cliente","prospecto"]},"segment":{"type":"string","description":"user segment","enum":["particulares","empresa"]},"timestamp":{"type":"string","description":"abandoned cart timestamp","enum":["start","24h"]},"form":{"type":"boolean","description":"defines if data is received from form","enum":[true,false]},"contents":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string"},"desc":{"type":"string"}}}},"apiResponseOK":{"type":"object","properties":{"request":{"type":"string","example":"YqMD3g8APFA4oohitigQlAAAAAE"},"ts":{"type":"string","format":"date-time"},"success":{"type":"boolean","pattern":"true","description":"Note that a valid request will always return a true value","example":"true"},"duration":{"type":"number","format":"double"},"message":{"type":"string"},"payload":{"type":"object","nullable":true,"example":"{id:14}"}}},"apiResponseError":{"type":"object","properties":{"request":{"type":"string","example":"YqMD3g8APFA4oohitigQlAAAAAE"},"ts":{"type":"string","format":"date-time"},"success":{"type":"boolean","pattern":"false","description":"Note that an invalid request will always return a false value","example":"false"},"duration":{"type":"number","format":"double"},"message":{"type":"string"},"payload":{"type":"object","nullable":true}}}},"securitySchemes":{"WSClient":{"type":"apiKey","in":"header","name":"X-WS-Client"},"WSAuth":{"type":"apiKey","in":"header","name":"X-WS-Auth"}}},"security":[{"WSClient":[],"WSAuth":[]}]}