Last active
February 26, 2024 01:41
-
-
Save darryn/313d3b88f07bbe4cf4c64a9dc689a4ea to your computer and use it in GitHub Desktop.
B2B APIs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation priceListCreate($input: PriceListCreateInput!) { | |
priceListCreate(input: $input) { | |
priceList { | |
id | |
} | |
userErrors { | |
field | |
message | |
} | |
} | |
} | |
{ | |
"input": { | |
"name": "Negotiated Prices for [Company]", | |
"currency": "NZD", | |
"parent": { | |
"adjustment": { | |
"type": "PERCENTAGE_DECREASE", | |
"value": 0 | |
}, | |
"settings": { | |
"compareAtMode": "NULLIFY" | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation priceListFixedPricesAdd($priceListId: ID!, $prices: [PriceListPriceInput!]!) { | |
priceListFixedPricesAdd(priceListId: $priceListId, prices: $prices) { | |
prices { | |
compareAtPrice { | |
amount | |
currencyCode | |
} | |
price { | |
amount | |
currencyCode | |
} | |
} | |
userErrors { | |
field | |
code | |
message | |
} | |
} | |
} | |
{ | |
"priceListId": "gid://shopify/PriceList/[PRICELISTID]", | |
"prices": [ | |
{ | |
"compareAtPrice": { | |
"amount": "8", | |
"currencyCode": "NZD" | |
}, | |
"price": { | |
"amount": "5", | |
"currencyCode": "NZD" | |
}, | |
"variantId": "gid://shopify/ProductVariant/46559470354488" //Clover Honey | |
}, | |
{ | |
"compareAtPrice": { | |
"amount": "10", | |
"currencyCode": "NZD" | |
}, | |
"price": { | |
"amount": "5", | |
"currencyCode": "NZD" | |
}, | |
"variantId": "gid://shopify/ProductVariant/42563260678200" //Manuka Honey | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation publicationCreate { | |
publicationCreate(input: { | |
autoPublish: false | |
defaultState: EMPTY | |
}) { | |
publication { | |
id | |
} | |
userErrors { | |
code | |
field | |
message | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation publicationUpdate { | |
publicationUpdate( | |
id: "gid://shopify/Publication/[PUBLICATION_ID]", | |
input: { | |
publishablesToAdd: ["gid://shopify/Product/7605448507448", "gid://shopify/Product/8670490918968"] | |
}) { | |
publication { | |
products(first: 10) { | |
edges { | |
node { | |
id | |
} | |
} | |
} | |
} | |
userErrors { | |
field | |
code | |
message | |
} | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation catalogCreate($input: CatalogCreateInput!) { | |
catalogCreate(input: $input) { | |
catalog { | |
title | |
status | |
priceList { id } | |
publication { id } | |
} | |
userErrors { | |
field | |
code | |
message | |
} | |
} | |
} | |
{ | |
"input": { | |
"title": "Negotiated Catalog for [Company]", | |
"status": "ACTIVE", | |
"context": { | |
"companyLocationIds": [ | |
"gid://shopify/CompanyLocation/[Location ID]" | |
] | |
}, | |
"priceListId": "gid://shopify/PriceList/[PRICELIST_ID]", | |
"publicationId": "gid://shopify/Publication/[PUBLICATION_ID]" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment