post: operationId: PostDraftOrdersDraftOrderLineItems summary: Create a Line Item description: Creates a Line Item for the Draft Order x-authenticated: true parameters: - in: path name: id required: true description: The ID of the Draft Order. schema: type: string requestBody: content: application/json: schema: required: - quantity properties: variant_id: description: The ID of the Product Variant to generate the Line Item from. type: string unit_price: description: The potential custom price of the item. type: integer title: description: The potential custom title of the item. type: string default: Custom item quantity: description: The quantity of the Line Item. type: integer metadata: description: >- The optional key-value map with additional details about the Line Item. type: object x-codeSamples: - lang: JavaScript label: JS Client source: $ref: ../code_samples/JavaScript/draft-orders_{id}_line-items/postundefined - lang: Shell label: cURL source: $ref: ../code_samples/Shell/draft-orders_{id}_line-items/postundefined security: - api_token: [] - cookie_auth: [] tags: - Draft Order responses: '200': description: OK content: application/json: schema: properties: draft_order: $ref: ../components/schemas/draft-order.yaml '400': $ref: ../components/responses/400_error.yaml '401': $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': $ref: ../components/responses/invalid_state_error.yaml '422': $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml