Shipping Rate Groups
These endpoints allow you to retrieve, create, update, and delete shipping rate group(s) --- used to specify the shipping rates for geographical zone, and can be then connected to a product or a store (see update mutations for those data structures).
List
This query allows you to retrieve all shipping rate groups on your account.
Fields
- Label
[ShippingRateGroup!]!
- Description
The ShippingRateGroup! query type.
Request
query AccountQuery{
account{
shipping_rates {
# ShippingRateGroup type fields
id
...
}
}
}
Response
{
"data": {
"account": {
"shipping_rates": [
{
"id": "shrg_qsdqsdqsdsqdqs",
}
]
},
}
}
Create
This query allows you to create a new shipping rate group.
Arguments
- Label
InputShippingRateGroup!
- Description
The InputShippingRateGroup! type.
Fields
- Name
CreateShippingRateGroupMutation!
- Type
- CreateShippingRateGroupMutation!
- Description
The CreateShippingRateGroupMutation! query type.
type CreateShippingRateGroupMutation { node: InputShippingRateGroup! }
Request
mutation mutationName($node: InputShippingRateGroup!) {
createShippingRateGroup(node: $node){
# Account type fields
id
...
}
}
Response
{
"data": {
"createShippingRateGroup": {
# Account type fields
"id" : "acc_RnVubmVsOjIwMTIz"
}
}
}
Update
This mutation allows you to perform an update on a shipping rate group.
Arguments
- Name
id
- Type
- ID!
- Description
The shipping rate group id.
- Name
node
- Label
InputShippingRateGroup!
- Description
The shipping rate group input node.
Fields
- Label
ShippingRateGroup!
- Description
The ShippingRateGroup! query type.
Request
mutation updateShippingRateGroupMutation($node: InputShippingRateGroup!, $id: ID!){
updateShippingRateGroup(node: $node, id: $id){
# ShippingRateGroup type fields
}
}
Response
{
"data": {
"updateShippingRateGroup": {
"id": "shrg_qsdqsdqsdsqdqs",
...
}
}
}
Delete
This mutation allows you to delete a shipping rate group.
Arguments
- Name
uid
- Type
- ID!
- Description
The shipping rate group id.
Fields
- Label
Account
- Description
The account type.
Request
mutation deleteShippingRateGroupMutation($id: ID!){
deleteShippingRateGroup(id: $id){
# Account type fields
}
}
Response
{
"data": {
"deleteShippingRateGroup": {
# Account type fields
"id" : "acc_RnVubmVsOjIwMTIz"
}
}
}