# Delivery Cycles

Generate delivery cycles

## Generating a delivery cycle

> Generates a delivery cycle.

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Delivery Cycles","description":"Generate delivery cycles"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":[]}],"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"]},"DeliveryCycle":{"title":"Delivery Cycle","type":"object","description":"Object which encapsulates all the fields needed to generate delivery cycle.","properties":{"deliveryTimeId":{"type":"string","description":"A unique identifier for the overall delivery time period or range."},"slotId":{"type":"string","description":"A unique identifier that represents a specific delivery slot within the delivery time."},"deliveryDate":{"type":"string","description":"The selected delivery date."}},"required":["deliveryTimeId","slotId","deliveryDate"]}}},"paths":{"/shipping/{tenant}/delivery-cycles/generate":{"post":{"summary":"Generating a delivery cycle","tags":["Delivery Cycles"],"responses":{"201":{"description":"CREATED","content":{"application/json":{"schema":{"type":"string"}}}},"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":"POST-shipping-generate-delivery-cycle","description":"Generates a delivery cycle.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryCycle"}}}}}}}}
```


---

# 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-cycles.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.
