# Delivery Times Management

Manage delivery times

## Retrieving all delivery times

> Returns all the delivery times defined for the given tenant.\
> \
> In case of any validation problem, the below \`errorCodes\` can be returned:\
> \- \*\*DELIVERY-TIME-500001\*\*: Internal problem with the service

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Delivery Times Management","description":"Manage delivery times"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":["shipping.shipping_read"]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"schemas":{"DeliveryTime":{"title":"Delivery Time","description":"","type":"object","allOf":[{"$ref":"#/components/schemas/BasicDeliveryTime"},{"properties":{"metadata":{"$ref":"#/components/schemas/MetaData"}}}]},"BasicDeliveryTime":{"title":"Delivery Time","description":"","type":"object","properties":{"id":{"type":"string","description":"Delivery Time ID: Autogenerated (if not provided in request) or User-Defined"},"name":{"type":"string","description":"Optional name for Delivery Time"},"siteCode":{"type":"string","description":"Site code for which the Delivery Time is assigned"},"isDeliveryDay":{"type":"boolean","description":"`true` indicates that the Delivery Time holds delivery date information, whereas `false` represents that the Delivery Time configuration has disabled delivery for a specific date or time period."},"zoneId":{"type":"string","description":"ID of the delivery zone for which the Delivery Time is valid"},"day":{"$ref":"#/components/schemas/DeliveryDay"},"slots":{"type":"array","description":"This attribute holds information about the established timeslots and cut-off times that are set up for a specific Delivery Time","items":{"$ref":"#/components/schemas/SlotCreation"}},"isForAllZones":{"type":"boolean","description":"Flag which indicates if the non-delivery time is defined for the same day, period or weekday for all zones of the site"},"timeZoneId":{"type":"string","description":"Id of the time zone for which the Delivery Time should be created (e.g. Europe/Warsaw)."},"deliveryDayShift":{"type":"integer","minimum":0,"default":0,"description":"Indicates in how many days the order has been delivered when the order has been completed before cut-off time."}},"required":["siteCode","isDeliveryDay","day","timeZoneId"]},"DeliveryDay":{"title":"Delivery Day","type":"object","description":"This attribute holds the time configuration for which the Delivery Time is valid. Only a single attribute can be set at any given moment.","properties":{"weekday":{"description":"Enum containing names of weekdays, possible values: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`","type":"string"},"singleDate":{"type":"string","description":"Date for which the delivery time is valid, compliant with the ISO 8601 standard. Dates should be provided at 12:00:00 local time and send in ISO 8601 standard (e.g. For Europe/Warsaw timezone, the 10:00 should be sent - 2023-06-12T10:00:00.000Z)."},"datePeriod":{"type":"object","description":"Date period for which the Delivery Time is valid. Dates should be provided at 12:00:00 local time and send in ISO 8601 standard (e.g. For Europe/Warsaw timezone, the 10:00 should be sent - 2023-06-12T10:00:00.000Z).","properties":{"dateFrom":{"type":"string","description":"Date from which the delivery time is valid, compliant with the ISO 8601 standard."},"dateTo":{"type":"string","description":"Date to which the delivery time is valid, compliant with the ISO 8601 standard."}},"required":["dateFrom","dateTo"]}}},"SlotCreation":{"title":"Slot","description":"","type":"object","properties":{"id":{"type":"string","description":"Delivery Time Slot ID: Autogenerated (if not provided in request) or User-Defined"},"shippingMethod":{"description":"Selected shipping method which is available for the Delivery Time in the given Time Slot","type":"string"},"deliveryTimeRange":{"$ref":"#/components/schemas/DeliveryTimeRange"},"cutOffTime":{"$ref":"#/components/schemas/CutOffTIme"},"capacity":{"type":"integer","description":"A capacity determines how many orders the given Delivery Time Slot can handle"}},"required":["shippingMethod","deliveryTimeRange","cutOffTime","capacity"]},"DeliveryTimeRange":{"title":"Time range","description":"A `from` to `to` time range for which the object is valid","type":"object","properties":{"timeFrom":{"pattern":"^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$","type":"string","description":"Time from which the object is valid, provided in local time (e.g. 10:00)"},"timeTo":{"pattern":"^(2[0-4]|[01]?[0-9]):([0-5]?[0-9])$","type":"string","description":"Time to which the object is valid, provided in local time (e.g. 10:00)."}},"required":["timeFrom","timeTo"]},"CutOffTIme":{"title":"Cut-Off Time","description":"This denotes the latest point in time by which an action (such as an order or request) must be completed for a specific Delivery Time. This attribute is key in determining the end of a time window for certain operations and helps maintain efficiency in the delivery process.","type":"object","properties":{"time":{"type":"string","description":"The cut-off time refers to the deadline by which an order must be placed to be eligible for same-day processing and shipping. Date is compliant with the ISO 8601 standard, but only time is taking into account."},"cutOffDayShift":{"type":"integer","minimum":0,"default":0,"description":"Indicates in how many days the order has been delivered when the order has been completed before cut-off time. Property is only available for delivery times of weekday type."},"deliveryCycleName":{"type":"string","description":"An optional suffix that is added to delivery cycle name"}},"required":["time"]},"MetaData":{"type":"object","properties":{"createdAt":{"type":"string","description":"Date and time when the object was created, compliant with the ISO 8601 format.","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?$"},"modifiedAt":{"type":"string","description":"Date and time when the object was last modified, compliant with the ISO 8601 format.","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?$"},"version":{"minimum":1,"type":"integer"}}},"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]}},"responses":{"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/shipping/{tenant}/delivery-times":{"get":{"summary":"Retrieving all delivery times","tags":["Delivery Times Management"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryTime"}}}}},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/yaasAware_403"},"500":{"$ref":"#/components/responses/internalError_500"}},"operationId":"GET-shipping-list-delivery-times","description":"Returns all the delivery times defined for the given tenant.\n\nIn case of any validation problem, the below `errorCodes` can be returned:\n- **DELIVERY-TIME-500001**: Internal problem with the service"}}}}
```

## Creating a delivery time

> Creates a single delivery time. Delivery time allows to specify the cut off times for a specific zone and day of the week. \
> \
> The endpoint has a validation which checks:\
> &#x20; \- if the \`zoneId\` belongs to the site\
> &#x20; \- if provided slots id are not duplicated\
> &#x20; \- if the site exists in the system\
> &#x20; \- if the \`timeFrom\` is before \`timeTo\`\
> \
> In case of any validation problem, the below \`errorCodes\` can be returned:\
> \- \*\*DELIVERY-TIME-400001\*\*: Non-delivery day cannot have declared \`slots\` property\
> \- \*\*DELIVERY-TIME-400003\*\*: Delivery time of \`weekday\` type overlaps on existing one\
> \- \*\*DELIVERY-TIME-400004\*\*: Delivery time of \`singleDay\` type overlaps on existing one\
> \- \*\*DELIVERY-TIME-400005\*\*: Slot overlaps delivery time of another slots in given delivery time\
> \- \*\*DELIVERY-TIME-400006\*\*: Delivery time of \`datePeriod\` type overlaps on existing one\
> \- \*\*DELIVERY-TIME-400007\*\*: Duplicated time ranges and cutOff time different slots\
> \- \*\*DELIVERY-TIME-400008\*\*: 'ZoneId' cannot be provided when \`isForAllZones\` flag is active \
> \- \*\*DELIVERY-TIME-400009\*\*: Provided zone not exist in provided site\
> \- \*\*DELIVERY-TIME-400010\*\*: Provided shipping method does not belong to the given zone\
> \- \*\*DELIVERY-TIME-400011\*\*: Delivery 'timeFrom' cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-400012\*\*: Delivery time \`dateFrom\` cannot be after \`dateTo\`\
> \- \*\*DELIVERY-TIME-400013\*\*: \`isForAllZones\` flag cannot be active for delivery day\
> \- \*\*DELIVERY-TIME-400014\*\*: Zone id must be provided for delivery day\
> \- \*\*DELIVERY-TIME-400015\*\*: There are duplicated slot ids in the slots array\
> \- \*\*DELIVERY-TIME-400016\*\*: Provided \`timeZoneId\` is incorrect\
> \- \*\*DELIVERY-TIME-400017\*\*: Timezone indicates different time shift than provided delivery time \
> \- \*\*DELIVERY-TIME-400018\*\*: Delivery \`cutOffTime\` cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-404001\*\*: Provided site does not exist\
> \- \*\*DELIVERY-TIME-409001\*\*: Delivery time with given id already exists in the system\
> \- \*\*DELIVERY-TIME-500001\*\*: Internal problem with the service\
> \- \*\*DELIVERY-TIME-SLOT-400001\*\*: There are overlapping slot id in the request\
> \- \*\*DELIVERY-TIME-SLOT-400005\*\*: The slot cut off day is set when the delivery time date or period is set\
> \- \*\*DELIVERY-TIME-SLOT-400006\*\*: The slot cut off day is set when the delivery day shift is set

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Delivery Times Management","description":"Manage delivery times"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":["shipping.shipping_manage"]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"parameters":{"validateOverlapQuery":{"name":"validateOverlap","description":"The flag allows to enable or disable the validation which checks if the delivery time ranges from slots of the same shipping method overlap each other.","in":"query","required":false,"schema":{"type":"boolean","default":true}}},"responses":{"yaasAware_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"resourceConflict_409":{"description":"Creation failed because there was a conflict with another resource. Details of the error are included in the response payload.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}},"schemas":{"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]},"BasicDeliveryTime":{"title":"Delivery Time","description":"","type":"object","properties":{"id":{"type":"string","description":"Delivery Time ID: Autogenerated (if not provided in request) or User-Defined"},"name":{"type":"string","description":"Optional name for Delivery Time"},"siteCode":{"type":"string","description":"Site code for which the Delivery Time is assigned"},"isDeliveryDay":{"type":"boolean","description":"`true` indicates that the Delivery Time holds delivery date information, whereas `false` represents that the Delivery Time configuration has disabled delivery for a specific date or time period."},"zoneId":{"type":"string","description":"ID of the delivery zone for which the Delivery Time is valid"},"day":{"$ref":"#/components/schemas/DeliveryDay"},"slots":{"type":"array","description":"This attribute holds information about the established timeslots and cut-off times that are set up for a specific Delivery Time","items":{"$ref":"#/components/schemas/SlotCreation"}},"isForAllZones":{"type":"boolean","description":"Flag which indicates if the non-delivery time is defined for the same day, period or weekday for all zones of the site"},"timeZoneId":{"type":"string","description":"Id of the time zone for which the Delivery Time should be created (e.g. Europe/Warsaw)."},"deliveryDayShift":{"type":"integer","minimum":0,"default":0,"description":"Indicates in how many days the order has been delivered when the order has been completed before cut-off time."}},"required":["siteCode","isDeliveryDay","day","timeZoneId"]},"DeliveryDay":{"title":"Delivery Day","type":"object","description":"This attribute holds the time configuration for which the Delivery Time is valid. Only a single attribute can be set at any given moment.","properties":{"weekday":{"description":"Enum containing names of weekdays, possible values: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`","type":"string"},"singleDate":{"type":"string","description":"Date for which the delivery time is valid, compliant with the ISO 8601 standard. Dates should be provided at 12:00:00 local time and send in ISO 8601 standard (e.g. For Europe/Warsaw timezone, the 10:00 should be sent - 2023-06-12T10:00:00.000Z)."},"datePeriod":{"type":"object","description":"Date period for which the Delivery Time is valid. Dates should be provided at 12:00:00 local time and send in ISO 8601 standard (e.g. For Europe/Warsaw timezone, the 10:00 should be sent - 2023-06-12T10:00:00.000Z).","properties":{"dateFrom":{"type":"string","description":"Date from which the delivery time is valid, compliant with the ISO 8601 standard."},"dateTo":{"type":"string","description":"Date to which the delivery time is valid, compliant with the ISO 8601 standard."}},"required":["dateFrom","dateTo"]}}},"SlotCreation":{"title":"Slot","description":"","type":"object","properties":{"id":{"type":"string","description":"Delivery Time Slot ID: Autogenerated (if not provided in request) or User-Defined"},"shippingMethod":{"description":"Selected shipping method which is available for the Delivery Time in the given Time Slot","type":"string"},"deliveryTimeRange":{"$ref":"#/components/schemas/DeliveryTimeRange"},"cutOffTime":{"$ref":"#/components/schemas/CutOffTIme"},"capacity":{"type":"integer","description":"A capacity determines how many orders the given Delivery Time Slot can handle"}},"required":["shippingMethod","deliveryTimeRange","cutOffTime","capacity"]},"DeliveryTimeRange":{"title":"Time range","description":"A `from` to `to` time range for which the object is valid","type":"object","properties":{"timeFrom":{"pattern":"^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$","type":"string","description":"Time from which the object is valid, provided in local time (e.g. 10:00)"},"timeTo":{"pattern":"^(2[0-4]|[01]?[0-9]):([0-5]?[0-9])$","type":"string","description":"Time to which the object is valid, provided in local time (e.g. 10:00)."}},"required":["timeFrom","timeTo"]},"CutOffTIme":{"title":"Cut-Off Time","description":"This denotes the latest point in time by which an action (such as an order or request) must be completed for a specific Delivery Time. This attribute is key in determining the end of a time window for certain operations and helps maintain efficiency in the delivery process.","type":"object","properties":{"time":{"type":"string","description":"The cut-off time refers to the deadline by which an order must be placed to be eligible for same-day processing and shipping. Date is compliant with the ISO 8601 standard, but only time is taking into account."},"cutOffDayShift":{"type":"integer","minimum":0,"default":0,"description":"Indicates in how many days the order has been delivered when the order has been completed before cut-off time. Property is only available for delivery times of weekday type."},"deliveryCycleName":{"type":"string","description":"An optional suffix that is added to delivery cycle name"}},"required":["time"]}}},"paths":{"/shipping/{tenant}/delivery-times":{"post":{"summary":"Creating a delivery time","tags":["Delivery Times Management"],"parameters":[{"$ref":"#/components/parameters/validateOverlapQuery"}],"operationId":"POST-shipping-create-delivery-time","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"ID of the created delivery time"}}}}}},"400":{"$ref":"#/components/responses/yaasAware_400"},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/yaasAware_403"},"409":{"$ref":"#/components/responses/resourceConflict_409"},"500":{"$ref":"#/components/responses/internalError_500"}},"description":"Creates a single delivery time. Delivery time allows to specify the cut off times for a specific zone and day of the week. \n\nThe endpoint has a validation which checks:\n  - if the `zoneId` belongs to the site\n  - if provided slots id are not duplicated\n  - if the site exists in the system\n  - if the `timeFrom` is before `timeTo`\n\nIn case of any validation problem, the below `errorCodes` can be returned:\n- **DELIVERY-TIME-400001**: Non-delivery day cannot have declared `slots` property\n- **DELIVERY-TIME-400003**: Delivery time of `weekday` type overlaps on existing one\n- **DELIVERY-TIME-400004**: Delivery time of `singleDay` type overlaps on existing one\n- **DELIVERY-TIME-400005**: Slot overlaps delivery time of another slots in given delivery time\n- **DELIVERY-TIME-400006**: Delivery time of `datePeriod` type overlaps on existing one\n- **DELIVERY-TIME-400007**: Duplicated time ranges and cutOff time different slots\n- **DELIVERY-TIME-400008**: 'ZoneId' cannot be provided when `isForAllZones` flag is active \n- **DELIVERY-TIME-400009**: Provided zone not exist in provided site\n- **DELIVERY-TIME-400010**: Provided shipping method does not belong to the given zone\n- **DELIVERY-TIME-400011**: Delivery 'timeFrom' cannot be after 'timeTo'\n- **DELIVERY-TIME-400012**: Delivery time `dateFrom` cannot be after `dateTo`\n- **DELIVERY-TIME-400013**: `isForAllZones` flag cannot be active for delivery day\n- **DELIVERY-TIME-400014**: Zone id must be provided for delivery day\n- **DELIVERY-TIME-400015**: There are duplicated slot ids in the slots array\n- **DELIVERY-TIME-400016**: Provided `timeZoneId` is incorrect\n- **DELIVERY-TIME-400017**: Timezone indicates different time shift than provided delivery time \n- **DELIVERY-TIME-400018**: Delivery `cutOffTime` cannot be after 'timeTo'\n- **DELIVERY-TIME-404001**: Provided site does not exist\n- **DELIVERY-TIME-409001**: Delivery time with given id already exists in the system\n- **DELIVERY-TIME-500001**: Internal problem with the service\n- **DELIVERY-TIME-SLOT-400001**: There are overlapping slot id in the request\n- **DELIVERY-TIME-SLOT-400005**: The slot cut off day is set when the delivery time date or period is set\n- **DELIVERY-TIME-SLOT-400006**: The slot cut off day is set when the delivery day shift is set","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BasicDeliveryTime"}}}}}}}}
```

## Creating multiple delivery times

> Creates multiple delivery times in a single request. The maximum batch size is 50.\
> \
> The endpoint has a validation which checks:\
> &#x20; \- if the \`zoneId\` belongs to the site\
> &#x20; \- if provided slots id are not duplicated\
> &#x20; \- if the site exists in the system\
> &#x20; \- if the \`timeFrom\` is before \`timeTo\`\
> \
> In case of any validation problem, the below \`errorCodes\` can be returned:\
> \- \*\*DELIVERY-TIME-400001\*\*: Non-delivery day cannot have declared \`slots\` property\
> \- \*\*DELIVERY-TIME-400003\*\*: Delivery time of \`weekday\` type overlaps on existing one\
> \- \*\*DELIVERY-TIME-400004\*\*: Delivery time of \`singleDay\` type overlaps on existing one\
> \- \*\*DELIVERY-TIME-400005\*\*: Slot overlaps delivery time of another slots in given delivery time\
> \- \*\*DELIVERY-TIME-400006\*\*: Delivery time of \`datePeriod\` type overlaps on existing one\
> \- \*\*DELIVERY-TIME-400007\*\*: Duplicated time ranges and cutOff time different slots\
> \- \*\*DELIVERY-TIME-400008\*\*: 'ZoneId' cannot be provided when \`isForAllZones\` flag is active \
> \- \*\*DELIVERY-TIME-400009\*\*: Provided zone not exist in provided site\
> \- \*\*DELIVERY-TIME-400010\*\*: Provided shipping method does not belong to the given zone\
> \- \*\*DELIVERY-TIME-400011\*\*: Delivery 'timeFrom' cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-400012\*\*: Delivery time \`dateFrom\` cannot be after \`dateTo\`\
> \- \*\*DELIVERY-TIME-400013\*\*: \`isForAllZones\` flag cannot be active for delivery day\
> \- \*\*DELIVERY-TIME-400014\*\*: Zone id must be provided for delivery day\
> \- \*\*DELIVERY-TIME-400015\*\*: There are duplicated slot ids in the slots array\
> \- \*\*DELIVERY-TIME-400016\*\*: Provided \`timeZoneId\` is incorrect\
> \- \*\*DELIVERY-TIME-400017\*\*: Timezone indicates different time shift than provided delivery time \
> \- \*\*DELIVERY-TIME-400018\*\*: Delivery \`cutOffTime\` cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-404001\*\*: Provided site does not exist\
> \- \*\*DELIVERY-TIME-409001\*\*: Delivery time with given id already exists in the system\
> \- \*\*DELIVERY-TIME-409002\*\*: Optimistic locking - provided metadata.version doesn't match\
> \- \*\*DELIVERY-TIME-500001\*\*: Internal problem with the service\
> \- \*\*DELIVERY-TIME-SLOT-400001\*\*: There are overlapping slot id in the request\
> \- \*\*DELIVERY-TIME-SLOT-400005\*\*: The slot cut off day is set when the delivery time date or period is set\
> \- \*\*DELIVERY-TIME-SLOT-400006\*\*: The slot cut off day is set when the delivery day shift is set

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Delivery Times Management","description":"Manage delivery times"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":["shipping.shipping_manage"]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"parameters":{"validateOverlapQuery":{"name":"validateOverlap","description":"The flag allows to enable or disable the validation which checks if the delivery time ranges from slots of the same shipping method overlap each other.","in":"query","required":false,"schema":{"type":"boolean","default":true}}},"responses":{"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}},"schemas":{"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]},"BasicDeliveryTime":{"title":"Delivery Time","description":"","type":"object","properties":{"id":{"type":"string","description":"Delivery Time ID: Autogenerated (if not provided in request) or User-Defined"},"name":{"type":"string","description":"Optional name for Delivery Time"},"siteCode":{"type":"string","description":"Site code for which the Delivery Time is assigned"},"isDeliveryDay":{"type":"boolean","description":"`true` indicates that the Delivery Time holds delivery date information, whereas `false` represents that the Delivery Time configuration has disabled delivery for a specific date or time period."},"zoneId":{"type":"string","description":"ID of the delivery zone for which the Delivery Time is valid"},"day":{"$ref":"#/components/schemas/DeliveryDay"},"slots":{"type":"array","description":"This attribute holds information about the established timeslots and cut-off times that are set up for a specific Delivery Time","items":{"$ref":"#/components/schemas/SlotCreation"}},"isForAllZones":{"type":"boolean","description":"Flag which indicates if the non-delivery time is defined for the same day, period or weekday for all zones of the site"},"timeZoneId":{"type":"string","description":"Id of the time zone for which the Delivery Time should be created (e.g. Europe/Warsaw)."},"deliveryDayShift":{"type":"integer","minimum":0,"default":0,"description":"Indicates in how many days the order has been delivered when the order has been completed before cut-off time."}},"required":["siteCode","isDeliveryDay","day","timeZoneId"]},"DeliveryDay":{"title":"Delivery Day","type":"object","description":"This attribute holds the time configuration for which the Delivery Time is valid. Only a single attribute can be set at any given moment.","properties":{"weekday":{"description":"Enum containing names of weekdays, possible values: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`","type":"string"},"singleDate":{"type":"string","description":"Date for which the delivery time is valid, compliant with the ISO 8601 standard. Dates should be provided at 12:00:00 local time and send in ISO 8601 standard (e.g. For Europe/Warsaw timezone, the 10:00 should be sent - 2023-06-12T10:00:00.000Z)."},"datePeriod":{"type":"object","description":"Date period for which the Delivery Time is valid. Dates should be provided at 12:00:00 local time and send in ISO 8601 standard (e.g. For Europe/Warsaw timezone, the 10:00 should be sent - 2023-06-12T10:00:00.000Z).","properties":{"dateFrom":{"type":"string","description":"Date from which the delivery time is valid, compliant with the ISO 8601 standard."},"dateTo":{"type":"string","description":"Date to which the delivery time is valid, compliant with the ISO 8601 standard."}},"required":["dateFrom","dateTo"]}}},"SlotCreation":{"title":"Slot","description":"","type":"object","properties":{"id":{"type":"string","description":"Delivery Time Slot ID: Autogenerated (if not provided in request) or User-Defined"},"shippingMethod":{"description":"Selected shipping method which is available for the Delivery Time in the given Time Slot","type":"string"},"deliveryTimeRange":{"$ref":"#/components/schemas/DeliveryTimeRange"},"cutOffTime":{"$ref":"#/components/schemas/CutOffTIme"},"capacity":{"type":"integer","description":"A capacity determines how many orders the given Delivery Time Slot can handle"}},"required":["shippingMethod","deliveryTimeRange","cutOffTime","capacity"]},"DeliveryTimeRange":{"title":"Time range","description":"A `from` to `to` time range for which the object is valid","type":"object","properties":{"timeFrom":{"pattern":"^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$","type":"string","description":"Time from which the object is valid, provided in local time (e.g. 10:00)"},"timeTo":{"pattern":"^(2[0-4]|[01]?[0-9]):([0-5]?[0-9])$","type":"string","description":"Time to which the object is valid, provided in local time (e.g. 10:00)."}},"required":["timeFrom","timeTo"]},"CutOffTIme":{"title":"Cut-Off Time","description":"This denotes the latest point in time by which an action (such as an order or request) must be completed for a specific Delivery Time. This attribute is key in determining the end of a time window for certain operations and helps maintain efficiency in the delivery process.","type":"object","properties":{"time":{"type":"string","description":"The cut-off time refers to the deadline by which an order must be placed to be eligible for same-day processing and shipping. Date is compliant with the ISO 8601 standard, but only time is taking into account."},"cutOffDayShift":{"type":"integer","minimum":0,"default":0,"description":"Indicates in how many days the order has been delivered when the order has been completed before cut-off time. Property is only available for delivery times of weekday type."},"deliveryCycleName":{"type":"string","description":"An optional suffix that is added to delivery cycle name"}},"required":["time"]}}},"paths":{"/shipping/{tenant}/delivery-times/bulk":{"post":{"summary":"Creating multiple delivery times","tags":["Delivery Times Management"],"parameters":[{"$ref":"#/components/parameters/validateOverlapQuery"}],"operationId":"POST-shipping-create-delivery-times-bulk","responses":{"207":{"description":"Multi-status with all the details","content":{"application/json":{"schema":{"type":"array","items":{"title":"bulk response","description":"Schema for API bulk response.","type":"object","properties":{"id":{"type":"string","description":"Identifier of the delivery time"},"index":{"minimum":0,"description":"Index of the creating entity","type":"integer"},"code":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"status":{"description":"original HTTP error status name","type":"string"},"errorCodes":{"type":"array","items":{"type":"string","description":"The error code which specify the problem"},"description":"Error codes in case validation problems"},"message":{"description":"descriptive error message for debugging","type":"string"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","type":"string"}}},"required":["index","code","status","message"]}}}}},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/yaasAware_403"},"500":{"$ref":"#/components/responses/internalError_500"}},"description":"Creates multiple delivery times in a single request. The maximum batch size is 50.\n\nThe endpoint has a validation which checks:\n  - if the `zoneId` belongs to the site\n  - if provided slots id are not duplicated\n  - if the site exists in the system\n  - if the `timeFrom` is before `timeTo`\n\nIn case of any validation problem, the below `errorCodes` can be returned:\n- **DELIVERY-TIME-400001**: Non-delivery day cannot have declared `slots` property\n- **DELIVERY-TIME-400003**: Delivery time of `weekday` type overlaps on existing one\n- **DELIVERY-TIME-400004**: Delivery time of `singleDay` type overlaps on existing one\n- **DELIVERY-TIME-400005**: Slot overlaps delivery time of another slots in given delivery time\n- **DELIVERY-TIME-400006**: Delivery time of `datePeriod` type overlaps on existing one\n- **DELIVERY-TIME-400007**: Duplicated time ranges and cutOff time different slots\n- **DELIVERY-TIME-400008**: 'ZoneId' cannot be provided when `isForAllZones` flag is active \n- **DELIVERY-TIME-400009**: Provided zone not exist in provided site\n- **DELIVERY-TIME-400010**: Provided shipping method does not belong to the given zone\n- **DELIVERY-TIME-400011**: Delivery 'timeFrom' cannot be after 'timeTo'\n- **DELIVERY-TIME-400012**: Delivery time `dateFrom` cannot be after `dateTo`\n- **DELIVERY-TIME-400013**: `isForAllZones` flag cannot be active for delivery day\n- **DELIVERY-TIME-400014**: Zone id must be provided for delivery day\n- **DELIVERY-TIME-400015**: There are duplicated slot ids in the slots array\n- **DELIVERY-TIME-400016**: Provided `timeZoneId` is incorrect\n- **DELIVERY-TIME-400017**: Timezone indicates different time shift than provided delivery time \n- **DELIVERY-TIME-400018**: Delivery `cutOffTime` cannot be after 'timeTo'\n- **DELIVERY-TIME-404001**: Provided site does not exist\n- **DELIVERY-TIME-409001**: Delivery time with given id already exists in the system\n- **DELIVERY-TIME-409002**: Optimistic locking - provided metadata.version doesn't match\n- **DELIVERY-TIME-500001**: Internal problem with the service\n- **DELIVERY-TIME-SLOT-400001**: There are overlapping slot id in the request\n- **DELIVERY-TIME-SLOT-400005**: The slot cut off day is set when the delivery time date or period is set\n- **DELIVERY-TIME-SLOT-400006**: The slot cut off day is set when the delivery day shift is set","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BasicDeliveryTime"}}}}}}}}}
```

## Getting a delivery time

> Retrieves a specific delivery time.\
> \
> In case of any validation problem, the below \`errorCodes\` can be returned:\
> \- \*\*DELIVERY-TIME-404002\*\*: Delivery time with given id does not exist in the system\
> \- \*\*DELIVERY-TIME-500001\*\*: Internal problem with the service

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Delivery Times Management","description":"Manage delivery times"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":["shipping.shipping_read"]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"schemas":{"DeliveryTime":{"title":"Delivery Time","description":"","type":"object","allOf":[{"$ref":"#/components/schemas/BasicDeliveryTime"},{"properties":{"metadata":{"$ref":"#/components/schemas/MetaData"}}}]},"BasicDeliveryTime":{"title":"Delivery Time","description":"","type":"object","properties":{"id":{"type":"string","description":"Delivery Time ID: Autogenerated (if not provided in request) or User-Defined"},"name":{"type":"string","description":"Optional name for Delivery Time"},"siteCode":{"type":"string","description":"Site code for which the Delivery Time is assigned"},"isDeliveryDay":{"type":"boolean","description":"`true` indicates that the Delivery Time holds delivery date information, whereas `false` represents that the Delivery Time configuration has disabled delivery for a specific date or time period."},"zoneId":{"type":"string","description":"ID of the delivery zone for which the Delivery Time is valid"},"day":{"$ref":"#/components/schemas/DeliveryDay"},"slots":{"type":"array","description":"This attribute holds information about the established timeslots and cut-off times that are set up for a specific Delivery Time","items":{"$ref":"#/components/schemas/SlotCreation"}},"isForAllZones":{"type":"boolean","description":"Flag which indicates if the non-delivery time is defined for the same day, period or weekday for all zones of the site"},"timeZoneId":{"type":"string","description":"Id of the time zone for which the Delivery Time should be created (e.g. Europe/Warsaw)."},"deliveryDayShift":{"type":"integer","minimum":0,"default":0,"description":"Indicates in how many days the order has been delivered when the order has been completed before cut-off time."}},"required":["siteCode","isDeliveryDay","day","timeZoneId"]},"DeliveryDay":{"title":"Delivery Day","type":"object","description":"This attribute holds the time configuration for which the Delivery Time is valid. Only a single attribute can be set at any given moment.","properties":{"weekday":{"description":"Enum containing names of weekdays, possible values: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`","type":"string"},"singleDate":{"type":"string","description":"Date for which the delivery time is valid, compliant with the ISO 8601 standard. Dates should be provided at 12:00:00 local time and send in ISO 8601 standard (e.g. For Europe/Warsaw timezone, the 10:00 should be sent - 2023-06-12T10:00:00.000Z)."},"datePeriod":{"type":"object","description":"Date period for which the Delivery Time is valid. Dates should be provided at 12:00:00 local time and send in ISO 8601 standard (e.g. For Europe/Warsaw timezone, the 10:00 should be sent - 2023-06-12T10:00:00.000Z).","properties":{"dateFrom":{"type":"string","description":"Date from which the delivery time is valid, compliant with the ISO 8601 standard."},"dateTo":{"type":"string","description":"Date to which the delivery time is valid, compliant with the ISO 8601 standard."}},"required":["dateFrom","dateTo"]}}},"SlotCreation":{"title":"Slot","description":"","type":"object","properties":{"id":{"type":"string","description":"Delivery Time Slot ID: Autogenerated (if not provided in request) or User-Defined"},"shippingMethod":{"description":"Selected shipping method which is available for the Delivery Time in the given Time Slot","type":"string"},"deliveryTimeRange":{"$ref":"#/components/schemas/DeliveryTimeRange"},"cutOffTime":{"$ref":"#/components/schemas/CutOffTIme"},"capacity":{"type":"integer","description":"A capacity determines how many orders the given Delivery Time Slot can handle"}},"required":["shippingMethod","deliveryTimeRange","cutOffTime","capacity"]},"DeliveryTimeRange":{"title":"Time range","description":"A `from` to `to` time range for which the object is valid","type":"object","properties":{"timeFrom":{"pattern":"^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$","type":"string","description":"Time from which the object is valid, provided in local time (e.g. 10:00)"},"timeTo":{"pattern":"^(2[0-4]|[01]?[0-9]):([0-5]?[0-9])$","type":"string","description":"Time to which the object is valid, provided in local time (e.g. 10:00)."}},"required":["timeFrom","timeTo"]},"CutOffTIme":{"title":"Cut-Off Time","description":"This denotes the latest point in time by which an action (such as an order or request) must be completed for a specific Delivery Time. This attribute is key in determining the end of a time window for certain operations and helps maintain efficiency in the delivery process.","type":"object","properties":{"time":{"type":"string","description":"The cut-off time refers to the deadline by which an order must be placed to be eligible for same-day processing and shipping. Date is compliant with the ISO 8601 standard, but only time is taking into account."},"cutOffDayShift":{"type":"integer","minimum":0,"default":0,"description":"Indicates in how many days the order has been delivered when the order has been completed before cut-off time. Property is only available for delivery times of weekday type."},"deliveryCycleName":{"type":"string","description":"An optional suffix that is added to delivery cycle name"}},"required":["time"]},"MetaData":{"type":"object","properties":{"createdAt":{"type":"string","description":"Date and time when the object was created, compliant with the ISO 8601 format.","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?$"},"modifiedAt":{"type":"string","description":"Date and time when the object was last modified, compliant with the ISO 8601 format.","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?$"},"version":{"minimum":1,"type":"integer"}}},"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]}},"responses":{"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"notFound_404":{"description":"The requested resource does not exist.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/shipping/{tenant}/delivery-times/{deliveryTimeId}":{"get":{"summary":"Getting a delivery time","tags":["Delivery Times Management"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryTime"}}}},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/yaasAware_403"},"404":{"$ref":"#/components/responses/notFound_404"},"500":{"$ref":"#/components/responses/internalError_500"}},"operationId":"GET-shipping-retrieve-delivery-time","description":"Retrieves a specific delivery time.\n\nIn case of any validation problem, the below `errorCodes` can be returned:\n- **DELIVERY-TIME-404002**: Delivery time with given id does not exist in the system\n- **DELIVERY-TIME-500001**: Internal problem with the service"}}}}
```

## Updating a delivery time

> Updates a single delivery time with a given information. Optimistic locking is validated only if the 'metadata' property is provided.\
> \
> The endpoint has a validation which checks:\
> &#x20; \- if the \`zoneId\` belongs to the site\
> &#x20; \- if provided slots id are not duplicated\
> &#x20; \- if the site exists in the system\
> &#x20; \- if the \`timeFrom\` is before \`timeTo\`\
> \
> Note: Depending on a case, a different set of fields is allowed.\
> \
> In case of any validation problem, the below \`errorCodes\` can be returned:\
> \- \*\*DELIVERY-TIME-400001\*\*: Non-delivery day cannot have declared \`slots\` property\
> \- \*\*DELIVERY-TIME-400002\*\*: Provided id from the payload must match id from the url\
> \- \*\*DELIVERY-TIME-400003\*\*: Delivery time of \`weekday\` type overlaps on existing one\
> \- \*\*DELIVERY-TIME-400004\*\*: Delivery time of \`singleDay\` type overlaps on existing one\
> \- \*\*DELIVERY-TIME-400005\*\*: Slot overlaps delivery time of another slots in given delivery time\
> \- \*\*DELIVERY-TIME-400006\*\*: Delivery time of \`datePeriod\` type overlaps on existing one\
> \- \*\*DELIVERY-TIME-400007\*\*: Duplicated time ranges and cutOff time different slots\
> \- \*\*DELIVERY-TIME-400008\*\*: 'ZoneId' cannot be provided when \`isForAllZones\` flag is active \
> \- \*\*DELIVERY-TIME-400009\*\*: Provided zone not exist in provided site\
> \- \*\*DELIVERY-TIME-400010\*\*: Provided shipping method does not belong to the given zone\
> \- \*\*DELIVERY-TIME-400011\*\*: Delivery 'timeFrom' cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-400012\*\*: Delivery time \`dateFrom\` cannot be after \`dateTo\`\
> \- \*\*DELIVERY-TIME-400013\*\*: \`isForAllZones\` flag cannot be active for delivery day\
> \- \*\*DELIVERY-TIME-400014\*\*: Zone id must be provided for delivery day\
> \- \*\*DELIVERY-TIME-400015\*\*: There are duplicated slot ids in the slots array\
> \- \*\*DELIVERY-TIME-400016\*\*: Provided \`timeZoneId\` is incorrect\
> \- \*\*DELIVERY-TIME-400017\*\*: Timezone indicates different time shift than provided delivery time \
> \- \*\*DELIVERY-TIME-400018\*\*: Delivery \`cutOffTime\` cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-404001\*\*: Provided site does not exist\
> \- \*\*DELIVERY-TIME-404002\*\*: Delivery time with given id does not exist in the system\
> \- \*\*DELIVERY-TIME-409001\*\*: Delivery time with given id already exists in the system\
> \- \*\*DELIVERY-TIME-409002\*\*: Optimistic locking - provided metadata.version does not match \
> \- \*\*DELIVERY-TIME-500001\*\*: Internal problem with the service\
> \- \*\*DELIVERY-TIME-SLOT-400001\*\*: There are overlapping slot id in the request        \
> \- \*\*DELIVERY-TIME-SLOT-400005\*\*: The slot cut off day is set when the delivery time date or period is set\
> \- \*\*DELIVERY-TIME-SLOT-400006\*\*: The slot cut off day is set when the delivery day shift is set

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Delivery Times Management","description":"Manage delivery times"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":["shipping.shipping_manage"]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"parameters":{"validateOverlapQuery":{"name":"validateOverlap","description":"The flag allows to enable or disable the validation which checks if the delivery time ranges from slots of the same shipping method overlap each other.","in":"query","required":false,"schema":{"type":"boolean","default":true}}},"responses":{"yaasAware_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"notFound_404":{"description":"The requested resource does not exist.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"resourceConflict_409":{"description":"Creation failed because there was a conflict with another resource. Details of the error are included in the response payload.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}},"schemas":{"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]},"UpdateDeliveryTime":{"title":"Delivery Time","description":"","type":"object","allOf":[{"$ref":"#/components/schemas/BasicDeliveryTime"},{"properties":{"metadata":{"type":"object","description":"metadata of the document","properties":{"version":{"type":"number","description":"version of the document"}},"required":["version"]}}}]},"BasicDeliveryTime":{"title":"Delivery Time","description":"","type":"object","properties":{"id":{"type":"string","description":"Delivery Time ID: Autogenerated (if not provided in request) or User-Defined"},"name":{"type":"string","description":"Optional name for Delivery Time"},"siteCode":{"type":"string","description":"Site code for which the Delivery Time is assigned"},"isDeliveryDay":{"type":"boolean","description":"`true` indicates that the Delivery Time holds delivery date information, whereas `false` represents that the Delivery Time configuration has disabled delivery for a specific date or time period."},"zoneId":{"type":"string","description":"ID of the delivery zone for which the Delivery Time is valid"},"day":{"$ref":"#/components/schemas/DeliveryDay"},"slots":{"type":"array","description":"This attribute holds information about the established timeslots and cut-off times that are set up for a specific Delivery Time","items":{"$ref":"#/components/schemas/SlotCreation"}},"isForAllZones":{"type":"boolean","description":"Flag which indicates if the non-delivery time is defined for the same day, period or weekday for all zones of the site"},"timeZoneId":{"type":"string","description":"Id of the time zone for which the Delivery Time should be created (e.g. Europe/Warsaw)."},"deliveryDayShift":{"type":"integer","minimum":0,"default":0,"description":"Indicates in how many days the order has been delivered when the order has been completed before cut-off time."}},"required":["siteCode","isDeliveryDay","day","timeZoneId"]},"DeliveryDay":{"title":"Delivery Day","type":"object","description":"This attribute holds the time configuration for which the Delivery Time is valid. Only a single attribute can be set at any given moment.","properties":{"weekday":{"description":"Enum containing names of weekdays, possible values: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`","type":"string"},"singleDate":{"type":"string","description":"Date for which the delivery time is valid, compliant with the ISO 8601 standard. Dates should be provided at 12:00:00 local time and send in ISO 8601 standard (e.g. For Europe/Warsaw timezone, the 10:00 should be sent - 2023-06-12T10:00:00.000Z)."},"datePeriod":{"type":"object","description":"Date period for which the Delivery Time is valid. Dates should be provided at 12:00:00 local time and send in ISO 8601 standard (e.g. For Europe/Warsaw timezone, the 10:00 should be sent - 2023-06-12T10:00:00.000Z).","properties":{"dateFrom":{"type":"string","description":"Date from which the delivery time is valid, compliant with the ISO 8601 standard."},"dateTo":{"type":"string","description":"Date to which the delivery time is valid, compliant with the ISO 8601 standard."}},"required":["dateFrom","dateTo"]}}},"SlotCreation":{"title":"Slot","description":"","type":"object","properties":{"id":{"type":"string","description":"Delivery Time Slot ID: Autogenerated (if not provided in request) or User-Defined"},"shippingMethod":{"description":"Selected shipping method which is available for the Delivery Time in the given Time Slot","type":"string"},"deliveryTimeRange":{"$ref":"#/components/schemas/DeliveryTimeRange"},"cutOffTime":{"$ref":"#/components/schemas/CutOffTIme"},"capacity":{"type":"integer","description":"A capacity determines how many orders the given Delivery Time Slot can handle"}},"required":["shippingMethod","deliveryTimeRange","cutOffTime","capacity"]},"DeliveryTimeRange":{"title":"Time range","description":"A `from` to `to` time range for which the object is valid","type":"object","properties":{"timeFrom":{"pattern":"^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$","type":"string","description":"Time from which the object is valid, provided in local time (e.g. 10:00)"},"timeTo":{"pattern":"^(2[0-4]|[01]?[0-9]):([0-5]?[0-9])$","type":"string","description":"Time to which the object is valid, provided in local time (e.g. 10:00)."}},"required":["timeFrom","timeTo"]},"CutOffTIme":{"title":"Cut-Off Time","description":"This denotes the latest point in time by which an action (such as an order or request) must be completed for a specific Delivery Time. This attribute is key in determining the end of a time window for certain operations and helps maintain efficiency in the delivery process.","type":"object","properties":{"time":{"type":"string","description":"The cut-off time refers to the deadline by which an order must be placed to be eligible for same-day processing and shipping. Date is compliant with the ISO 8601 standard, but only time is taking into account."},"cutOffDayShift":{"type":"integer","minimum":0,"default":0,"description":"Indicates in how many days the order has been delivered when the order has been completed before cut-off time. Property is only available for delivery times of weekday type."},"deliveryCycleName":{"type":"string","description":"An optional suffix that is added to delivery cycle name"}},"required":["time"]}}},"paths":{"/shipping/{tenant}/delivery-times/{deliveryTimeId}":{"put":{"summary":"Updating a delivery time","tags":["Delivery Times Management"],"operationId":"PUT-shipping-update-delivery-time","parameters":[{"$ref":"#/components/parameters/validateOverlapQuery"}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/yaasAware_400"},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/yaasAware_403"},"404":{"$ref":"#/components/responses/notFound_404"},"409":{"$ref":"#/components/responses/resourceConflict_409"},"500":{"$ref":"#/components/responses/internalError_500"}},"description":"Updates a single delivery time with a given information. Optimistic locking is validated only if the 'metadata' property is provided.\n\nThe endpoint has a validation which checks:\n  - if the `zoneId` belongs to the site\n  - if provided slots id are not duplicated\n  - if the site exists in the system\n  - if the `timeFrom` is before `timeTo`\n\nNote: Depending on a case, a different set of fields is allowed.\n\nIn case of any validation problem, the below `errorCodes` can be returned:\n- **DELIVERY-TIME-400001**: Non-delivery day cannot have declared `slots` property\n- **DELIVERY-TIME-400002**: Provided id from the payload must match id from the url\n- **DELIVERY-TIME-400003**: Delivery time of `weekday` type overlaps on existing one\n- **DELIVERY-TIME-400004**: Delivery time of `singleDay` type overlaps on existing one\n- **DELIVERY-TIME-400005**: Slot overlaps delivery time of another slots in given delivery time\n- **DELIVERY-TIME-400006**: Delivery time of `datePeriod` type overlaps on existing one\n- **DELIVERY-TIME-400007**: Duplicated time ranges and cutOff time different slots\n- **DELIVERY-TIME-400008**: 'ZoneId' cannot be provided when `isForAllZones` flag is active \n- **DELIVERY-TIME-400009**: Provided zone not exist in provided site\n- **DELIVERY-TIME-400010**: Provided shipping method does not belong to the given zone\n- **DELIVERY-TIME-400011**: Delivery 'timeFrom' cannot be after 'timeTo'\n- **DELIVERY-TIME-400012**: Delivery time `dateFrom` cannot be after `dateTo`\n- **DELIVERY-TIME-400013**: `isForAllZones` flag cannot be active for delivery day\n- **DELIVERY-TIME-400014**: Zone id must be provided for delivery day\n- **DELIVERY-TIME-400015**: There are duplicated slot ids in the slots array\n- **DELIVERY-TIME-400016**: Provided `timeZoneId` is incorrect\n- **DELIVERY-TIME-400017**: Timezone indicates different time shift than provided delivery time \n- **DELIVERY-TIME-400018**: Delivery `cutOffTime` cannot be after 'timeTo'\n- **DELIVERY-TIME-404001**: Provided site does not exist\n- **DELIVERY-TIME-404002**: Delivery time with given id does not exist in the system\n- **DELIVERY-TIME-409001**: Delivery time with given id already exists in the system\n- **DELIVERY-TIME-409002**: Optimistic locking - provided metadata.version does not match \n- **DELIVERY-TIME-500001**: Internal problem with the service\n- **DELIVERY-TIME-SLOT-400001**: There are overlapping slot id in the request        \n- **DELIVERY-TIME-SLOT-400005**: The slot cut off day is set when the delivery time date or period is set\n- **DELIVERY-TIME-SLOT-400006**: The slot cut off day is set when the delivery day shift is set","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDeliveryTime"}}}}}}}}
```

## Deleting a delivery time

> Deletes a specific delivery time with all slots that it had created.\
> \
> In case of any validation problem, the below \`errorCodes\` can be returned:\
> \- \*\*DELIVERY-TIME-404001\*\*: Provided site does not exist\
> \- \*\*DELIVERY-TIME-404002\*\*: Delivery time with given id does not exist in the system\
> \- \*\*DELIVERY-TIME-500001\*\*: Internal problem with the service

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Delivery Times Management","description":"Manage delivery times"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":["shipping.shipping_manage"]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"responses":{"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}},"schemas":{"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]}}},"paths":{"/shipping/{tenant}/delivery-times/{deliveryTimeId}":{"delete":{"summary":"Deleting a delivery time","tags":["Delivery Times Management"],"operationId":"DELETE-shipping-remove-delivery-time","responses":{"204":{"description":"No Content"},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/yaasAware_403"},"500":{"$ref":"#/components/responses/internalError_500"}},"description":"Deletes a specific delivery time with all slots that it had created.\n\nIn case of any validation problem, the below `errorCodes` can be returned:\n- **DELIVERY-TIME-404001**: Provided site does not exist\n- **DELIVERY-TIME-404002**: Delivery time with given id does not exist in the system\n- **DELIVERY-TIME-500001**: Internal problem with the service"}}}}
```

## Partial updating of a delivery time

> Partially updates a single delivery time with a given information.  \
> \### Note:\
> Depending on a case, a different set of fields is allowed.\
> \
> The endpoint has a validation which checks:\
> &#x20; \- if the \`zoneId\` belongs to the site\
> &#x20; \- if provided slots id are not duplicated\
> &#x20; \- if the site exists in the system\
> &#x20; \- if the \`timeFrom\` is before \`timeTo\`\
> \
> The patch request consists of set of operation, that should be defined according to RFC-6902 standard\
> \
> In case of any validation problem, the below \`errorCodes\` can be returned:\
> \- \*\*DELIVERY-TIME-400001\*\*: Non-delivery day cannot have declared \`slots\` property\
> \- \*\*DELIVERY-TIME-400002\*\*: Provided id from the payload must match id from the url\
> \- \*\*DELIVERY-TIME-400003\*\*: Delivery time of \`weekday\` type overlaps on existing one\
> \- \*\*DELIVERY-TIME-400004\*\*: Delivery time of \`singleDay\` type overlaps on existing one\
> \- \*\*DELIVERY-TIME-400005\*\*: Slot overlaps delivery time of another slots in given delivery time\
> \- \*\*DELIVERY-TIME-400006\*\*: Delivery time of \`datePeriod\` type overlaps on existing one\
> \- \*\*DELIVERY-TIME-400007\*\*: Duplicated time ranges and cutOff time different slots\
> \- \*\*DELIVERY-TIME-400008\*\*: 'ZoneId' cannot be provided when \`isForAllZones\` flag is active \
> \- \*\*DELIVERY-TIME-400009\*\*: Provided zone not exist in provided site\
> \- \*\*DELIVERY-TIME-400010\*\*: Provided shipping method does not belong to the given zone\
> \- \*\*DELIVERY-TIME-400011\*\*: Delivery 'timeFrom' cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-400012\*\*: Delivery time \`dateFrom\` cannot be after \`dateTo\`\
> \- \*\*DELIVERY-TIME-400013\*\*: \`isForAllZones\` flag cannot be active for delivery day\
> \- \*\*DELIVERY-TIME-400014\*\*: Zone id must be provided for delivery day\
> \- \*\*DELIVERY-TIME-400015\*\*: There are duplicated slot ids in the slots array\
> \- \*\*DELIVERY-TIME-400016\*\*: Provided \`timeZoneId\` is incorrect\
> \- \*\*DELIVERY-TIME-400017\*\*: Timezone indicates different time shift than provided delivery time \
> \- \*\*DELIVERY-TIME-400018\*\*: Delivery \`cutOffTime\` cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-404001\*\*: Provided site does not exist\
> \- \*\*DELIVERY-TIME-404002\*\*: Delivery time with given id does not exist in the system\
> \- \*\*DELIVERY-TIME-409001\*\*: Delivery time with given id already exists in the system\
> \- \*\*DELIVERY-TIME-500001\*\*: Internal problem with the service\
> \- \*\*DELIVERY-TIME-SLOT-400001\*\*: There are overlapping slot id in the request\
> \- \*\*DELIVERY-TIME-SLOT-400005\*\*: The slot cut off day is set when the delivery time date or period is set\
> \- \*\*DELIVERY-TIME-SLOT-400006\*\*: The slot cut off day is set when the delivery day shift is set       &#x20;

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Delivery Times Management","description":"Manage delivery times"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":["shipping.shipping_manage"]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"parameters":{"validateOverlapQuery":{"name":"validateOverlap","description":"The flag allows to enable or disable the validation which checks if the delivery time ranges from slots of the same shipping method overlap each other.","in":"query","required":false,"schema":{"type":"boolean","default":true}}},"responses":{"yaasAware_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"notFound_404":{"description":"The requested resource does not exist.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}},"schemas":{"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]},"Patch":{"type":"array","items":{"type":"object","properties":{"op":{"type":"string","description":"Indicates an operation which should be done. Available operations: `add`, `remove` and `replace`"},"path":{"type":"string","description":"Indicates a path for which the value should be applied. For example: `/shippingMethod`, `/cutOffTime/day`"},"value":{"description":"Indicates a value that should be changed or added. The value can be of a primitive type, like string, number, boolean or it can be an object or an array.","oneOf":[{"type":"string"},{"type":"object"}]}}}}}},"paths":{"/shipping/{tenant}/delivery-times/{deliveryTimeId}":{"patch":{"summary":"Partial updating of a delivery time","tags":["Delivery Times Management"],"operationId":"PATCH-shipping-update-delivery-time","parameters":[{"$ref":"#/components/parameters/validateOverlapQuery"}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/yaasAware_400"},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/yaasAware_403"},"404":{"$ref":"#/components/responses/notFound_404"},"500":{"$ref":"#/components/responses/internalError_500"}},"description":"Partially updates a single delivery time with a given information.  \n### Note:\nDepending on a case, a different set of fields is allowed.\n\nThe endpoint has a validation which checks:\n  - if the `zoneId` belongs to the site\n  - if provided slots id are not duplicated\n  - if the site exists in the system\n  - if the `timeFrom` is before `timeTo`\n\nThe patch request consists of set of operation, that should be defined according to RFC-6902 standard\n\nIn case of any validation problem, the below `errorCodes` can be returned:\n- **DELIVERY-TIME-400001**: Non-delivery day cannot have declared `slots` property\n- **DELIVERY-TIME-400002**: Provided id from the payload must match id from the url\n- **DELIVERY-TIME-400003**: Delivery time of `weekday` type overlaps on existing one\n- **DELIVERY-TIME-400004**: Delivery time of `singleDay` type overlaps on existing one\n- **DELIVERY-TIME-400005**: Slot overlaps delivery time of another slots in given delivery time\n- **DELIVERY-TIME-400006**: Delivery time of `datePeriod` type overlaps on existing one\n- **DELIVERY-TIME-400007**: Duplicated time ranges and cutOff time different slots\n- **DELIVERY-TIME-400008**: 'ZoneId' cannot be provided when `isForAllZones` flag is active \n- **DELIVERY-TIME-400009**: Provided zone not exist in provided site\n- **DELIVERY-TIME-400010**: Provided shipping method does not belong to the given zone\n- **DELIVERY-TIME-400011**: Delivery 'timeFrom' cannot be after 'timeTo'\n- **DELIVERY-TIME-400012**: Delivery time `dateFrom` cannot be after `dateTo`\n- **DELIVERY-TIME-400013**: `isForAllZones` flag cannot be active for delivery day\n- **DELIVERY-TIME-400014**: Zone id must be provided for delivery day\n- **DELIVERY-TIME-400015**: There are duplicated slot ids in the slots array\n- **DELIVERY-TIME-400016**: Provided `timeZoneId` is incorrect\n- **DELIVERY-TIME-400017**: Timezone indicates different time shift than provided delivery time \n- **DELIVERY-TIME-400018**: Delivery `cutOffTime` cannot be after 'timeTo'\n- **DELIVERY-TIME-404001**: Provided site does not exist\n- **DELIVERY-TIME-404002**: Delivery time with given id does not exist in the system\n- **DELIVERY-TIME-409001**: Delivery time with given id already exists in the system\n- **DELIVERY-TIME-500001**: Internal problem with the service\n- **DELIVERY-TIME-SLOT-400001**: There are overlapping slot id in the request\n- **DELIVERY-TIME-SLOT-400005**: The slot cut off day is set when the delivery time date or period is set\n- **DELIVERY-TIME-SLOT-400006**: The slot cut off day is set when the delivery day shift is set        ","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Patch"}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references/api-guides/delivery-and-shipping/shipping-1/api-reference/delivery-times-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
