{"swagger":"2.0","info":{"version":"0.1.0","title":"AA DXT - CRM Customer Service"},"host":"aa-dxt-crm-customer-service.dev.dxf.bosch.tech","tags":[{"name":"customer"}],"schemes":["https"],"paths":{"/api/createOrUpdate":{"post":{"tags":["customer"],"summary":"upsertCustomer","description":"Endpoint for writing customer data.\nThis uses the supplied customer data to either create a new customer in the store manager or updates an existing one.","operationId":"upsertCustomer","parameters":[{"in":"body","name":"body","required":false,"schema":{"$ref":"#/definitions/Customer"}}],"responses":{"200":{"description":"The customer data was successfully updated in the store manager.","schema":{"type":"string"}},"400":{"description":"The provided customer data is invalid"},"401":{"description":"Invalid authentication supplied"},"500":{"description":"A problem with the backend service was encountered"}}}},"/api/delete":{"delete":{"tags":["customer"],"summary":"deleteCustomer","description":"Endpoint for deleting customer data.\nThis uses the supplied customer id to delete all related data from the store manager.","operationId":"deleteCustomer","parameters":[{"name":"identifier","in":"query","required":true,"type":"string"},{"name":"sourceSystem","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"The customer data was successfully deleted from the store manager, or the customer does not exist there.","schema":{"type":"string"}},"400":{"description":"The provided ids are invalid"},"401":{"description":"Invalid authentication supplied"},"500":{"description":"A problem with the backend service was encountered"}}}},"/api/ready":{"get":{"operationId":"ready","parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}}},"definitions":{"Address":{"type":"object","properties":{"street":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"district":{"type":"string"},"region":{"type":"string"},"country":{"type":"string"}}},"Attribute":{"type":"object","properties":{"set":{"type":"string"},"attribute":{"type":"string"},"value":{"type":"string"}}},"Customer":{"type":"object","required":["identifier","name","sourceSystem"],"properties":{"name":{"type":"string","description":"The customer (store) name"},"identifier":{"type":"string","description":"The internal (with respect to the source system) id of this customer. This id must be unique within a sourceSystem."},"sourceSystem":{"type":"string","description":"The unique system id where this customer is stored"},"classification":{"type":"array","description":"The classification of the customer which determines what kind of B2B customer it is, e.g. BCS workshop or wholesaler.","items":{"type":"string"}},"segmentation":{"type":"string","description":"The customer segmentation of retailers, wholesalers etc. Restricted to one value on CRM side."},"address":{"$ref":"#/definitions/Address"},"phone":{"type":"string","description":"The phone number of the customer including the extension"},"fax":{"type":"string","description":"The fax number of the customer including the extension"},"email":{"type":"string"},"website":{"type":"string"},"localization":{"$ref":"#/definitions/Localization"},"geoData":{"$ref":"#/definitions/GeoData"},"openingHours":{"$ref":"#/definitions/OpeningHours"},"holidays":{"type":"array","items":{"$ref":"#/definitions/Holiday"}},"vkOrgs":{"type":"array","items":{"$ref":"#/definitions/VKOrg"}},"onlineBooking":{"type":"boolean","description":"Defines whether the link to the online booking site should be shown in the dealer locator for this customer."},"attributes":{"type":"array","items":{"$ref":"#/definitions/Attribute"}}},"description":"This model defines a single customer (store)."},"GeoData":{"type":"object","properties":{"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"}},"description":"The geo coordinates of the customer address. If no coordinates are given, the address is used to determine them."},"Holiday":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"},"reason":{"type":"string"}},"description":"The next holidays of the customer including the start and end date as well as a reason."},"Localization":{"type":"object","properties":{"name":{"type":"string"},"street":{"type":"string"},"city":{"type":"string"}},"description":"A localized version of the customers address for display purposes"},"OpeningHours":{"type":"object","properties":{"monday":{"$ref":"#/definitions/Timespan"},"tuesday":{"$ref":"#/definitions/Timespan"},"wednesday":{"$ref":"#/definitions/Timespan"},"thursday":{"$ref":"#/definitions/Timespan"},"friday":{"$ref":"#/definitions/Timespan"},"saturday":{"$ref":"#/definitions/Timespan"},"sunday":{"$ref":"#/definitions/Timespan"}}},"Timespan":{"type":"object","properties":{"open":{"type":"string"},"middayClosed":{"type":"string"},"middayOpen":{"type":"string"},"closed":{"type":"string"}}},"VKOrg":{"type":"object","properties":{"salesOrg":{"type":"string"},"distChannel":{"type":"string"},"division":{"type":"string"}}}},"externalDocs":{"url":"https://inside-docupedia.bosch.com/confluence/x/y8joS"}}