Loading...
Loading...
Expert guidance for integrating with ShipHero's GraphQL API for fulfillment, inventory, orders, and returns management. Use when (1) authenticating with ShipHero API, (2) managing orders (create, update, cancel, query), (3) managing products and inventory levels, (4) creating and tracking shipments, (5) processing returns, (6) working with purchase orders, (7) setting up webhooks for real-time events, (8) implementing 3PL multi-tenant operations, or (9) optimizing GraphQL query costs and pagination.
npx skill4agent add salmanferozkhan/cloud-and-fast-api ship-herohttps://public-api.shiphero.com/graphqlhttps://public-api.shiphero.com/auth/tokencurl -X POST https://public-api.shiphero.com/auth/token \
-H "Content-Type: application/json" \
-d '{"email": "EMAIL", "password": "PASSWORD"}'Authorization: Bearer YOUR_ACCESS_TOKENrequest_idcomplexitydataquery {
products {
request_id
complexity
data(first: 25) {
pageInfo { hasNextPage endCursor }
edges {
node { id sku name }
}
}
}
}# Create order
mutation {
order_create(data: {
order_number: "ORD-123"
shop_name: "my-shop"
shipping_address: { first_name: "John", last_name: "Doe", address1: "123 Main St", city: "NYC", state: "NY", zip: "10001", country: "US" }
line_items: [{ sku: "SKU-001", quantity: 1, price: "29.99", product_name: "Widget" }]
}) {
order { id order_number }
}
}# Add inventory
mutation {
inventory_add(data: {
sku: "SKU-001"
warehouse_id: "WAREHOUSE_UUID"
quantity: 50
reason: "Restocking"
}) {
warehouse_product { on_hand }
}
}firstlastanalyze: truecreated_at_minupdated_at_min# Preview query cost
query {
orders(analyze: true) {
complexity # Returns estimated cost without executing
}
}mutation {
webhook_create(data: {
name: "Shipment Update" # Must match exactly
url: "https://your-endpoint.com/webhook"
shop_name: "api"
}) {
webhook { shared_signature_secret } # Save this!
}
}customer_account_idquery {
orders(customer_account_id: "CUSTOMER_UUID") {
data(first: 25) { ... }
}
}query {
uuid(legacy_id: 12345, entity_type: "order") {
uuid
}
}request_id{
orders {
request_id # Always include for support
data { ... }
}
}from gql import gql, Client
from gql.transport.requests import RequestsHTTPTransport
transport = RequestsHTTPTransport(
url="https://public-api.shiphero.com/graphql",
headers={"Authorization": f"Bearer {token}"}
)
client = Client(transport=transport)
result = client.execute(gql("""
query { products { data(first: 10) { edges { node { sku } } } } }
"""))