# Delivery Times Slots Management

Manage delivery time slots

## Getting all the delivery time slots

> Retrieves all the slots for a given 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\
> \- \*\*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 Slots Management","description":"Manage delivery time slots"}],"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":{"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"]},"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}/slots":{"get":{"summary":"Getting all the delivery time slots","tags":["Delivery Times Slots Management"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SlotCreation"}}}}},"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-slots","description":"Retrieves all the slots for a given 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\n- **DELIVERY-TIME-500001**: Internal problem with the service"}}}}
```

## Creating a delivery time slot

> Creates a new time slot for the given delivery time.\
> \
> In case of any validation problem, the below \`errorCodes\` can be returned:\
> \- \*\*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-400010\*\*: Provided shipping method does not belong to the given zone\
> \- \*\*DELIVERY-TIME-400011\*\*: Delivery 'timeFrom' cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-400015\*\*: There are duplicated slot ids in the slots array\
> \- \*\*DELIVERY-TIME-400018\*\*: Delivery \`cutOffTime\` cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-404001\*\*: Delivery time with given id does not exist\
> \- \*\*DELIVERY-TIME-500001\*\*: Internal problem with the service\
> \- \*\*DELIVERY-TIME-SLOT-400001\*\*: There are overlapping slot id in the request\
> \- \*\*DELIVERY-TIME-SLOT-400002\*\*: The slot id from the payload must match the id from the url\
> \- \*\*DELIVERY-TIME-SLOT-400003\*\*: Slot with provided id already exists in the given delivery time\
> \- \*\*DELIVERY-TIME-SLOT-400004\*\*: Duplicated time ranges and cutOff time in the existing slots\
> \- \*\*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 Slots Management","description":"Manage delivery time slots"}],"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"]},"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}/slots":{"post":{"summary":"Creating a delivery time slot","tags":["Delivery Times Slots Management"],"parameters":[{"$ref":"#/components/parameters/validateOverlapQuery"}],"operationId":"POST-shipping-create-delivery-time-slot","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}}}}}},"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 new time slot for the given delivery time.\n\nIn case of any validation problem, the below `errorCodes` can be returned:\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-400010**: Provided shipping method does not belong to the given zone\n- **DELIVERY-TIME-400011**: Delivery 'timeFrom' cannot be after 'timeTo'\n- **DELIVERY-TIME-400015**: There are duplicated slot ids in the slots array\n- **DELIVERY-TIME-400018**: Delivery `cutOffTime` cannot be after 'timeTo'\n- **DELIVERY-TIME-404001**: Delivery time with given id does not exist\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-400002**: The slot id from the payload must match the id from the url\n- **DELIVERY-TIME-SLOT-400003**: Slot with provided id already exists in the given delivery time\n- **DELIVERY-TIME-SLOT-400004**: Duplicated time ranges and cutOff time in the existing slots\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/SlotCreation"}}}}}}}}
```

## Deleting all the delivery time slots

> Deletes all the time slots for the given 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\
> \- \*\*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 Slots Management","description":"Manage delivery time slots"}],"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"}}}},"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"]}}},"paths":{"/shipping/{tenant}/delivery-times/{deliveryTimeId}/slots":{"delete":{"summary":"Deleting all the delivery time slots","tags":["Delivery Times Slots Management"],"operationId":"DELETE-shipping-remove-all-delivery-times-slots","responses":{"204":{"description":"No Content"},"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":"Deletes all the time slots for the given 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\n- **DELIVERY-TIME-500001**: Internal problem with the service"}}}}
```

## Getting a delivery time slot

> Retrieves the given delivery time slot's details.\
> \
> In case of any validation problem, the below \`errorCodes\` can be returned:\
> \- \*\*DELIVERY-TIME-500001\*\*: Internal problem with the service\
> \- \*\*DELIVERY-TIME-404002\*\*: Delivery time with given id doesn't exists in the system\
> \- \*\*DELIVERY-TIME-SLOT-404001\*\*: Slot with provided id doesn't exists in the given delivery time

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Delivery Times Slots Management","description":"Manage delivery time slots"}],"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":{"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"]},"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}/slots/{slotId}":{"get":{"summary":"Getting a delivery time slot","tags":["Delivery Times Slots Management"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotCreation"}}}},"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-tenant-delivery-times-deliveryTimeId-slots-slotId","description":"Retrieves the given delivery time slot's details.\n\nIn case of any validation problem, the below `errorCodes` can be returned:\n- **DELIVERY-TIME-500001**: Internal problem with the service\n- **DELIVERY-TIME-404002**: Delivery time with given id doesn't exists in the system\n- **DELIVERY-TIME-SLOT-404001**: Slot with provided id doesn't exists in the given delivery time"}}}}
```

## Updating a delivery time slot

> Updates a single delivery time slot with given information.  \
> \### 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-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-400010\*\*: Provided shipping method does not belong to the given zone\
> \- \*\*DELIVERY-TIME-400011\*\*: Delivery 'timeFrom' cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-400015\*\*: There are duplicated slot ids in the slots array\
> \- \*\*DELIVERY-TIME-400018\*\*: Delivery \`cutOffTime\` cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-404002\*\*: Delivery time with given id does not exist\
> \- \*\*DELIVERY-TIME-500001\*\*: Internal problem with the service\
> \- \*\*DELIVERY-TIME-SLOT-400001\*\*: There are overlapping slot id in the request\
> \- \*\*DELIVERY-TIME-SLOT-400002\*\*: The slot id from the payload must match the id from the url\
> \- \*\*DELIVERY-TIME-SLOT-400003\*\*: Slot with provided id already exists in the given delivery time\
> \- \*\*DELIVERY-TIME-SLOT-400004\*\*: Duplicated time ranges and cutOff time in the existing slots\
> \- \*\*DELIVERY-TIME-SLOT-404001\*\*: Slot with provided id doesn't exists in the given delivery time\
> \- \*\*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 Slots Management","description":"Manage delivery time slots"}],"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"]},"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}/slots/{slotId}":{"put":{"summary":"Updating a delivery time slot","tags":["Delivery Times Slots Management"],"parameters":[{"$ref":"#/components/parameters/validateOverlapQuery"}],"operationId":"PUT-shipping-update-delivery-time-slot","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 slot with given information.  \n### Note:\nDepending 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-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-400010**: Provided shipping method does not belong to the given zone\n- **DELIVERY-TIME-400011**: Delivery 'timeFrom' cannot be after 'timeTo'\n- **DELIVERY-TIME-400015**: There are duplicated slot ids in the slots array\n- **DELIVERY-TIME-400018**: Delivery `cutOffTime` cannot be after 'timeTo'\n- **DELIVERY-TIME-404002**: Delivery time with given id does not exist\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-400002**: The slot id from the payload must match the id from the url\n- **DELIVERY-TIME-SLOT-400003**: Slot with provided id already exists in the given delivery time\n- **DELIVERY-TIME-SLOT-400004**: Duplicated time ranges and cutOff time in the existing slots\n- **DELIVERY-TIME-SLOT-404001**: Slot with provided id doesn't exists in the given delivery time\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/SlotCreation"}}}}}}}}
```

## Deleting a delivery time slot

> Deletes a single delivery time slot.\
> \
> In case of any validation problem, the below \`errorCodes\` can be returned:\
> \- \*\*DELIVERY-TIME-404002\*\*: Delivery time with given id does not exist\
> \- \*\*DELIVERY-TIME-500001\*\*: Internal problem with the service\
> \- \*\*DELIVERY-TIME-SLOT-404001\*\*: Slot with provided id doesn't exists in the given delivery time

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Delivery Times Slots Management","description":"Manage delivery time slots"}],"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"}}}},"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"]}}},"paths":{"/shipping/{tenant}/delivery-times/{deliveryTimeId}/slots/{slotId}":{"delete":{"summary":"Deleting a delivery time slot","tags":["Delivery Times Slots Management"],"operationId":"DELETE-shipping-remove-delivery-times-slot","responses":{"204":{"description":"No Content"},"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":"Deletes a single delivery time slot.\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\n- **DELIVERY-TIME-500001**: Internal problem with the service\n- **DELIVERY-TIME-SLOT-404001**: Slot with provided id doesn't exists in the given delivery time"}}}}
```

## Partial updating of a delivery time slot

> Partially updates a single delivery time slot with given information.  \
> Note: Depending on a case, a different set of fields is allowed.\
> \
> The patch request consists of a set of operations, that should be defined according to RFC-6902 standard\
> \
> In case of any validation problem, the below \`errorCodes\` can be returned:\
> \- \*\*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-400010\*\*: Provided shipping method does not belong to the given zone\
> \- \*\*DELIVERY-TIME-400011\*\*: Delivery 'timeFrom' cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-400015\*\*: There are duplicated slot ids in the slots array\
> \- \*\*DELIVERY-TIME-400018\*\*: Delivery \`cutOffTime\` cannot be after 'timeTo'\
> \- \*\*DELIVERY-TIME-404002\*\*: Delivery time with given id does not exist\
> \- \*\*DELIVERY-TIME-500001\*\*: Internal problem with the service\
> \- \*\*DELIVERY-TIME-SLOT-400001\*\*: There are overlapping slot id in the request\
> \- \*\*DELIVERY-TIME-SLOT-400002\*\*: The slot id from the payload must match the id from the url\
> \- \*\*DELIVERY-TIME-SLOT-400003\*\*: Slot with provided id already exists in the given delivery time\
> \- \*\*DELIVERY-TIME-SLOT-400004\*\*: Duplicated time ranges and cutOff time in the existing slots\
> \- \*\*DELIVERY-TIME-SLOT-404001\*\*: Slot with provided id doesn't exists in the given delivery time\
> \- \*\*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 Slots Management","description":"Manage delivery time slots"}],"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}/slots/{slotId}":{"patch":{"summary":"Partial updating of a delivery time slot","tags":["Delivery Times Slots Management"],"parameters":[{"$ref":"#/components/parameters/validateOverlapQuery"}],"operationId":"PATCH-shipping-update-delivery-time-slot","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 slot with given information.  \nNote: Depending on a case, a different set of fields is allowed.\n\nThe patch request consists of a set of operations, 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-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-400010**: Provided shipping method does not belong to the given zone\n- **DELIVERY-TIME-400011**: Delivery 'timeFrom' cannot be after 'timeTo'\n- **DELIVERY-TIME-400015**: There are duplicated slot ids in the slots array\n- **DELIVERY-TIME-400018**: Delivery `cutOffTime` cannot be after 'timeTo'\n- **DELIVERY-TIME-404002**: Delivery time with given id does not exist\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-400002**: The slot id from the payload must match the id from the url\n- **DELIVERY-TIME-SLOT-400003**: Slot with provided id already exists in the given delivery time\n- **DELIVERY-TIME-SLOT-400004**: Duplicated time ranges and cutOff time in the existing slots\n- **DELIVERY-TIME-SLOT-404001**: Slot with provided id doesn't exists in the given delivery time\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-1/readme/api-reference-35/delivery-times-slots-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.
