openapi: 3.1.0 info: title: Commerce Layer addresses delivery_lead_times API version: 7.10.1 contact: name: API Support url: https://commercelayer.io email: support@commercelayer.io description: Headless Commerce for Global Brands. servers: - url: https://{your_organization_slug}.commercelayer.io/api description: API - url: https://core.commercelayer.io/users/sign_in description: Sign in - url: https://docs.commercelayer.io/api description: API reference security: - bearerAuth: [] tags: - name: delivery_lead_times description: resource type paths: /delivery_lead_times: get: operationId: GET/delivery_lead_times summary: List all delivery lead times description: List all delivery lead times tags: - delivery_lead_times responses: '200': description: A list of delivery lead time objects content: application/vnd.api+json: schema: $ref: '#/components/schemas/deliveryLeadTimeResponseList' post: operationId: POST/delivery_lead_times summary: Create a delivery lead time description: Create a delivery lead time tags: - delivery_lead_times requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/deliveryLeadTimeCreate' responses: '201': description: The created delivery lead time object content: application/vnd.api+json: schema: $ref: '#/components/schemas/deliveryLeadTimeResponse' /delivery_lead_times/{deliveryLeadTimeId}: get: operationId: GET/delivery_lead_times/deliveryLeadTimeId summary: Retrieve a delivery lead time description: Retrieve a delivery lead time tags: - delivery_lead_times parameters: - name: deliveryLeadTimeId in: path schema: type: string required: true description: The resource's id responses: '200': description: The delivery lead time object content: application/vnd.api+json: schema: $ref: '#/components/schemas/deliveryLeadTimeResponse' patch: operationId: PATCH/delivery_lead_times/deliveryLeadTimeId summary: Update a delivery lead time description: Update a delivery lead time tags: - delivery_lead_times parameters: - name: deliveryLeadTimeId in: path schema: type: string required: true description: The resource's id requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/deliveryLeadTimeUpdate' responses: '200': description: The updated delivery lead time object content: application/vnd.api+json: schema: $ref: '#/components/schemas/deliveryLeadTimeResponse' delete: operationId: DELETE/delivery_lead_times/deliveryLeadTimeId summary: Delete a delivery lead time description: Delete a delivery lead time tags: - delivery_lead_times parameters: - name: deliveryLeadTimeId in: path schema: type: string required: true description: The resource's id responses: '204': description: No content /shipments/{shipmentId}/delivery_lead_time: get: operationId: GET/shipmentId/delivery_lead_time summary: Retrieve the delivery lead time associated to the shipment description: Retrieve the delivery lead time associated to the shipment tags: - delivery_lead_times parameters: - name: shipmentId in: path schema: type: string required: true description: The resource's id responses: '200': description: The delivery_lead_time associated to the shipment /shipping_methods/{shippingMethodId}/delivery_lead_time_for_shipment: get: operationId: GET/shippingMethodId/delivery_lead_time_for_shipment summary: Retrieve the delivery lead time for shipment associated to the shipping method description: Retrieve the delivery lead time for shipment associated to the shipping method tags: - delivery_lead_times parameters: - name: shippingMethodId in: path schema: type: string required: true description: The resource's id responses: '200': description: The delivery_lead_time_for_shipment associated to the shipping method /skus/{skuId}/delivery_lead_times: get: operationId: GET/skuId/delivery_lead_times summary: Retrieve the delivery lead times associated to the SKU description: Retrieve the delivery lead times associated to the SKU tags: - delivery_lead_times parameters: - name: skuId in: path schema: type: string required: true description: The resource's id responses: '200': description: The delivery_lead_times associated to the SKU components: schemas: deliveryLeadTime: properties: data: properties: attributes: type: object properties: min_hours: type: integer description: The delivery lead minimum time (in hours) when shipping from the associated stock location with the associated shipping method. example: 48 nullable: false max_hours: type: integer description: The delivery lead maximun time (in hours) when shipping from the associated stock location with the associated shipping method. example: 72 nullable: false min_days: type: integer description: The delivery lead minimum time, in days (rounded). example: 2 nullable: true max_days: type: integer description: The delivery lead maximun time, in days (rounded). example: 3 nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true deliveryLeadTimeUpdate: required: - data type: object properties: data: type: object required: - type - id - attributes properties: type: type: string description: The resource's type enum: - delivery_lead_times id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attributes: type: object properties: min_hours: type: integer description: The delivery lead minimum time (in hours) when shipping from the associated stock location with the associated shipping method. example: 48 nullable: false max_hours: type: integer description: The delivery lead maximun time (in hours) when shipping from the associated stock location with the associated shipping method. example: 72 nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: stock_location: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - stock_locations id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN shipping_method: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - shipping_methods id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN deliveryLeadTimeResponse: type: object properties: data: type: object properties: id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN type: type: string description: The resource's type enum: - delivery_lead_times links: type: object properties: self: type: string description: URL attributes: $ref: '#/components/schemas/deliveryLeadTime/properties/data/properties/attributes' relationships: type: object properties: stock_location: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - stock_location id: type: string description: The resource ID shipping_method: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - shipping_method id: type: string description: The resource ID attachments: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - attachments id: type: string description: The resource ID event_stores: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: The resource ID deliveryLeadTimeCreate: required: - data type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - delivery_lead_times attributes: type: object properties: min_hours: type: integer description: The delivery lead minimum time (in hours) when shipping from the associated stock location with the associated shipping method. example: 48 max_hours: type: integer description: The delivery lead maximun time (in hours) when shipping from the associated stock location with the associated shipping method. example: 72 reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar required: - min_hours - max_hours relationships: type: object properties: stock_location: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - stock_locations id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN shipping_method: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - shipping_methods id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN required: - stock_location - shipping_method deliveryLeadTimeResponseList: type: object properties: data: type: array items: $ref: '#/components/schemas/deliveryLeadTimeResponse/properties/data' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT