Shopify
Authentication Type: API Key
Description: Access Shopify store data including customers, orders, and products.
Customer Management
Find and manage customer information and orders.
Get Customer Orders by Email
Find a customer by their email address and retrieve all their orders with details including line items, pricing, and fulfillment status.
Operation Type: Query (Read)
Parameters:
- customerEmail
string
(required): Email address of the customer to find orders for
Returns:
- customer
object
: Customer information- id
string
: Shopify customer ID - email
string
: Customer email address - firstName
string
(nullable): Customer first name - lastName
string
(nullable): Customer last name - totalSpent
string
(nullable): Total amount spent by customer - currency
string
(nullable): Currency code for amounts - ordersCount
number
: Total number of orders
- id
- orders
array of objects
: Customer orders- id
string
: Order ID - name
string
: Order name/number - email
string
(nullable): Order email - createdAt
string
: Order creation date - updatedAt
string
: Order last update date - totalPrice
string
: Total order price - subtotalPrice
string
: Subtotal price - currency
string
: Order currency - financialStatus
string
: Payment status - fulfillmentStatus
string
(nullable): Fulfillment status - lineItems
array of objects
: Items in the order- id
string
: Line item ID - title
string
: Product title - quantity
number
: Quantity ordered - price
string
: Item price - variant
object
(nullable): Product variant info- id
string
: Variant ID - title
string
: Variant title
- id
- id
- id
Example Usage:
{
"customerEmail": "john.smith@example.com"
}
Refund Management
Calculate and process refunds for orders and line items.
Calculate Refund
Calculate the refund amount and transactions for specific line items. Use this before creating an actual refund to get accurate amounts and transaction data.
Operation Type: Mutation (Write)
Parameters:
- orderId
string
(required): Shopify order ID to calculate refund for - lineItemIds
array of strings
(required): Array of line item IDs to refund - quantities
array of numbers
(required): Array of quantities to refund for each line item (same order as lineItemIds) - refundShipping
boolean
(nullable): Whether to refund shipping costs - reason
string
(nullable): Reason for the refund
Returns:
- orderId
string
: Order ID - refundAmount
string
: Total refund amount - currency
string
: Currency code - transactions
array of objects
: Suggested refund transactions- parentId
string
: Parent transaction ID - amount
string
: Transaction amount - gateway
string
: Payment gateway - maxRefundable
string
: Maximum refundable amount
- parentId
- refundLineItems
array of objects
: Line items being refunded- lineItemId
string
: Line item ID - quantity
number
: Quantity to refund - price
string
: Item price - subtotal
string
: Subtotal for this item
- lineItemId
- shipping
object
: Shipping refund details- amount
string
: Shipping refund amount - maxRefundable
string
: Maximum refundable shipping
- amount
Example Usage:
{
"orderId": "1234567890",
"lineItemIds": ["11111111", "22222222"],
"quantities": [1, 2],
"refundShipping": true,
"reason": "Customer requested return due to sizing issue"
}
Create Refund
Process an actual refund for an order. Requires transaction data from calculateRefund. This will charge back the customer and update order status.
Operation Type: Mutation (Write)
Parameters:
- orderId
string
(required): Shopify order ID to create refund for - lineItemIds
array of strings
(required): Array of line item IDs to refund - quantities
array of numbers
(required): Array of quantities to refund for each line item (same order as lineItemIds) - refundShipping
boolean
(nullable): Whether to refund shipping costs - reason
string
(nullable): Reason for the refund - notify
boolean
(nullable): Whether to notify the customer via email - transactionData
string
(nullable): JSON string of transaction data from calculateRefund (required for processing)
Returns:
- refundId
string
: Created refund ID - orderId
string
: Order ID - refundAmount
string
: Total refund amount - currency
string
: Currency code - status
string
: Refund status - createdAt
string
: Refund creation timestamp - reason
string
(nullable): Refund reason - transactions
array of objects
: Refund transactions- id
string
: Transaction ID - amount
string
: Transaction amount - kind
string
: Transaction kind - gateway
string
: Payment gateway - status
string
: Transaction status
- id
Example Usage:
{
"orderId": "1234567890",
"lineItemIds": ["11111111", "22222222"],
"quantities": [1, 2],
"refundShipping": true,
"reason": "Customer requested return due to sizing issue",
"notify": true,
"transactionData": "{\"transactions\":[{\"parentId\":\"12345\",\"amount\":\"25.99\",\"gateway\":\"shopify_payments\"}]}"
}
Fulfillment Management
Get detailed fulfillment and shipping information for orders.
Get Order Fulfillments
Get detailed fulfillment information for an order including tracking numbers, shipping carrier, fulfillment status, and which line items were included in each shipment.
Operation Type: Query (Read)
Parameters:
- orderId
string
(required): Shopify order ID to get fulfillments for
Returns:
- orderId
string
: Order ID - fulfillments
array of objects
: Fulfillments for the order- id
string
: Fulfillment ID - status
string
: Fulfillment status (fulfilled, partial, cancelled) - trackingNumber
string
(nullable): Tracking number if available - trackingUrls
array of strings
: Tracking URLs for this fulfillment - trackingCompany
string
(nullable): Shipping carrier/company - createdAt
string
: Fulfillment creation date - updatedAt
string
: Fulfillment last update date - shipmentStatus
string
(nullable): Shipment status if available - lineItems
array of objects
: Items included in this fulfillment- id
string
: Line item ID - title
string
: Product title - quantity
number
: Quantity fulfilled - variantId
string
(nullable): Product variant ID - variantTitle
string
(nullable): Product variant title
- id
- location
object
(nullable): Fulfillment location- id
string
: Location ID - name
string
: Location name
- id
- id
Example Usage:
{
"orderId": "1234567890"
}
Common Use Cases
Customer Service and Support:
- Look up customer order history by email address for support inquiries
- Track fulfillment status and shipping information for customer inquiries
- Process partial or full refunds for customer complaints and returns
Order Management:
- Calculate refund amounts before processing to ensure accurate financial transactions
- Track which items have been fulfilled and shipped to customers
- Monitor order fulfillment across different warehouse locations
Financial Operations:
- Process refunds with detailed transaction tracking and payment gateway integration
- Calculate shipping refunds and maximum refundable amounts for accurate accounting
- Track refund status and transaction history for financial reporting
Inventory and Logistics:
- Monitor fulfillment status across multiple shipments for complex orders
- Track carrier information and delivery status for logistics management
- Analyze fulfillment patterns and shipping performance across different locations