nexlogiq Shopify icon

nexlogiq Shopify

Consume Shopify API (SaaS Edition)

Draft Order → Create (Get Invoice URL)

AI-generated

Summary

Creates a draft order and returns its invoice URL.

Inputs

  • shopUrl (required) — The URL of the Shopify store.
  • accessToken (required) — The Admin API Access Token.
  • line_items (required) — Products to add to the draft order. Each item requires a title (string), price (string, default '0.00'), quantity (number, default 1), and optionally a variant_id (number).
  • customerId — The ID of an existing customer to associate with the draft order.
  • email — Customer email to associate with the draft order.
  • note — A note for the draft order.

Output shape

A single record containing the draft order data, including the invoice URL.

The returned data includes the draft order object and its invoice URL (typically found at invoice_url or similar).

Examples

Example 1: Create a draft order for a custom item.

Shop URL: 'myshop.myshopify.com', Access Token: 'shpat_xxxxx', Line Items: [{ title: 'Custom Service', price: '50.00', quantity: 2 }], Note: 'Urgent quote'.

Example 2: Create a draft order for a product variant.

Shop URL: 'store.myshopify.com', Access Token: 'shpat_xxxxx', Line Items: [{ title: 'Blue T-Shirt', price: '20.00', quantity: 1, variant_id: 123456789 }], Email: 'customer@example.com'.

Links

Discussion